The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed AGENTS.md
Steven Enamakel950eec587d85
diff --git a/AGENTS.md b/AGENTS.mdindex 1f39afbd4d..74c417643a 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -728,6 +728,23 @@ So `GroupMode` has three states, not two:`Off` is the state that could not be said before, and it is the one an embedder reaches for most — absence beats a registered tool that fails, the same reasoning the `flows` compile gate already documents. Enforcement is two-sited and mirrors the existing filters: `Off` drops the tool in `all_tools_with_runtime`'s post-filter block (a third `retain`, right after the `DomainSet` and memory-capability ones), and `Withheld` is what `strip_packed_from_visible` acts on. **The three narrow, they never widen** — `Advertised` cannot conjure a tool that a Cargo gate compiled out or that the ambient `DomainSet` dropped.+### Three ways a tool leaves the wire, and how to pick++The fixed per-turn prefix is the system prompt plus every advertised tool schema. Three mechanisms shrink the second half, and they are **not** interchangeable — the criterion is how often a turn needs the capability:++| Mechanism | Cost when needed | Use for |+| --- | --- | --- |+| **Collapse** (`memory`, `cron`, `delegate_to`, `delegate_to_integrations_agent`) | none — one extra enum field on a call being made anyway | families a turn needs *often*, or that are near-identical to each other |+| **Pack** (`load_skill` / `use_skill`) | one round trip, per pack per conversation | capabilities most turns never touch — crypto, MCP setup, the `.pptx` writer |+| **Defer** (`ToolExposure::Deferred` + `tool_search`) | one round trip, per tool | a long tail on a wildcard belt, where the *group* is not the natural unit |++**A family of near-identical schemas hides from both ratchets, and that is how the biggest one survived.** `ArchetypeDelegationTool::parameters_schema` is a `json!` literal that never reads `self`, so all 16 synthesised delegates carried a byte-identical envelope: 17,746 B, **41% of the orchestrator's whole tool budget**, was one object sixteen times. Every individual tool sat under `check-prompt-budget.sh`'s 1,600 B attention threshold, so nothing flagged it, and the per-agent total shows a number without a cause. When looking for the next one, **group by schema body, not by size**.++Two rules fell out of doing that collapse, both learned from regressions that measurement caught and review did not:++- **Hiding a member is not enough on a `Named` belt.** `ToolExposure::Hidden` is applied by `strip_deferred_from_visible`, which deliberately runs **only for a wildcard belt** — a hand-written `[tools] named` list is already an answer to "what should this agent see". But synthesised delegates are force-inserted into that list by `factory.rs` and again by `refresh_delegation_tools`, so marking them Hidden changed nothing and the first version of the collapse made the budget go **up** (43,153 → 52,513 B). Both insertion points now skip a Hidden tool. That is the right place: those names were never chosen by a human, so skipping one takes nothing an author asked for.+- **A collapse must never widen what a pack narrowed.** Folding the delegates into one tool silently re-advertised seven routes the pack table withholds (`do_crypto`, `setup_mcp_server`, `use_mcp_server`, `setup_skills`, `run_skill`, `build_workflow`, `discover_workflows`). Each one stopped being a tool — so `strip_packed_from_visible` had nothing to remove — and came back as a *string inside another tool's schema*, where no visible-set subtraction reaches it. `toolpacks::is_withheld_from` is the predicate for exactly this case. **Check it whenever a surface moves from "a tool" to "a value"**: enum members, description tables and generated catalogues are all advertised surface that the `visible` set cannot police.+**Packs now carry an `owners` list, and a pack is skipped entirely for its owner.** This is new with the raw-tool packs and was not needed before: the original packs held only synthesised `delegate_*` tools, which exist on the orchestrator alone. A pack over raw tools is different — `settings_agent` exists precisely to run `config_*` / `health_*` / `service_*`, so withholding the `system` pack from it would put a `load_skill` round trip in front of the first call of every one of its turns and hide nothing that was idle. Its whole belt *is* the pack. `strip_packed_from_visible` therefore takes the agent id.**`DomainGroup` tracks family directories 1:1.** After the domain reorg (#5328) each variant names a `src/openhuman/` family, so the runtime axis stopped sweeping half the surface into the `Platform` catch-all. Groups: the harness families (`Agent`, `Memory`, `Threads`, `Config`, `Security`), the compile-gate families (`Flows`, `Skills`, `Mcp`, `Channels`, `Web3`, `Voice`, `Media`, `Medulla`), the families carved out of `Platform` (`Inference`, `Integrations`, `Automation` = cron, `Runtimes` = runtime + sandbox, `Desktop`, `Hosted`, `Relay` = tinyplace, `Modules` = the native module host), and `Platform` itself — now only the kernel surfaces with no family of their own (`platform/`, `tools/`, `http_host/`, `test_support/`).