Skip to content

The Agentfile

One declarative file, enforced identically wherever the runtime is installed. This example uses every field the runtime actually consumes:

apiVersion: constle.dev/v1alpha1
kind: AgentManifest

identity:
  name: invoice-processor
  version: "1.0.0"
  owner: finance@company.com
  did: did:key:z6Mk...4doK        # from `constle identity create`; only the public DID lives here

sandbox:
  image: invoice-processor:latest
  isolation: kernel               # or omit — inferred from capabilities
  memory_mb: 512
  network:
    egress: restricted            # declared only — see limitation 5
    allowed_hosts:                # this list IS the network policy
      - api.groq.com

capabilities:                     # a flat list of strings, not a map
  - external_api
  - external_transfer

mcp:
  servers:
    - id: accounting
      url: https://mcp.accounting.internal   # host-side only; never enters the sandbox
      tools: [list_invoices, pay_invoice]    # optional allowlist
      pricing:                               # required for spending to be enforced
        meters:
          - usage_path: result.usage.input_tokens
            usd_per_unit: "0.000003"
          - usage_path: result.usage.output_tokens
            usd_per_unit: "0.000015"

spending:
  max_per_run_usd: "0.50"
  max_per_day_usd: "5.00"         # durable across runs; requires identity.did
  alerts:
    warn_at_pct_of_daily: 80

limits:
  max_duration_seconds: 300

human_gates:
  enabled: true
  require_approval_for:
    - pay_invoice                 # must exactly match an MCP tool name — limitation 1
  approval_timeout_seconds: 300
  on_timeout: abort               # default; stop, never proceed

a2a:
  listen: ":9443"
  peers:
    - name: auditor
      did: did:key:z6Mk...9xQz
      endpoint: https://auditor.internal:9443

compliance:
  audit_log_level: standard       # none | minimal | standard | verbose

constle init scaffolds a starter file with these defaults. Full field reference: spec/agent-manifest.md, plus spec/a2a.md and spec/identity.md.

spec/agent-manifest.yaml is an annotated reference file covering every supported field. It is executable, not aspirational — constle validate spec/agent-manifest.yaml passes, and fields that are parsed but not yet enforced are labelled as such inline.

Enforcement labels

The field reference tags every field with one of four labels. The distinction between the middle two is the one that matters: a DECLARED field parses, validates, and does nothing.

Label Meaning
Enforced The runtime actively prevents violations at execution time.
Validated Checked for well-formedness at parse time. Not enforced during execution.
Declared Parsed and audit-logged; the runtime does not act on it yet.
Informational Not read by the runtime at all. For humans and external tooling.

Full reference

  • Field reference — every section and field of the AgentManifest, with types, defaults, and enforcement labels.
  • Annotated example filespec/agent-manifest.yaml, executable rather than aspirational. constle validate passes on it.
  • A2A specification — envelope format, signing, and the peer model behind the a2a section.
  • Identity specificationdid:key generation, key storage, and how a run fails closed on a missing key.