Live
Feature overview
DDK is gateway-aware: control stays at the proxy, efficiency moves into the agent. The gateway enforces policy; DDK makes each decision visible and actionable in your code, so the agent reacts to a refusal, paces its budget and reports what it did.

Everything below hangs off a single shared transport inside your process — the one place where every request enters and every response leaves. Each capability attaches there once, so you never wire it call by call.
Model access
Purpose: point any of eight agent frameworks at your governed Omni
Gateway proxy. Advantage: you get your framework’s own object —
ChatOpenAI, LiteLlm, OpenAIModel, crewai.BaseLLM … — with credentials,
correlation, attribution and retry policy injected. No wrapper to code
around, three lines to eject.
Purpose: use the OpenAI SDK directly. Advantage:
donkey.llm.client() returns a native AsyncOpenAI (or OpenAI with
sync=True) — Chat Completions and Responses, streaming included — governed
on identical terms.
| Framework | Call | Returns |
|---|---|---|
| LangGraph | donkey.langgraph.chat_model("gpt-4o") | langchain_openai.ChatOpenAI |
| Google ADK | donkey.adk.model("gpt-4o") | LiteLlm |
Google ADK on a Format=Gemini proxy | donkey.adk.gemini("gemini-3.8-flash") | google.adk.models.Gemini |
| Strands | donkey.strands.model("gpt-4o") | OpenAIModel |
| MS Agent Framework | donkey.agent_framework.chat_client("gpt-4o") | Agent Framework chat client |
| LlamaIndex | donkey.llamaindex.llm("gpt-4o") | OpenAILike |
| OpenAI Agents SDK | donkey.openai_agents.model("gpt-4o") | OpenAIChatCompletionsModel |
| Anthropic SDK | donkey.anthropic.client() | anthropic.AsyncAnthropic |
| CrewAI | donkey.crewai.llm("gpt-4o") | crewai.BaseLLM |
Every adapter offers the same governed connection three ways — a factory on a
shared Donkey (donkey.langgraph.chat_model(...)), a module-level factory
(from donkey_kit.integrations.langgraph import chat_model), or
connection_kwargs() when you want to build the native object yourself.
Governance
Purpose: turn every gateway rejection into a typed exception —
PIIDetected, TokenBudgetExceeded, RequestRateLimitExceeded,
PromptInjectionBlocked,
ContentSafetyBlocked, AuthError, GatewayUnavailable and more.
Goal: branch on the governance outcome, not on a parsed error body.
Advantage: a PII block is never mistaken for an auth failure, and a
policy 429 is never retried.
Purpose: register a reaction to a typed refusal once with
donkey.on(...): wait for the reset, mask and resend, fall back to another
model, or escalate. Goal: one PII handler instead of one per graph node.
Advantage: applied at the transport and bounded, and no handler can turn
a refusal into a success.
Purpose: expose the gateway’s token window as a Budget object.
Goal: stop before the limit, not after it. Advantage:
pace(reserve=) and wait_for_reset() let an overnight batch slow down
instead of dying at 2am.
Purpose: on-behalf-of user identity. Goal: per-user policy reaches the gateway. Advantage: requests never silently fall back to the service identity.
LiveHuman-in-the-loopPurpose: one vocabulary for “pause and ask a human”.
Goal: @donkey.tool(approval="required") pauses the call until someone
decides. Advantage: the approver lands on the span next to the
correlation ID. Client-side and advisory; it never overrides a refusal.
Purpose: read the policy set in force. Advantage: skip calls that are certain to be refused. Advisory only — the gateway always wins.
RoadmapObservability
Purpose: one span per governed call, using the GenAI semantic
conventions plus a stable donkey.* namespace — policy decision, policy
type, budget, routing and token usage. Advantage: refused calls still
produce a span, streaming produces exactly one, and prompt content stays
out by default. Zero-config OTLP export.
Purpose: donkey.run(id=…, team=…, project=…) binds one correlation
ID and validated cost tags to every call in a task. Advantage: your
log line, your span and the gateway’s audit record join on the same ID.
Purpose: donkey.last_call records which gateway served the call,
how it was routed and what it used. Advantage: detect a model
substitution — or make it raise — instead of discovering it in a bill.
Developer tooling
Purpose: donkey mock replays real gateway responses and refusal
shapes on 127.0.0.1. Advantage: build and demo against governance
without an Anypoint account or credentials.
Purpose: donkey.simulate() injects a refusal in-process, and a
pytest plugin grades your agent against every refusal shape.
Advantage: the PII branch is tested before production, not in it.
Purpose: donkey init, doctor, mock, dev, test, scan,
publish, verify, preflight and expose, plus
@donkey.governed, @donkey.tool and @donkey.agent. Advantage: doctor tells wrong
credentials from wrong URL from model-not-allowed; one decorator gives a
function a run scope, span and typed refusals.
Purpose: the docs are published as llms.txt and per-page markdown.
Advantage: Cursor, Claude Code and other assistants write correct DDK
code from the source.
Registry & catalog
Purpose: discover governed MCP tools from the catalog and bind them as
native framework tools. Advantage: allow/deny filtering and approval
gates, and a donkey.lock that turns catalog drift into a typed error —
only governed tools reach your agent.
Purpose: donkey.serve() makes your agent callable by other agents in
one line, on the official a2a-sdk; donkey expose puts it behind a
gateway instance with its policies; donkey dev puts a simulated gateway in
front of it on your laptop. Advantage: the agent card is generated from your code, and
inbound tasks are governed with the same correlation, spans and
refusals.
Purpose: donkey scan derives a model of your agents, tools and
MCP servers from code; donkey publish registers it in Exchange, and
donkey verify checks the live servers and agents against what was
published. Advantage: the catalog stays in sync from CI, not by hand.
Purpose: donkey.a2a.send() and context-managed stream() delegate
using official SDK requests and responses. Advantage: registry-pinned
gateway routing, per-request credentials and local stream cleanup.
Provisional API; successful gateway send and SSE are not yet live-verified
by this implementation. Framework agent-as-tool binding remains planned.
What DDK leaves to the platform
DDK makes the platform’s capabilities reachable and typed; it does not reproduce them. Policy enforcement, semantic caching, provisioning, agent scanners, kill switch, trusted agent identity, approval UIs and evaluation all stay with Agent Fabric and Omni Gateway. Where the platform exposes a signal, such as a semantic-cache hit or the routing decision, DDK surfaces it to your code. See the Roadmap for the full list.