Constitutions¶
An agent is created with a constitution that its spawner defines, encrypts for the agent and commits to publicly. The agent cannot run without it or with another one.
Content¶
| Field | Meaning |
|---|---|
name, role |
Name, and block or instance |
spawner |
Identity that defines and delegates the agent |
agent_key |
Key for which it is encrypted |
policy |
Genesis policy of the agent |
governance |
Keys, thresholds, recovery keys |
wot.contacts |
Initial trusted contacts with weights |
wot.params |
Parameters of the evaluation |
wot.autonomous |
routes, min_score, max_age_seconds for autonomous mode |
wot.max_slice_age_seconds |
Age after which local trust data is stale |
Birth of an agent¶
- The agent creates its key and waits. Its health endpoint shows
agent_key. - An administrator defines the constitution:
POST /v1/agentson the spawner. - The spawner encrypts it, stores it on the private relay, and anchors a commitment to its digest.
- The agent fetches and decrypts it, and verifies it against the anchored commitment.
- The agent creates an inception event with the policy and governance, and proves with a one-time claim that it is the intended agent.
- The spawner checks the inception against the constitution and approves the delegation.
- The agent anchors the constitution's digest and becomes active.
curl -X POST http://spawner/v1/agents -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" -d '{
"agent_key": "<hex>", "name": "worker", "role": "instance",
"policy": {"version": "1", "trusted_roots": ["<spawner aid>"], "rules": []},
"governance": {"keys": 1, "threshold": 1, "recovery_keys": 1},
"wot": {"contacts": [{"aid": "<spawner aid>", "weight": 1.0}], "params": {},
"autonomous": {"routes": ["/echo"], "min_score": 0.5, "max_age_seconds": 86400},
"max_slice_age_seconds": 300}
}'
An agent that already has a constitution cannot be given a different one.