Skip to main content
Version: 1.0.0

Security

Touba security starts with observable contracts: .tb source, AIR, manifest, scopes, opaque secrets, budgets, locks, and traces.

Available Controls​

ControlWhat it does
AIRcarries compiled requirements
explicit manifestgrants handler, capabilities, secrets, limits, and memories
secret handleskeep sensitive values out of .tb, AIR, manifest, and traces
agent secret scopeslimit handles usable by the active agent
secret lifecyclerefuses a revoked or expired handle before handler
callable_byrefuses unauthorized agent invocations
agent usesbounds resources selectable by an agentic decision
structured model inputseparates instructions, user data, resources, and observations
maxAgentStepslimits the sequential loop of a provider-driven agent
memory scopesrefuse memory access outside scope
tool payload validationrefuses invalid input/output before or after handler
controlled stoptraces cancel, global timeout, and kill switch in touba run
autonomy budgetsrefuse excess duration, steps, tool calls, agent invocations, and provider calls
required handler isolationwraps the process with the platform sandbox mechanism, without direct fallback
handler supply chainverifies coherence between AIR, manifest, handlers, SDK metadata, handler_package, package files, dependency artifacts, provenance, and declared review through an explicit lock
tracesmake authorizations, pauses, and refusals observable

Touba distinguishes structured model input for agentic decisions: developer instruction, user data, available resources, and runtime observations. This separation is a structural security boundary; prompt-injection detection remains a separate analysis layer.

Another available hardening point is controlled stop: distinguish pause, requested cancellation, effective cancellation, failure, and success. Touba exposes cooperative cancel, global timeout, and kill switch through touba run.

Autonomy budgets cover max_run_ms, max_steps, max_tool_calls, max_agent_invocations, max_provider_calls, and trigger quotas. They refuse execution outside these limits and produce budget traces.

Memory provenance and integrity are defined as observable metadata: origin, writer, run, reported digest, and integrity evidence. This framework helps audit memory access; truth and trust of content remain governed by the surrounding backend and review process.

Trace audit connects trace, AIR, source, artifact digests, declarative retention, and redaction policy. It makes a run explainable and verifiable through artifacts.

See also: Trace Audit.

Handler supply chain (SC-1 / SC-2 / SC-3) covers: sha256 digests for handlers, manifest, and AIR; command metadata; descriptive SDK metadata; declared handler_package identity; handler package files; declared dependency artifacts; provenance; declared review; explicit CLI validation; and lock/report inspection.

See also: Handler Supply Chain.

When sandbox.required: true, macOS uses sandbox-exec; Linux x64 combines bubblewrap, seccomp and Landlock. These backends deny out-of-scope data, writes, child processes and network access by default. A missing backend or unsupported policy prevents execution, with no direct-execution fallback. See the hardened execution profile for platform requirements and qualification status. Without a required sandbox, handlers remain trusted host code. See Manifest reference.

What Touba Refuses Before the Handler​

  • missing binding;
  • missing grant;
  • ungranted or unresolved secret;
  • revoked or expired secret;
  • secret not granted to the active agent;
  • missing memory scope;
  • invalid input payload;
  • unauthorized agent caller;
  • agentic capability outside uses;
  • sub-agent not authorized by callable_by;
  • agentic loop exceeding the configured step limit;
  • autonomy budget exceeded or manifest attempting to broaden an AIR limit.

Security Boundaries​

  • Touba grants are declared contract boundaries. Handler sandboxing is a separate platform control explicitly required per binding.
  • Traces and audit exports are engineering evidence; regulatory certification is a separate process.
  • Supply-chain locks make handler drift observable; handler safety still requires host-code review.
  • Data/instruction separation reduces a structural confusion; prompt-injection detection is a separate security analysis layer.
  • Verified / Unverified is reserved for a complete guaranteed chain.
  • Use low-privilege keys for live tests.
  • Never commit secret values.
  • Read traces after refusals.
  • Keep handlers small and testable.
  • Treat a handler as host code to audit.
  • Use distinct types for external content and instructions sent to a model.