For AI agents, typed APIs are 3–10× more token-efficient than shell parsing, with better error recovery, audit by default, and operator-supervisable policy gates.
An agent calling a typed capability spends fewer tokens describing what it wants, gets a structured response back, and doesn't have to grep its own stdout. Numbers below are illustrative — empirical ranges from our v0.0.1 traces.
Shell tools are powerful because they trust the caller. KruxOS capabilities are powerful because they don't have to.
The classic "agent typed the wrong path" failure mode.
rm -rf /important/dir
Gone. No trash, no recovery, no audit. The agent doesn't know it broke anything until the next test fails.
filesystem.delete({ path: "/important/dir" })
Soft-deletes to per-principal trash. 168h retention for User, 24h for Agent. Recover with filesystem.restore().
Where one mistake becomes thousands.
cat ./contacts.csv | mailx -s "Update" all@
Fires immediately. No cancellation window. Hits the SMTP server before the operator has read the agent's plan.
email.bulk_delete({ count: 1247 })
approval_required tier by default. Or email.send to lists is write-buffered with a 30s cancellation window.
The most common way agents leak.
export API_KEY=... && curl -H "Authorization: $API_KEY"
Secret lives in the agent's env, its shell history, its logs, and its next prompt. Any of those leak the lot.
secrets.use({ secret_id: "api_token_v1" })
Vault-backed, AES-256-GCM, use-not-read. The raw value never crosses the agent boundary — the gateway substitutes it server-side.
Audit isn't a feature you bolt on after the agent runs amok. It's the substrate.
A policy gate is overhead. Sometimes the overhead isn't worth it — and we'd rather you know than learn the hard way.
You're not running make or cargo build through a typed capability. The cost of writing a policy for a thing you'll never audit is higher than the risk it mitigates.
Some bespoke shell pipelines have been tuned for years. A typed capability is wider, friendlier, and slower. If your tooling outperforms what we'd ship — keep it.
Use KruxOS for what an AI is doing. The supervision surface, the audit surface, the policy surface — they all assume the actor is an agent. If the actor is you, you don't need them.
Sized right, KruxOS doesn't replace your shell. It replaces the shell your agent would have used — and gives you the supervisor's chair.