Git repository
Agentling isolates the Python agent loop in a single file — alpha, bring your own model
Agentling does not claim to be another framework for building agents. Its claim is narrower: the reusable part of an agent is the loop — ask the model, run the tools it requests, record what happened, repeat until it answers — and that loop can live in one file, src/agentling/agent.py. Everything else, including the model, is supplied by the developer. That framing matters for builders evaluating it. Agentling ships no model adapters. You bring any object with a stream() method, plain functions as tools, and whatever sits around the loop, such as a UI, approvals, or a server. To test without an API key, the README uses ScriptedModel from agentling.testing to play back scripted tool calls and answers. For a real model, the repository provides example adapters under examples/providers/ to copy into your application; those examples require httpx and, for the OpenAI-compatible example, an API key from the environment. What the loop includes Installation is pip install agentling or uv add agentling, on Python 3.11 or newer. The only runtime dependency listed is pyyaml. Agentling is async, so it must be called from async code or via asyncio.run. An Agent is configuration — model, tools, skills, and settings — and holds no per-run state, so one instance can be shared. An AgentSession holds one conversation, its memory, its interrupt flag, and its own copy of the tools. Calling agent.run(task) creates and discards a session; holding a session with agent.start() enables multi-turn work, memory inspection, and interruption. A session runs one task at a time, and a second run() while session.is_running raises RuntimeError. Retries that the README states never repeat a tool call Interrupt and resume, and tool errors fed back to the model instead of crashing the run Typed memory that can be saved and reloaded A checker that verifies a model adapter follows
Continue with the full brief
Create your free account to unlock the complete analysis, follow the sources that matter, and add your perspective.
Sign in to continueFree to join. Your place in this brief will be waiting.
0 Comments
Join the discussion.