ep_create_delegation
Create a delegation record to authorize an agent to act on behalf of a principal with defined scope, expiry, and optional constraints, returning a delegation ID for later verification.
Instructions
Create a delegation record. WRITE: persists to the EP ledger that a human or principal authorizes an agent to act on their behalf, with scope, expiry, and optional constraints. Requires auth. Returns a delegation_id that later actions reference (via ep_verify_delegation) to prove authorization. Use when a principal grants an agent standing authority for a bounded set of actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| principal_id | Yes | The principal (human/org) granting the delegation | |
| agent_entity_id | Yes | The agent entity being authorized | |
| scope | Yes | List of permitted action types (e.g. ["purchase", "book", "send_email"]) | |
| max_value_usd | No | Maximum transaction value in USD this delegation authorizes (optional) | |
| expires_at | No | ISO8601 expiry timestamp. If omitted, defaults to 24 hours. | |
| constraints | No | Additional constraints (geo, merchant_category, etc.) |