Open-source Python agent framework · MIT

Four lines of code,
an agent with memory.

From pip install to your first agent in four lines.
From there, tools, retrieval, RAG, multi-agent, and governance unlock layer by layer — all in the same package.

Read the docs →
Six components, one package Zero services to start, swappable backends Every major provider, plus local models
Explore the stack
quickstart.py terminal
1from agentmaker import Agent, LLMClient
2agent = Agent("assistant", LLMClient("deepseek"))
3agent.run("I'm flying to Copenhagen next week.")
4print(agent.run("And the weather?").final_output)
output 0.8s
Copenhagen this time of year: 8–12°C
and drizzly — pack a rain jacket.

These four lines are the whole thing. More capabilities are a few arguments away.

01 What ships in the core

Six components,
one import.

Everything below ships in the core import, import agentmaker. No managed service to sign up for, no second package for tracing.

// execution01
Four paradigms, one engine
Chat, ReAct, Plan-and-Solve, and Reflection out of the box, plus composing agents into multi-agent systems.
// retrieval02
Hybrid retrieval, built in
Vector and keyword search fused with reciprocal rank fusion, with optional reranking. One core serves memory, RAG, and tool search.
// memory03
Memory that consolidates
Scored by relevance, recency, and importance, with Mem0-style writes that add, update, or delete facts instead of blindly appending. A key-value layer holds exact structured facts.
// governance04
Guardrails, approvals, limits
Input and output guardrails, human-in-the-loop approve and resume, and run limits on LLM calls, tool calls, tokens, and wall-time. Durable checkpoints persist a suspended run and resume it after a restart.
// providers05
Every major provider
OpenAI, Anthropic, and Gemini natively, plus DeepSeek, Qwen, Kimi, GLM, and local models (Ollama, vLLM, SGLang) through any OpenAI-compatible endpoint. Native function calling by default, with a text-emulation fallback for models that lack it and no change to the agent loop.
// backends06
Swap any backend
Embedder, vector store, keyword index, reranker, and result fusion are five independent, swappable backends. The vector store and keyword index default to local SQLite (sqlite-vec + FTS5) and can be swapped for any vector store or full-text index.
02 Architecture

One framework, four layers.

Each layer depends only on the one below it, and never the reverse. Your app depends on agentmaker; agentmaker depends on your model provider and a local database, and it knows nothing about your business. That single direction is what keeps the framework small enough to read end to end.

L1Agent agents/

The unified model-tool loop and the recipes built on it.

AgentPlanAgentReflectionAgentAgentSpecbuild_agentAgentTool
↓ depends on
L2Runtime runtime/

The Harness coordinates the cross-cutting work: call the model, run tools behind permission and approval gates, assemble context, trace.

HarnessGuardrailHITL approve/resumeRunPolicyHookTracerSessionStore
↓ depends on
L3Capabilities tools/ · skills/

Tools with schema-validated calls and progressive disclosure, MCP integration, tool retrieval, and model-invoked skills.

Tool@toolToolRegistryToolPermissionsMCPToolRetrieverSkill
↓ depends on
L4Infrastructure core/ · retrieval/ · memory/ · rag/ · context/

The LLM front door and adapters, the hybrid retrieval core, memory, RAG, and context assembly.

LLMClientScopeHybridRetrieverMemoryRagRetrieverContextBuilder
↓ One-way dependency rule

The point of the one-way rule is leverage. The Harness is a coordinator, not a container, so the guardrails, permissions, approvals, limits, and tracing live beside it and are used directly by every agent. Add a new paradigm and those cross-cutting concerns come for free.

Nothing here is a plugin you have to trust from a distance: governance is a layer you can open and read, backends are modules you can swap out whole, and the data plane runs on local SQLite until you decide otherwise.

03 Execution model

One loop, four paradigms.

Chat, ReAct, Plan-and-Solve, and Reflection are not four separate engines. All four share one run-and-resume template, so guardrails, approvals, limits, and tracing apply the same way to every one.

// chat

Plain conversation, memory included

user ⇄ model | memory read-back

Plain multi-turn conversation with per-scope history read back automatically.

chat.py python
1
Agent("assistant", LLMClient("deepseek")).run("Summarize this thread.")
04 Under the hood

Retrieval you can trust.

One hybrid core does dense and sparse search, fuses the two by rank, and optionally reranks. The same core serves memory, RAG, and tool search, kept apart by Scope so a user's memories never leak into another's.

01 Query incoming request
02 · parallel Vector + Keyword denseBM25
03 RRF fuse rank fusion · k = 60
04 · optional Rerank cross-encoder pass
05 Results ranked hits
one core serves memory rag tool search isolated by Scope

Every stage of the pipeline can be swapped out whole: local SQLite for vectors and FTS5 for keywords by default, with an optional Cohere reranker. Implement the matching interface and drop in any backend you like. Scope keeps each user's and each session's results isolated.

05 Where it fits

How it compares.

The frameworks below are, in general, larger and more battle-tested than agentmaker, with bigger ecosystems and more production mileage.
agentmaker claims one thing: a lean, readable, MIT core where retrieval, memory, RAG, and governance all ship in a single import.

Dimension agentmaker LangChain / LangGraph LlamaIndex CrewAI OpenAI Agents SDK Pydantic AI
Primary abstraction Single unified model-tool loop + recipes (Plan / Reflection / AgentTool) Graph of nodes/edges with durable state (LangGraph); create_agent + middleware harness on top (LangChain) Event-driven typed Workflows over a document/RAG data plane Role-based crews (role/goal/backstory) + Flows Lightweight Agents + Handoffs primitives Typed Agent (deps in → structured output) + capabilities; optional Graph
Single-import full stack YES: one import agentmaker gives agent + tools + retrieval + memory + RAG + context + governance + tracing Split across LangChain + LangGraph + integration packages; LangSmith separate for tracing Core + many llama-index-* add-on packages (e.g. otel obs. pkg) Largely one package for crews + memory; extras for some integrations One lightweight SDK; RAG/long-term memory expected externally Modular (pydantic-ai / -slim); embeddings API in core, no vector store or long-term memory (Harness add-on emerging)
Hybrid retrieval built in YES: one hybrid core, vector + keyword fused with reciprocal rank fusion, optional rerank, shared across memory/RAG/tools Retriever interfaces built in; RRF fusion (EnsembleRetriever) now in legacy langchain-classic, or store-native hybrid YES: retrieval is its core strength (RAG, hybrid retrievers, rerank) Retrieval via memory/knowledge sources backed by vector DBs; not a general hybrid-search core Not built in: hosted file-search over OpenAI vector stores, no in-framework hybrid core Not built in; bring your own (common tools like web search available)
Memory built in YES: Mem0-style scored memory (relevance, recency, and importance) + KVStore + MemoryTool Short-term (checkpointers) + long-term (LangGraph Store) built in, incl. native semantic search; bring your own embedding model YES: core Memory class + pluggable memory blocks (static / fact-extraction / vector) YES: built-in Memory with composite scoring (semantic · recency · importance), LanceDB default; Mem0 optional Session (short-term) memory built in; long-term/semantic memory external Not in core — dependency injection / message history; Anthropic-native MemoryTool (bring your own storage)
Governance built in YES: Guardrails, HITL approve/resume, RunPolicy caps (calls/tokens/wall-time), durable per-scope checkpoints HITL + durable state in LangGraph; 1.x middleware ships built in: HITL, PII, summarization, model/tool-call limits Built-in HITL workflow events (InputRequired / HumanResponse); guardrails via integrations, no dedicated layer Task guardrails (function or LLM-judged, with retries) + agent limits (max_iter / max_rpm / max_execution_time) YES: input/output + tool-call guardrails; optional OpenAI Guardrails add-on; limits (max_turns) lighter-weight Output validation (Pydantic) + tool-approval HITL; durable execution (Temporal / DBOS / Prefect / Restate)
Observability / tracing YES: Tracer with secret & sensitive-path redaction + exporters (memory/JSONL/SQLite/OpenTelemetry) in core; optional LLM "Trace Detective" diagnosis Via LangSmith (separate product) auto-tracing graph spans YES: built-in instrumentation module + OTel export package Built-in tracing with hosted AMP traces UI (tracing=True) + event bus; integrations (Langfuse / OTel / Datadog) YES: built-in tracing + OpenAI Traces dashboard YES: via Pydantic Logfire (OpenTelemetry); any OTel backend (Logfire separate)
Swappable backends YES: five backend interfaces (embedder, vector store, keyword index, reranker, fusion), each replaceable; stores default to local SQLite, pluggable to e.g. pgvector YES: very broad integration ecosystem for stores/embeddings/rerankers YES: broad retrieval/store/rerank integrations Memory: LanceDB default or Qdrant, pluggable backend; knowledge: ChromaDB default or Qdrant Model-agnostic via LiteLLM (100+ LLMs); built-in session-store adapters; hosted tools + Traces stay OpenAI-only Model-agnostic; stores / memory bring-your-own

Last verified: July 2026.

06 Prior work

Standing on published work.

The key mechanisms in agentmaker draw on published research.

Agent reasoning and orchestration

ReActthe unified Agent loop interleaves reasoning and tool calls when tools are present.

Yao, Zhao, Yu, Du, Shafran, Narasimhan, Cao. "ReAct: Synergizing Reasoning and Acting in Language Models." ICLR 2023. arXiv:2210.03629.

Plan-and-SolvePlanAgent breaks a task into an ordered plan, then executes and synthesizes.

Wang, Xu, Lan, Hu, Lan, Lee, Lim. "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models." ACL 2023, pp. 2609 to 2634. arXiv:2305.04091.

ReflexionReflectionAgent drafts, self-critiques, and refines on retry.

Shinn, Cassano, Gopinath, Narasimhan, Yao. "Reflexion: Language Agents with Verbal Reinforcement Learning." NeurIPS 2023. arXiv:2303.11366.

Toolformerthe canonical reference for models learning when and how to call tools, the pattern behind the tool layer.

Schick, Dwivedi-Yu, Dessì, Raileanu, Lomeli, Hambro, Zettlemoyer, Cancedda, Scialom. "Toolformer: Language Models Can Teach Themselves to Use Tools." NeurIPS 2023. arXiv:2302.04761.

Context assembly and memory

Maximal Marginal Relevancemmr_select de-duplicates assembled context, balancing relevance and diversity.

Carbonell, Goldstein. "The Use of MMR, Diversity-Based Reranking for Reordering Documents and Producing Summaries." SIGIR 1998, pp. 335 to 336.

Generative AgentsMemory.search scores recall by relevance, recency, and importance.

Park, O'Brien, Cai, Morris, Liang, Bernstein. "Generative Agents: Interactive Simulacra of Human Behavior." UIST 2023. arXiv:2304.03442.

Mem0SmartWriter reconciles writes by adding, updating, or deleting facts against existing memory.

Chhikara, Khant, Aryan, Singh, Yadav. "Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory." 2025. arXiv:2504.19413.

Retrieval and fusion

Retrieval-Augmented Generationthe rag/ module grounds generation on retrieved documents end to end.

Lewis, Perez, Piktus, Petroni, Karpukhin, Goyal, Küttler, Lewis, Yih, Rocktäschel, Riedel, Kiela. "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks." NeurIPS 2020, pp. 9459 to 9474. arXiv:2005.11401.

BM25 (Okapi)the default Fts5KeywordIndex uses SQLite FTS5 BM25 ranking as the keyword path.

Robertson, Zaragoza. "The Probabilistic Relevance Framework: BM25 and Beyond." Foundations and Trends in Information Retrieval, Vol. 3, No. 4 (2009), pp. 333 to 389.

Dense Passage Retrievalthe Embedder and VectorStore interfaces embed query and passages into one space.

Karpukhin, Oğuz, Min, Lewis, Wu, Edunov, Chen, Yih. "Dense Passage Retrieval for Open-Domain Question Answering." EMNLP 2020, pp. 6769 to 6781. arXiv:2004.04906.

Reciprocal Rank Fusionreciprocal_rank_fusion merges dense and keyword lists by rank, k = 60.

Cormack, Clarke, Büttcher. "Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Learning Methods." SIGIR 2009, pp. 758 to 759.

HyDEthe optional HyDETransformer embeds a hypothetical answer as the search query.

Gao, Ma, Lin, Callan. "Precise Zero-Shot Dense Retrieval without Relevance Labels." ACL 2023. arXiv:2212.10496.

Contextual RetrievalLLMContextualizer and HeadingContextualizer prepend each chunk with its context before indexing.

Anthropic. "Introducing Contextual Retrieval." Anthropic engineering blog, September 19, 2024.

Protocols

Model Context Protocoltools/integrations/mcp.py loads any MCP server's tools through the official SDK.

Anthropic. "Introducing the Model Context Protocol." Anthropic news, November 25, 2024. Spec: modelcontextprotocol.io.

Last verified: July 2026.

Full stack in one import.

Read the docs →

Core batteries included. Optional extras via agentmaker[all].