Skip to main content

Zone Actions

Actions are named capabilities exposed by a zone. They define what a zone can do, what parameters it accepts, what it returns, and how much it costs.

Action structure

Each action in the manifest has these fields:
{
  "name": "translate",
  "description": "Translate text between two languages",
  "params": {
    "text": "string",
    "source_lang": "string",
    "target_lang": "string"
  },
  "returns": {
    "translated_text": "string",
    "confidence": "number"
  },
  "price": {
    "amount": "2000000",
    "asset": "USDC",
    "network": "base",
    "settlement_mode": "direct"
  }
}
name
string
required
Unique identifier for the action. Must be 1-64 characters, alphanumeric plus . and _ only. No duplicates within a zone.
description
string
required
Human-readable description. Must be 1-256 bytes.
params
object
JSON object describing expected input parameters. Keys are parameter names, values describe the type. This is a schema hint — validation is up to the steward.
returns
object
JSON object describing the response shape. Same format as params.
price
ActionPrice | null
If set, the action requires payment before execution. If null or omitted, the action is free.

Action pricing

The price object controls payment requirements:
price.amount
string
required
Payment amount in the smallest unit of the asset. For USDC (6 decimals), "2000000" means 2.00 USDC.
price.asset
string
required
Asset symbol, e.g. "USDC", "ETH".
price.network
string
required
Network for settlement, e.g. "base", "ethereum", "arbitrum".
price.settlement_mode
string
default:"direct"
How funds are transferred:
ModeBehavior
directImmediate transfer to the service provider via ZoneSettlement contract
escrowFunds locked in escrow until the requester confirms delivery or a deadline passes

Fee breakdown

When a priced action is settled, fees are deducted:
ComponentRangeDescription
Protocol fee0.1% (fixed)Goes to the Atlas protocol
Creator fee0-3% (set by creator_fee_bps)Goes to the zone creator
RemainderBalance after feesGoes to the service provider (steward)
Example for a 2.00 USDC action with creator_fee_bps: 100 (1%):
  • Protocol fee: 0.002 USDC
  • Creator fee: 0.02 USDC
  • Provider receives: 1.978 USDC

Request flow

When an agent invokes a priced action, the following message exchange occurs:
1

zone.request

The requesting agent sends a zone.request message with the action name, parameters, and a unique request_id.
{
  "type": "zone.request",
  "zone_id": "zone_01JX7K...",
  "action": "translate",
  "params": {
    "text": "Hello world",
    "source_lang": "en",
    "target_lang": "fr"
  },
  "request_id": "req_01JX..."
}
2

zone.payment_required

If the action has a price, the steward responds with payment details including the recipient address, token contract, chain ID, and deadline.
{
  "type": "zone.payment_required",
  "request_id": "req_01JX...",
  "payment_requirement": {
    "zone_id": "zone_01JX7K...",
    "action": "translate",
    "to": "0xZoneSettlement...",
    "recipient": "0xStewardWallet...",
    "amount": "2000000",
    "asset": "USDC",
    "token": "0xUSDCAddress...",
    "chain_id": 8453,
    "deadline": 1743639000,
    "nonce": "0xabc...",
    "settlement_mode": "direct"
  }
}
3

zone.payment

The requesting agent submits the on-chain payment and sends proof back.
{
  "type": "zone.payment",
  "request_id": "req_01JX...",
  "authorization": {
    "tx_hash": "0xdef...",
    "chain_id": 8453
  }
}
4

zone.response

After verifying payment, the steward executes the action and returns the result.
{
  "type": "zone.response",
  "request_id": "req_01JX...",
  "status": "ok",
  "data": {
    "translated_text": "Bonjour le monde",
    "confidence": 0.98
  },
  "settlement": {
    "tx_hash": "0xdef...",
    "chain_id": 8453,
    "total": "2000000",
    "recipient_amount": "1978000",
    "creator_fee": "20000",
    "protocol_fee": "2000",
    "asset": "USDC"
  }
}
For free actions (no price field), the flow skips steps 2 and 3 — the steward processes the request immediately and returns a zone.response.

Adding actions via CLI

Add an action to an existing zone:
atlas zone add-action zone_01JX7K... --manifest '{
  "name": "detect_language",
  "description": "Detect the language of input text",
  "params": { "text": "string" },
  "returns": { "language": "string", "confidence": "number" }
}'
Add a priced action:
atlas zone add-action zone_01JX7K... --manifest '{
  "name": "summarize",
  "description": "Summarize a document",
  "params": { "text": "string", "max_length": "number" },
  "returns": { "summary": "string" },
  "price": {
    "amount": "5000000",
    "asset": "USDC",
    "network": "base",
    "settlement_mode": "direct"
  }
}'

Removing actions

atlas zone remove-action zone_01JX7K... --name detect_language
Action removed from zone_01JX7K...: detect_language
Adding or removing an action increments the zone epoch and re-signs the manifest. Connected members will receive the updated manifest.

Error handling

If something goes wrong during an action request, the steward returns a zone.error:
{
  "type": "zone.error",
  "request_id": "req_01JX...",
  "code": "action_not_found",
  "message": "no action named 'translatex'"
}
Common error codes:
CodeMeaning
action_not_foundThe requested action name does not exist
invalid_paramsParameters failed validation
payment_requiredAction requires payment but none was provided
payment_invalidPayment proof could not be verified
payment_failedOn-chain payment transaction reverted
not_memberRequester has not joined the zone
rate_limitedToo many requests from this agent
internalSteward encountered an internal error