entorin

Bare loop, no SDK

If you don't want a framework, you don't need one. A 50-line while loop inherits the full harness.

If you don’t want a framework, you don’t need one. adapters/bare_loop/agent.py ships a single function that is the loop:

from adapters.bare_loop import run_qa
from entorin.tools import MCPToolClient

answer = await run_qa(
    model=anthropic_model,        # any Entorin AsyncModel
    ctx=ctx, bus=bus,
    question="how many roads must a man walk down?",
    tool_clients={
        "fs": MCPToolClient("fs", session=fs_session, bus=bus),
    },
    max_turns=6,
)

That’s the whole thing. Every harness primitive (events, budget, span, capability, audit) emits because the substrate components emit them — not because the loop knows about them. See examples/bare_loop_qa.py for a runnable end-to-end driver under 80 LOC.

Why bare-loop is the P1 demonstrator

P1 — frameworks over-abstracted — is the pain you can only show by not using a framework. The bare-loop reference exists to prove the substrate doesn’t ask you to subclass anything, register anything, or build a graph. The same EventBus / Ledger / Capability flow works without a single import from a framework’s namespace.

When you graduate to a framework later, you re-use the same substrate objects — the adapter glue is the only thing that changes.