Skip to content

Agreement Structure

An ASA agreement is a contract document that describes callable behavior in a machine-readable way.

Core fields

  • name
  • version
  • description
  • via
  • tags
  • interface.userCache
  • interface.functions

Function-level structure

Each function usually includes:

  • function name
  • summary
  • method
  • request structure
  • response structure
  • error list
  • auth requirement
  • transport binding

Why userCache exists

userCache is used to describe client-side or agent-side cached context names that help with multi-step execution, such as auth session or account context.

Practical rule

Keep agreements minimal and deterministic. If a field cannot be described consistently across providers, do not force excessive nesting or provider-specific details into the common contract.

Current constraints

  • Inheritance is currently unsupported.
  • Version folders should follow the agreement source repository conventions.

Validation recommendation

  • Use the agreement validator endpoint POST /agreements/validate for pre-checks before publish or sync.
  • Validator docs: Agreement Validator