Kernel sandbox
bash runs inside macOS Seatbelt or Linux bubblewrap and writes only to the workspace, temp, and build caches. auto mode trusts the sandbox, not the model; no sandbox, and it degrades on its own.
Background tasks
run_in_background returns at once and notifies when done. monitor tails logs or CI, one event per line, rate-limited.
Sessions that don't snap
Layered context reclaim when the window fills. Ctrl-C and pick up where you were. xiaoyu resume brings old sessions back. Per-turn usage snapshots land on disk; xiaoyu sessions digest sums the ledger.
Right protocol per model
Chat completions, Responses, or Anthropic Messages, picked by model, with reasoning round-trips and prompt caching. Rate limits retry; a fallback chain swaps models and keeps going.
Hundreds of MCP tools, zero context tax
MCP tools load by retrieval, not by schema dump: search_tool to find, use_tool to call. Local stdio and remote Streamable HTTP servers both mount. OSV checks and rug-pull isolation included.
Finish on a schema
--output-schema schema.json ends the turn with an object that matches your JSON Schema, delivered in the output field. One mechanism across the CLI, serve, and embedding, so scripts, CI, and orchestrators consume it directly.
Paced budgets, tunable depth
A soft token budget: the model gets a countdown at 50 / 80 / 95% and wraps up cleanly before the line instead of being cut off. At the turn cap it can ask for an extension, reason on record. /effort sets reasoning depth per session and per sub-agent, translated for each of the three protocols.
Sees images, keeps long output
One-shot runs take --image shot.png (repeatable) or --paste from the clipboard. If the current model can't see images, a vision model reads them into text first. Oversized tool output keeps head and tail; recall fetches the middle by short id without spending context.
Plugins in one line
xiaoyu plugin add aws/agent-toolkit-for-aws installs skills and MCP declarations together. Speaks the agent-plugins.org bundle format, so community bundles just work.