The Python SDK for production agents.
Build agentic systems your team can debug, extend, and own. Compose any architecture from reusable primitives. Trace every agent decision.
pip install nanitics Inside nanitics.
-
Agent strategies
Built-in strategies for different problem shapes: ReAct, Reasoning, and CodeAct agents.
-
Tools
Function tools, MCP tools, and four shipped built-ins: web search, HTTP, file read, code execution. Schemas generated automatically.
-
Memory
Working, episodic, long-term, semantic, and shared memory. Pluggable stores.
-
Human-in-the-loop
Approval and revision gates, with durable suspension across processes for long-running workflows.
-
Multi-agent foundations
Agent-as-tool, handoff, and broadcast. The primitives that compose multi-agent systems.
-
Observability
Every loop, tool call, evaluation, and coordination event emits a structured event. The Observatory renders the trace as a hierarchical timeline.
Also in the box: orchestration, multi-agent coordination, evaluation, and planning. Specialized strategies including Reflexion, ReWOO, LATS, and Tree of Thought are documented in the advanced patterns guide.
A worked example: one agent composes another.
The full trace, no instrumentation added.
Two layers of agents. researcher is a ReAct agent with one
search tool. reviewer is a ReAct agent that wraps
researcher as a tool, then composes the final answer from
the delegated result. The same emitter threads through both, so the
trace renders as one continuous timeline.
researcher = ReActAgent(
name="researcher",
llm_client=researcher_llm,
emitter=emitter,
system_prompt="Research the question using search() and cite results as [R-N].",
tools=[search],
)
reviewer = ReActAgent(
name="reviewer",
llm_client=reviewer_llm,
emitter=emitter,
system_prompt="Delegate research to the specialist, then compose the final answer.",
tools=[
AgentTool(
agent=researcher,
emitter=emitter,
caller_name="reviewer",
description="Delegate research to the specialist researcher.",
)
],
)
result = await reviewer.run("What changed in our retry policy last quarter?")
Swap MockLLMClient for AnthropicLLMClient(model='claude-haiku-4-5') to run against a real provider. Everything else is identical.
reviewer delegates to
researcher via AgentTool; the
DelegationEvent on the right pane links the two agents.
The researcher's search tool call and its cited end-of-turn
draft sit nested inside the delegation, then control returns to
reviewer for the final composed answer.
researcher. The header records
the agent's LLM calls, tool calls, iterations, and wall time. The
timeline lists every event the agent emitted: the initial
agent.start, the LLM response invoking search,
the tool invocation and result, the cited end-of-turn draft, and the
agent.complete that closed the span.
Questions before adopting.
-
Where should I start?
The fastest path is six guides: Getting Started, Core Concepts, Tools, Memory, Human-in-the-Loop, and Multi-Agent Foundations. Around thirty minutes end to end. Everything else is à la carte. The guides index at
docs/guides/README.mdin the repository lays out the full path. -
Is Nanitics production-ready?
The public surface is
nanitics.__all__, and every public component is validated against real providers before each release. Pre-1.0; the change contract is documented in the deprecation policy. -
Who builds and maintains Nanitics?
Nanitics is maintained by Propodeum (propodeum.com) and developed in the open under Apache 2.0. Contributions, questions, and bug reports go through GitHub.
-
Which LLM providers does Nanitics support?
Anthropic and OpenAI clients ship by default. Mistral and LiteLLM are extras.
MockLLMClientsupports development and testing without an API key. -
What does "trace-first observability" mean in practice?
Every agent loop, tool call, evaluation, and coordination event emits a structured event. The Observatory trace viewer renders these as a hierarchical timeline. There is no separate tracing service to bolt on.
-
Can I use Nanitics without an API key?
Yes.
MockLLMClientmirrors real client behavior with scripted responses. Every example in the repository runs deterministically without network access. -
Does Nanitics impose a runtime, server, or framework?
No. Nanitics is a Python library. There is no runtime, no database, no web framework. You compose the primitives inside whatever application you build.
Install Nanitics.
pip install nanitics Apache License 2.0. Bug reports on GitHub Issues. Questions and proposals on GitHub Discussions.