Daimonos An agent-optimized OS layer that makes AI coding agents faster and cheaper.** Daimonos replaces the built-in file, search, exec, and git tools in your AI coding agent with structured equivalents that return compact JSON instead of raw terminal output.
Daimonos
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**An agent-optimized OS layer that makes AI coding agents faster and cheaper.**
Daimonos replaces the built-in file, search, exec, and git tools in your AI
coding agent with structured equivalents that return compact JSON instead of
raw terminal output. The result: fewer tokens consumed, fewer round-trips, and
lower API costs — with zero changes to your workflow.
**Platforms:** Linux (x86_64, aarch64) and macOS (Apple Silicon, Intel).
Windows support is planned.
For repository agent/operator conventions, see AGENTS.md (especially
**Daimonos tool usage policy**).
The name comes from Greek *daimon* (agent/spirit), the etymological root of
"daemon."
The problem
When an AI agent runs cargo test, it gets back hundreds of lines of terminal
output — progress bars, compile messages, passing test names — when all it
needs is "47 passed, 0 failed." The agent pays for every token of that noise:
reading it, reasoning about it, and carrying it in context for the rest of the
session.
The same waste happens with git status, docker ps, ls -la, and every
other shell command. Agents spend 30-50% of their token budget on verbose,
unstructured tool output.
How it works
Daimonos runs as an MCP server that your
IDE or CLI spawns automatically. It provides the same operations agents already
use — read files, write files, search, execute commands, git operations — but
returns compact, structured JSON instead of raw text.
The single binary also provides ACP, one-shot agent, interactive chat, and
socket-daemon runtimes — a full coding-agent harness in its own right; see
Agent harness features below and
Runtime modes for the explicit subcommands and
compatibility aliases.
Four layers of optimization
1. **Native tool plugins** — git, cargo, gh, and docker are exposed as
first-class MCP tools with structured JSON output. When agents call
exec("cargo test"), Daimonos intercepts it and routes through the native
plugin instead.
2. **Semantic output filters** — For commands without native plugins (pytest,
make, pip install, eslint, etc.), Daimonos applies semantic compression:
test runners return summary + failures only, build commands return "ok" or
just the errors, install commands return success/failure.
3. **Protocol-level efficiency** — Read deduplication (re-reading an unchanged
file returns {"unchanged":true} instead of the full content), compact
field names, lazy tool exposure, batch operations, and a terse output
directive that cuts LLM prose by ~30%.
4. **Managed subprocess execution** — Command output is bounded while it is
read instead of after full buffering. Daimonos owns Unix process groups,
retires descendants on cancellation or session shutdown, isolates child
environments through an explicit allowlist, and stores background output
in private bounded artifacts.
Benchmark results
Tested with Claude Opus 4.6 on identical coding tasks (read files, search code,
edit, run tests, git operations):
| Metric | Baseline | Daimonos | Savings |
|--------|----------|----------|---------|
| Output tokens | 5,842 | 3,198 | **-45.3%** |
| Total tokens | 41,239 | 33,847 | **-17.9%** |
| Tool calls | 17 avg | 14 avg | **-17.6%** |
| Wall time | 42.1s avg | 35.2s avg | **-16.4%** |
Remote benchmarks on AWS (same hardware, same model, same tasks) showed
**20.3% cost reduction** and **14.0% faster** task completion.
SWE-bench Verified (mini) — three-way harness comparison
Five instances from swe-bench-verified-mini,
same model (Claude Opus 4.8) across all three harnesses, each agent running
inside the official SWE-bench Docker image for its instance (real test
environment), scored with the official swebench evaluation harness:
| Instance | daimonos tokens (LLM calls) | mini-swe-agent tokens (LLM calls) | cursor-agent tokens |
|---|---:|---:|---:|
| django__django-11815 | 54,755 (4) | 38,305 (9) | 113,242 |
| django__django-12155 | 53,773 (4) | 33,095 (9) | 348,425 |
| django__django-12708 | 88,765 (6) | 196,492 (22) | 451,349 |
| sphinx-doc__sphinx-8035 | 172,729 (10) | 342,108 (30) | 930,495 |
| sphinx-doc__sphinx-9367 | 66,812 (5) | 18,611 (6) | 230,223 |
| **Total tokens** | **436,834** | **628,611** | **2,073,734** |