Portable Python agent infrastructure

One small harness.
Mixed agent stacks.

A zero-core-dependency protocol, serializable shared context, pluggable memory, and supervisor shell for coordinating agents without making one provider or framework your application boundary.

python -m pip install agent-harness-kit

Python 3.10+ · MIT licensed · zero third-party core runtime dependencies

Why use agent-harness-kit?

Keep your agents.
Own the boundary.

One small, provider-neutral supervisor, context, and memory contract around agents you already have—without forcing the entire application into one vendor or framework.

Mixed providers and agent implementations

Stable backend protocol for libraries

Serializable context without framework takeover

Small systems where a full runtime is excessive

Incremental framework migration

AlternativeStronger when you needWhy use this harness instead
LangGraphDurable graph execution, checkpoints, streaming, and human intervention.A much smaller shell without adopting a graph runtime.
CrewAIRole-based crews, tasks, and structured flows.Keep existing agents; add consistent supervision and shared state.
OpenAI Agents SDKTools, handoffs, guardrails, sessions, and tracing.Provider-neutral orchestration across OpenAI, Anthropic, and custom agents.
Microsoft Agent FrameworkEnterprise workflows, middleware, MCP, and hosted integrations.An embeddable Python protocol rather than a complete platform.
Google ADKTooling, evaluations, multi-agent workflows, and deployment support.Minimal dependencies and infrastructure-neutral agent boundaries.

Deliberate non-goals: this package does not replace durable execution, tracing, guardrails, evaluations, tool ecosystems, or deployment platforms. Comparison text is paraphrased from the linked official documentation.

Interactive architecture

Watch context move, step by step.

This is demo mode: a deterministic browser-only simulation. It makes no API calls, uses no credentials, and sends no data anywhere.

Demo mode · local simulation

Ready Step 0 / 7
Agent harness execution architecture Animated paths run from a supervisor to three specialist agents and then into shared context and memory.
Supervisor idle
Researcher idle
Analyst idle
Writer idle
Shared Context / Memory waiting

Shared context

JSON

            

Event log

0 events

    01

    Supervisor shell

    Route registered agents behind one predictable run_step boundary.

    02

    Shared context

    Carry messages, artifacts, scratch data, and tool state through JSON-compatible context.

    03

    Pluggable memory

    Start in memory, persist to SQLite, or implement the small memory protocol.

    Bring your own model or framework

    Install only what you use.

    OpenAI and Anthropic are ready-to-run reference backends. Framework adapters are truthful templates for connecting your graph, crew, or Strands agent.

    agent-harness-kit[anthropic] Ready · Claude backend
    agent-harness-kit[openai] Ready · OpenAI backend
    agent-harness-kit[langgraph] Template · implement run_step
    agent-harness-kit[crewai] Template · implement run_step
    agent-harness-kit[strands] Template · implement run_step
    agent-harness-kit[all]All optional SDKs, including template adapters

    Runnable OpenAI example

    Build around one backend protocol.

    from agent_harness_kit import HarnessLoop, InMemoryProvider, OpenAIBackend
    
    supervisor = OpenAIBackend(
        model="gpt-4o-mini",
        is_supervisor=True,
        agent_names=["writer"],
    )
    writer = OpenAIBackend(
        model="gpt-4o-mini",
        system_prompt="Write a concise answer to the user's request.",
    )
    
    loop = HarnessLoop(
        memory=InMemoryProvider(),
        supervisor=supervisor,
        agents={"writer": writer},
    )
    result = loop.run_supervised(
        objective="Explain portable agent orchestration",
        input="Give me a two-sentence overview.",
        session_id="demo",
    )

    Install agent-harness-kit[openai] and set OPENAI_API_KEY before running this real SDK example.