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
Security / Egress
The privacy epic's "egress spine" (#4436, #4441): a single, uniform answer to
"what leaves the device, to where, and why" for every external data transfer,
plus the LocalOnly enforcement chokepoint built on top of it.
Key files
| File | Purpose |
|---|---|
types.rs |
EgressDescriptor, DataKind, EgressReason, IdentificationRisk: the descriptor contract |
emit.rs |
emit_external_transfer, the single publish chokepoint, plus per-turn dedup |
enforce.rs |
local_only_blocks (pure decision) and its two side-effecting wrappers, enforce_egress / local_only_tool_block |
Public surface
EgressDescriptor:provider_slug(destination, e.g."openai","composio","openhuman_backend","network"),service(endpoint/model/ host),is_external(false for local runtimes, never published),reason: EgressReason,data_kinds: Vec<DataKind>, and the S5 forward-compat fieldsrisk_level: IdentificationRisk/risk_categories: Vec<String>(defaultUnknown/empty until the PII/identification-risk detector populates them). Built via semantic constructors,EgressDescriptor::inference,::composio,::integration,::embedding,::network_fetch, rather than the struct literal.emit_external_transfer(descriptor): the one call every external-egress point makes right before a transfer leaves the device. It drops non-external transfers, attaches best-effort chat routing from the turn'sApprovalChatContext(an argument, or carried by theEgressLedger), and fire-and-forget publishesDomainEvent::ExternalTransferPendingoncrate::core::bus::BUS. This never blocks or fails the caller.EgressLedger::per_turn()/emit_external_transfer_in(&ledger, d): an explicit per-turn dedup ledger, passed down the provider factory chain, so a single managed chat turn's multi-model fan-out (primary + workload-tier + summarizer builds) collapses repeated disclosures of the same destination into one event; every other call path emits unconditionally.local_only_blocks(mode, desc) -> bool: pure decision, blocks only whenmode == PrivacyMode::LocalOnly,desc.is_external, and the transfer is not an exempt backend control-plane round-trip (is_control_plane, private).StandardandSensitivenever block here.enforce_egress(desc) -> anyhow::Result<()>: thin wrapper foranyhow-returning egress sites (composio, integrations, cloud embeddings);Errwith a clean, non-sensitive message when blocked.local_only_tool_block(desc) -> Option<String>: thin wrapper for agent tools that returnOk(ToolResult::error(..))on denial; the message is prefixed withPOLICY_BLOCKED_MARKERso the harness treats it as a permanent, non-retryable block.
Both enforce_egress and local_only_tool_block read the live mode via
security::live_policy::current_privacy_mode, which defaults to
PrivacyMode::Standard (no restriction) when no session policy is installed
(CLI / cron / background), so enforcement is a correct no-op there.
Relates to
config/schema/privacy.rs:PrivacyMode(Standard/Sensitive/LocalOnly), the config-facing enumlocal_only_blocksmatches on.tinymemory_api::safety: the opt-in local identification-risk detector that will eventually populateEgressDescriptor::risk_level/risk_categoriesviaEgressDescriptor::with_risk.core/events.rs:DomainEvent::ExternalTransferPending { descriptor, thread_id, client_id }, the eventemit_external_transferpublishes.
Used by
memory/guard/policy.rs(HostGuardPolicy): memory-write egress guard.integrations/client/requests.rs,integrations/composio/client/execute.rs,integrations/composio/execute_dispatch.rs: backend and Composio calls.tools/impl/network/{curl,http_request,web_fetch}.rs: agent network-fetch tools.search/tools/{tavily/client,exa}.rs,inference/provider/factory.rsand itsfactory/submodules, and the TinyHumans managed embedding provider: search and hosted inference/embedding calls.web_chat/event_bus.rs: subscribes toExternalTransferPendingand bridges it to theexternal_transfer_pendingsocket event for the frontend.