Skip to content

Changelog

What shipped, release by release. Releases are tagged on GitHub.

v0.2.0

AddedChangedRemovedFixed

Any model you bring

Breaking: Agentling no longer ships a model provider.

Migrate from 0.1 shows the 0.1 code and its 0.2 replacement for every removed or changed API.

Agentling no longer bundles an OpenAI adapter or depends on openai. Any object with a stream(messages, tools) method that yields Deltas is a model, so an app can use OpenAI, Anthropic, Gemini or a local server through an adapter of its own. Write a model adapter explains the contract, and the reference adapters are ready to copy.

Added#

  • ToolDefinition, the provider-neutral description of a tool that adapters render in their own format, and Tool.definition to get one.
  • reasoning, finish_reason and provider_data on Delta and ChatMessage, and cached_input_tokens and reasoning_tokens on Usage. provider_data must be JSON-serialisable; the loop raises ModelOutputError when it isn't.
  • FinishReason, and FinalEvent.finish_reason for the last model turn.
  • A ModelError subclass for each kind of model failure (ModelConnectionError, ModelRateLimitError, ModelServerError, ModelTimeoutError, ModelAuthError, ModelBadRequestError, ModelContextLengthError), with retryable, retry_after and status. See the Errors reference.
  • RetryPolicy and Agent(retry=...). The loop retries a turn that fails with a retryable error before its first chunk, with backoff and jitter, honouring retry_after up to max_delay. retry=None turns retries off.
  • deltas_from_message, for adapters whose backend doesn't stream, and examples/custom_model_generate_only.py to show it.
  • AgentSession.resume(), which continues an interrupted or failed run from memory without adding the task again, and AgentSession.is_running.
  • ModelOutputTruncatedError, raised when the model's output limit cuts a tool call short. The loop no longer asks the model to fix such a call.
  • Async step callbacks. Callbacks run in order and are awaited before the step's StepEvent; StepCallback is their type.
  • agentling.testing: ScriptedModel, which replays scripted turns so an agent runs offline; check_model, which runs an adapter through a text turn and a tool turn and reports which contract rule it broke; and RecordingTransport, write_fixture and read_fixture for recording a backend once and replaying it in tests. Recorded mode needs httpx; the rest doesn't.
  • Reference adapters to copy, in examples/providers/: openai_chat.py for OpenAI-compatible endpoints, anthropic_messages.py for the Anthropic Messages API (thinking blocks are kept and replayed through provider_data), and ollama_native.py for Ollama's /api/chat. Each takes an extra_body, ships a recorded fixture and passes check_model. They need httpx, which Agentling itself doesn't depend on.
  • examples/providers/record.py, which records an adapter against a live backend into a fixture with API keys redacted.

Changed#

  • model_timeout bounds the wait for each streamed chunk, not the whole turn.
  • A tool call that arrives without an id gets one (agentling_call_<index>_<8 hex>) instead of failing the turn.
  • ModelOutputError is now a subclass of ModelError.
  • FinalEvent.usage is None when the model never reported usage, instead of zero counts.
  • interrupt() also ends a wait between retries, and does nothing while no run is active. It used to stop the next run before its first step and leave its task in memory.
  • A session runs one task at a time: run() or resume() during a run raises RuntimeError("Session is already running").
  • final_answer no longer produces a ToolCallEvent or ToolResultEvent; the step's StepEvent is followed by the FinalEvent. The call is still recorded in memory.
  • Turns whose tool calls can't be parsed no longer count towards max_steps.
  • run(..., stream=True) is typed as an async generator, so it can be closed early with contextlib.aclosing, and run() without it as a coroutine, so it can be passed to asyncio.create_task.
  • The answer forced at the step limit goes through context_manager, retries and interrupts like any other turn.
  • Agent() raises TypeError straight away for a model without a usable stream method.
  • Memory saves as format 2, which adds the new fields. Format 1 saves still load, but 0.1 can't read format 2.
  • Agentling describes itself as an agent engine: the loop, typed memory and streamed events, with any model you bring. The README quickstart runs offline on ScriptedModel.

Removed#

  • OpenAIModel and the openai dependency. The only runtime dependency is pyyaml.
  • ToolSpec and Tool.to_schema(); use Tool.definition.
  • Model.generate. Model has one method, stream, which takes ToolDefinitions.

Fixed#

  • A slow consumer of run(stream=True) no longer receives a CancelledError caused by model_timeout.
  • Retries no longer stack. Agentling used to retry on top of the OpenAI SDK's own retries, up to nine attempts per request.
  • Interrupting a run mid-stream now closes the adapter's stream.
  • An interrupt during the last step stops the run instead of making one more model call for the step-limit answer.
  • A step callback that raises on the step where the model called final_answer no longer loses the answer: it is in memory, and the run isn't left looking resumable.

v0.1.1

AddedFixedChanged

Dynamic tools

Tools whose schemas come from somewhere else (an MCP server, an OpenAPI spec, a plugin) now work, and a running session can gain or lose tools.

Added#

  • AgentSession.add_tools(tools, replace=False) and AgentSession.remove_tools(names) change a live session's tools. The model sees the change from its next call. Each call is all or nothing, and final_answer (plus load_skill when skills are configured) can't be removed or replaced.
  • Tool.validate_arguments (default True) and the matching @tool(validate_arguments=...) option, for tools whose arguments are validated elsewhere.
  • Tool.validate(arguments), a public way to check arguments without running the tool. call() now goes through it.
  • examples/cli_dynamic_tools.py, and a Dynamic tools and MCP guide with an MCP bridge recipe. agentling still has no MCP dependency.

Fixed#

  • A property whose type is a list, such as ["string", "null"], no longer crashes validation. A value passes if it matches any listed type, and "null" matches None.
  • A schema with no properties no longer rejects every argument.
  • Extra arguments are rejected only when additionalProperties is false.
  • Validation skips keywords it doesn't implement (anyOf, $ref, format, nested objects) and only ever raises ToolCallError.

Changed#

  • Tool names and schemas are checked wherever a tool is registered, not only in @tool. A Tool subclass with an invalid name or a non-object schema now fails with ValueError at registration.
  • A Tool subclass whose schema doesn't set "additionalProperties": false now accepts extra arguments, as JSON Schema intends. @tool schemas still reject them.
  • Loading a skill that declares a tool whose name is taken by a different tool now returns an error to the model instead of silently keeping the existing tool.
  • Docstrings and the Errors reference now say which errors are reserved and not yet raised, and that provider errors reach your code unwrapped.

v0.1.0

Added

The first release

The first real release: the core loop plus a production-hardening pass.

Added#

  • Async ReAct agent loop with a single streaming code path (Agent config and factory, AgentSession run state); blocking and streaming run().
  • Provider-neutral model layer and an OpenAI-compatible adapter with retries.
  • @tool decorator with JSON Schema generation, argument validation, and per-tool metadata (timeout, parallel_safe, max_output_chars).
  • Typed memory (TaskStep / ActionStep / FinalStep) with JSON persistence and load validation (MemoryLoadError).
  • Streaming events, a print_events renderer, and a terminal run status (completed / interrupted / max_steps).
  • Progressive-disclosure skills (SKILL.md) with a built-in load_skill tool.
  • An exception hierarchy under AgentlingError, public API exports, and __all__.
  • Timeouts (tool_timeout, model_timeout), prompt cancellation, sync tools run off the event loop, optional error redaction (redact_errors), cumulative token usage on the final event, and a context_manager hook for long runs.