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
Read the docs

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.

examples/homepage.py
    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.

Nanitics Observatory run-detail view. The trace tree on the left lists the root and reviewer spans, then step-1 with an LLM request, then a Delegated event from reviewer to researcher, then the researcher span containing an LLM request, a search tool invocation and result, and a final LLM response carrying two citations. The right pane shows the DelegationEvent linking reviewer to researcher.
The run-detail view of the same trace. The left tree lists every span the composition emitted. 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.
Nanitics Observatory agent-detail view of the researcher ReAct agent. The header shows two LLM calls, one tool call, two iterations, and the run duration. The timeline lists the agent.start event, an LLM request and response invoking the search tool, the tool invocation and result, then a final LLM response producing the cited answer, and the agent.complete event.
The agent-detail view of 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.

See the full runnable example on GitHub

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.md in 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. MockLLMClient supports 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. MockLLMClient mirrors 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.