Repository navigation
Releases
Releases · VeloceAI/agent-adapter
v1.2.0: VoxCat voice, shared board, template documents
Voice, video and robots, agents that share what they find, and documents filled from many model calls.
pip install -U agent-adapter
pip install -U "agent-adapter[voice-cloud]" # hosted speech-to-text and text-to-speechHighlights
- VoxCat, our own voice pipeline (
agent_adapter.voice). Phone calls (Twilio, Telnyx, Plivo, Vonage), browser calls over WebRTC, and the local mic. Spoken approvals before side effects, and nothing is done twice when the caller interrupts. It is fast with any speech-to-text and text-to-speech, open models included: its own end of turn (EagerTurns), replies started on interim words, and the first words spoken early. Set up a whole call from one file and run it withagent-adapter voice serve voxcat.yaml. - Benchmark against LiveKit Agents and Pipecat (
scripts/voxcat_vs.py), on the same fake parts in real time. VoxCat starts speaking about 0.4 s sooner, and stops within one frame when the caller cuts in. Method and limits: https://agent-adapter.veloceai.in/how-to/voxcat-benchmark/ - Video and robots: camera and screen feeds for tools (
VideoFeed,look_tool), and robot safety in simulation (MuJoCo, ROS 2). - Shared board (
agent_adapter.board): parallel or sequential agents see what the others are doing and have found. - In-flight sharing: when agents make the same cached tool or model call at the same moment, one real call runs and the others share its result.
- Template documents (
agent_adapter.compose): fill a Markdown, HTML, XML or text template from many model calls, with citations.
Docs: https://agent-adapter.veloceai.in/voice/
Full changelog: https://github.com/VeloceAI/agent-adapter/blob/main/CHANGELOG.md
v1.1.1: DSPy 3.5 support
DSPy 3.5 support. Agent Adapter now works with DSPy 3.5 and 3.4.
pip install -U "agent-adapter[dspy]"Added
dspy_compress_prompt(prompt, policy)inagent_adapter.integrations.dspy, and the"dspy"compression format for the lm15 messages in a DSPy 3.5Prompt. It takes whatAdapter.formatreturns on DSPy 3.5 or 3.4 and gives back the same kind.
Fixed
- DSPy 3.5 support. Tools already ran unchanged; the compression adapter example failed because DSPy 3.5 adapters return a
Prompt, not chat dicts. The examples and contract tests now cover DSPy 3.5 (XMLAdapter default, thetool_callsandsubmitReAct) and 3.4.
Full changelog: https://github.com/VeloceAI/agent-adapter/blob/main/CHANGELOG.md
v1.1.0
The first public release: open source under Apache-2.0 and published on PyPI.
Added
- Guardrails.
PIIGuard: a dependency-free guard hook for emails, phone numbers, cards
(Luhn), IBANs (mod-97) and API keys or secrets. It blocks, redacts tool results and model
replies, or sends flagged tool calls to one-use approval (confirm=guard.confirm). It fails
closed and never logs content. CallableGuard(fn)for any guard service;PresidioGuard(extrapresidio) and
NemoGuard(extranemo);ContentGuard,TextGuardandGuardVerdictto write your own.- Multi-agent.
agent_tool(agent, ...): any agent (aLoopAgent, afn(task, ctx), or a
chat agent viachat_agent_task) becomes a registry tool that runs in the calling run. Cost,
budgets, limits, approvals and events roll up, withparent_idlinks.AgentDepthExceeded
caps nesting (max_depth, default 3). handoff(...)andHandoffModel: hand the conversation to another agent; its answer ends
the tool loop.- Sub-flows.
SubFlow(flow, input=, into=)runs another flow as one node. Fields map in
and out under the parent's merge rules. A pause or approval inside the child pauses the
whole run, and resume continues from where it stopped. Sub-flow cycles and field types are
checked atvalidate(). Mermaid draws a subgraph, and the run viewer opens a sub-flow node
(⊞ open, keyso/u). - Node cache.
Flow.node(..., cache=NodeCache(ttl=, key=, reads=, scope=))reuses a
node's updates from the executor's cache port. Entries are signed with the runner's
checkpoint key. A node with a pause gate or a tool that needs approval is never cached. A
hit emits the newnode.cachedevent. - Context windows. Price table
2026-11-05:context_windowandmax_output_tokenscaps
(with the vendor page in a newsourcefield) for every cited OpenAI, Gemini and Claude
row, so percent compression policies need no setting for them. - Price rows for gpt-5.6-sol/-terra/-luna, gpt-5.5, gpt-5.4-mini, gpt-6-astra, gpt-6.1-sol,
gpt-6.1-terra, gpt-6-luna, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-3.1-flash-lite,
and Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 (with 5m and 1h cache-write
prices). ModelCaps.max_output_tokensandModelCaps.prompt_window(); percent compression applies
to the window less the reply ceiling.- Model recipes. Amazon Bedrock (Converse), Azure OpenAI, Mistral, Groq and OpenRouter as
CallableModels, with usage, prices and typed errors (docs: Model recipes). - Send traces. Langfuse, Arize Phoenix and OpenLLMetry over the OTel sink (docs: Send
traces). agent-adapter doctorchecks optional backends from a pluggable list: Presidio and NeMo
guards, the OpenTelemetry SDK and OTLP exporters.- A spec-drift test keeps the docs, the LLM guide and the public API in agreement.
- Evals.
agent_adapter.evals:run_eval(target, cases, graders)runs each case as its own
run on your executor (approvals, budgets, ledger, events, recorder) and returns an
EvalReportwith per-case, per-tag and per-grader totals, cost and timing,compare()for
regressions, andto_junit(),to_markdown(),to_json(). Targets: anyfn(input), a chat
agentfn(message, session),FlowTarget,ToolLoopTarget. Graders:exact,contains,
regex,json_schema,tools_called,max_cost,max_latency,code_check,all_of, and
LLMJudge(model, rubric)on your own model. Cases saved by the chat page load unchanged. agent-adapter eval TARGET CASES:--grader,--min-score,--junit,--markdown,--json,
--baseline; exits 1 below the score, on any case error, or on a regression.- Pytest plugin:
@pytest.mark.eval_cases("cases.jsonl")runs a test once per case
(eval_casefixture);assert_evalfails with each grader's reason and the run id. - Evals in the viewer.
agent-adapter uihas an Evals tab: every saved report with its
score, pass/fail, cost and time, per-tag and per-grader totals; each case with its input,
expected value, output, every grader's score and reason, and a link to its run; two
reports side by side with regressions marked (EvalReport.compare). Save reports with
run_eval(..., save_to=),save_report(report, folder)oragent-adapter eval --save;
agent-adapter ui --evals FOLDERpicks the folder (default.agent_adapter/evals). - Eval case results keep the case's
inputandexpectedtext. - Grader specs on the command line:
regex=,json-schema=,tools=,max-cost=,
max-latency=(module:attris always your own grader).--min-pass-rate,--no-content
(run_eval(capture_content=False)) andLLMJudge(trust_passed=). - Memory.
agent_adapter.memory:MemoryPort,SQLiteMemory(one file, FTS5 keyword
search with a LIKE fallback, optional vector search through anyEmbeddingPort),
CallableMemory, and lazyMem0Memory,ZepMemoryandGraphitiMemory(extrasmem0,
zep,graphiti).memory_tools()addsremember,recallandforgettools whose scope
comes from the context, never from the model. Searches never cross users. - Memory retention and privacy:
retention_daysandexpires_atare enforced on read and
purged on write;export(scope)serves data requests;delete(scope=MemoryScope(user_id=...))
erases a user. ToolContext.user_id: the authenticated end user, set by the host (Executor.context(user_id=)).- Events
memory.added,memory.searched,memory.deletedandmemory.exported(counts only). - Retrieval (RAG).
agent_adapter.retrieval:RetrieverPort,Document(id, text, score,
source),CallableRetriever, an in-memoryEmbeddingRetriever(scope_keyisolation),
LlamaIndexRetrieverandLangChainRetriever, andretriever_tool: a registry tool whose
results carry sources for citations, with host-setkand filters that every result is
re-checked against. Eventsretrieval.searchedandretrieval.failed(counts and ids; texts
only withcapture_content). agent-adapter doctoralso reports the memory extras and the LlamaIndex and LangChain
retrievers.- Chat memory across chats.
serve(..., memory=, user_id=, memory_save="none"|"summary"|"facts", memory_every=, recall_k=)andagent-adapter ui --memory sqlite:PATH --user NAME --memory-save ... --memory-every N --recall K. Each turn recalls the user's records from other chats as
session.memories(the built-in loop: a system note). Saving is opt-in: by the model, or by
the agent'ssave_memories.ctx.user_idis the chat's user, chats are kept per user, and
the inspector has a Memory tab to see and delete the user's records. - Approval memory in
agent_adapter.approval:approval_contextshows similar past
decisions (counts, deciders, outcomes; never argument values or secret fields) on chat
approval cards, in the Runs approvals desk, and inGET /approvals/{id}for approvers (the
TypeScriptApproval.context).propose_rulessuggestsfield == value/field <= limit
confirm rules;accept(rule, accepted_by=...)gives the code and config to commit, and the
confirm=callable. Nothing is ever approved from memory. - Viewer:
memory.*events show asmemoryspans in the timeline; run summaries carry a
memorycount, and a top-levelretrieval.failedcounts as a failure. agent_adapter.chat: the chat agent contract (ChatMessage,ChatSession,Attachment,
ChatAgent,ChatReply) in one place, used by the chat page and evals.agent_adapter.viewer
andagent_adapter.viewer.chatre-export the same classes.- Memory scopes:
thread_scopeis opt-in;scope_from_contextno longer gives anonymous
callers memory; SQLite erasure leaves no text in the file. - Crash-safe runs.
FlowRunner(checkpoints=store, checkpoint_key=KEY)saves a sealed
checkpoint after every superstep and logs every tool call.runner.recover(flow, run_id)and
runner.recover_all(flow)continue a crashed run on any worker, and calls that finished replay
instead of running again. A call left in doubt runs again only for anidempotent=Truetool or
withrerun_in_doubt=True; otherwiseRecoveryNeedsDecisionis raised. Two workers never both
continue a run (CheckpointConflict), and a changed graph refuses to recover.
idempotency_key()gives each call a key that is the same on every worker and recovery. run_tool_loop(..., run_id=, checkpoints=, checkpoint_key=)andrecover_tool_loop(...)do
the same for the tool loop.- Checkpoint stores in
agent_adapter.exec.checkpoints:MemoryCheckpointStore,
SQLiteCheckpointStore,RedisCheckpointStore(extraredis),SQLAlchemyCheckpointStore
(extrasqlalchemy), and theCheckpointStoreprotocol. New errorsCheckpointNotFound,
CheckpointConflict,CheckpointStoreCorrupt,RecoveryNeedsDecision; new events
checkpoint.savedandrun.recovered; the viewer's run summary carriesrecovered: true. - Durable engines. Run a
Flowon Temporal (extratemporal) or DBOS (extradbos). Each
superstep is one activity or step through your executor, so approvals, budgets, cache, ledger
and events apply; a retried step replays finished tool calls from the checkpoint store, and
runs carry aRunIdentity. Approvals stay in your approval store: a Temporal update or
signal, or a DBOS message (notify), only wakes the run to re-check the store, and the stored
decision is used once; a timeout records a denial.agent_adapter.integrations.temporal
(flow_worker,start_flow,notify,pending,result) and
agent_adapter.integrations.dbos(DbosFlows), over the sharedDurableFlows.
FlowRunner.inspect()andFlowRunner.on_superstepsupport them. - Sandboxed code. `agent_...