Beta · Python 3.12+ · Apache-2.0
Agent Loop
A synchronous Python library for building reliable agents. The same application code runs against Anthropic, OpenAI, OpenRouter, or Modal/vLLM, while Agent Loop manages conversations, tool execution, retries, limits, and operational reporting. Your application keeps control of prompts, data, approvals, and secrets.
Install
pip install based-models-agentloopWhat it does
- One agent, many providers: Anthropic, OpenAI, OpenRouter, Modal/vLLM, or your own client.
- Local Python tools with approval hooks and trusted dependencies.
- Independent tool calls run concurrently, with results kept in order.
- Provider-hosted web search, constrained by domain allowlists or blocklists.
- Typed, serializable transcripts that keep tool activity, sources, and citations.
- Consistent retries, error types, usage data, and run limits across providers.
- Summaries, event traces, and OpenTelemetry traces and metrics, metadata-only by default.
- An offline, scripted FakeClient for testing agent behaviour without an API key.