Skip to main content
Version: 1.0.0

Agents as Code

In Touba, an agent’s responsibility is part of the program. Its capabilities, authorized callers and limits are declared in files the team can version, test and review before execution.

Declare a responsibility​

This fragment assigns case preparation to an agent. The PrepareCase skill is declared elsewhere in the program.

agent CaseReviewer
responsibility "Prepare a reimbursement case for human review."
uses PrepareCase
callable_by strategy ReviewReimbursements
DeclarationPurpose
responsibilityExplain the agent’s mission
usesDefine the capabilities it may select
callable_byIdentify declarations allowed to call it

The mission guides the model. Touba checks call contracts and permissions during execution.

Prepare, review, execute​

Inside an initialized project, preparation generates the required artifacts from the sources and project configuration:

touba prepare
touba prepare --mode check

Review four questions:

  1. Mission: what result should each agent produce?
  2. Access: which tools, agents, memories and secrets are accessible?
  3. Control: which approvals and limits apply?
  4. Evidence: which traces will explain the execution?

The Touba project guide covers preparation; the audit guide explains how to read executions and refusals.

Organize artifacts​

ItemTeam workflow
.tb sources, configuration and manifestsVersion contracts and review changes
Packages and integrity lockIdentify exact dependencies
AIR and execution planInspect the compiled program
Traces and audit reportsConnect an action to its execution and contract

Keep secrets and sensitive execution data in their designated storage. Before sharing a trace, apply the project’s redaction and export policy.

Continue reading​