anyagent
Build using the subscriptions your users already pay for.
One Up-to-date, feature-rich Rust interface to the agents already on a users machine.
Users have Claude Code, Codex, Grok, OpenCode, Kiro, and friends on their
machines — each with its own CLI, protocol, and quirks. If you're building an
app on top of them, you end up writing and maintaining a driver per agent.
anyagent is that layer, once: it finds the agents, speaks each one's protocol
(native or ACP), and gives you one typed
API — Runtime, Session, and a stream of Events.
Your app keeps its own transcript, UI, and policy. anyagent owns the processes, the wires, and the turn rules — every agent behaves the same way through it.

Use
[]
= "0.0.1"
use ;
use StreamExt;
let runtime = new;
let agent = runtime.discover.await.require?;
let = runtime.open.await?;
session.prompt.await?;
while let Some = events.next.await
session.close.await?;
That's the whole core flow. Everything else is the same few objects:
Features
| Capability | API |
|---|---|
| Discover installed agents and check login status | runtime.discover(), runtime.probe(agent) |
| Plan quota for the logged-in account | runtime.plan_usage(agent) |
| Send text, images, slash commands | session.prompt(input) |
| Steer or interrupt a running turn | session.prompt(..) mid-turn, session.cancel() |
| Answer a permission or question the agent raised | session.answer(id, answer) |
| Switch model / mode / any advertised option live | session.configure("model", "sonnet") |
| Resume, fork, or rewind a conversation | SessionOptions::resume / fork_from, session.rollback(..) |
| Add custom MCP Servers | SessionOptions::mcp_server(..) |
Events cover streamed text and reasoning, typed tool calls with diffs, plans,
token usage, permission requests, subagents, and turn boundaries — the same
EventKinds for every agent. Anything provider-specific rides in
extensions instead of leaking into the types.
Supported agents
| Agent | Wire |
|---|---|
| Claude Code | native (stream-json) |
| Codex | native (app-server) |
| Antigravity | native |
| Grok, Hermes Agent, opencode, Kiro CLI, Qwen Code | ACP |
Any other ACP agent works without a catalog entry via
AgentInstallation::acp(name, path, args).
License
MIT or Apache-2.0.