A higher-level OpenDunes SDK for building agent loops with tools, state, and stop conditions.
Not yet available. The Agent SDK is tracked to be built — today, use the Client SDKs against the live chat completions API. The docs below describe its intended design.
The Agent SDK is an OpenDunes-native client for building agents. It wraps the chat completions endpoint with higher-level primitives — a managed call-model loop, a tool registry, declarative stop conditions, and balance-aware execution — so you spend less time writing scaffolding and more time defining agent behavior.
The OpenAI-compatible SDK works well for single-turn and simple multi-turn flows. When agents grow — multiple tools, multi-step reasoning, approval gates, budget limits — you end up writing the same plumbing repeatedly. The Agent SDK codifies that plumbing once, with defaults tuned for OpenDunes (DA billing, X-Balance-Available awareness).
callModel() is the central primitive. It runs one agent turn: sends messages to the model, handles streaming, dispatches tool calls, collects results, and returns the next message list ready for the following turn. See Call Model.
Define a tool once with a JSON Schema; the SDK handles serialization, dispatch, result injection, and re-invocation. See Tools.
Declare when the loop should halt — on a specific output shape, token budget, balance threshold, or turn count — without wiring if statements through your loop body. See Stop Conditions.
The SDK's internal representation for messages and tool interactions is the item list — an append-only sequence of turns that serves as both the conversation history and the agent's working memory. See Working with Items.
callModel() reference.