crates/protocol/src/agent_authorship.rs, agent_action.rs, agent_route.rs, and the task actor types. Persistence and admission are implemented in crates/gateway/src/authorization, crates/gateway/src/message, and the agent-domain repositories.
Identity, execution, and actor
These concepts are intentionally separate:
Agent identities can come from a native Pioneer agent, a configured CLI runtime instance, or an ephemeral execution. Retired identities remain useful for interpreting old records, while new work cannot silently reuse their active role.
Agent ids are stable ASCII identifiers. Nicknames are lowercase ASCII tokens. Display names, role labels, and avatars are presentation data with bounded sizes. The timeline stores an
AgentPresentationSnapshot when work is authored, so changing an agent’s current name or avatar does not rewrite history.
Work graph
The work graph connects:Authored presentation
Timeline rows use the presentation snapshot captured at authorship time. The snapshot includes:- agent identity id;
- execution id;
- source kind and source revision;
- display name and nickname;
- avatar revision;
- role presentation.
Delegation routes
An agent does not inherit all of the initiating principal’s permissions when it delegates. The gateway creates an explicitAgentDelegationRoute with:
- source execution and destination thread;
- execution-bound or identity-bound route kind;
- a finite action list;
- disclosure policy for text, artifacts, context, user input, and result return;
- source and destination policy generations;
- hop count and maximum hop count;
- grant fingerprint and expiry;
- optional destination identity, profile, and return route.
send_message, start_agent, create_task, schedule_task, review_task_result, and deliver_result. Result return is independent of ordinary text disclosure. Allowing a message does not implicitly allow a full task result to cross the route.
Route creation validates the source and destination workspace and gateway, action uniqueness, non-empty disclosure, expiry, generation, hop boundaries, and return-route compatibility. The graph validator rejects cycles and excessive edges. A route is usable only while its status is active, its lease is valid, and the admission-time policy facts still match.
Admission and revalidation
The gateway checks an agent action at the point where it can create an effect. This matters for delayed tasks and detached work because the principal, workspace membership, thread visibility, or permission cap may have changed since the route was created. Admission combines:- the authenticated principal or parent execution;
- the stored agent identity and execution actor;
- the route action and disclosure policy;
- the destination workspace and thread authorization;
- the current policy generation and execution limits;
- the task, turn, artifact, and delivery contract.
Failure and lifecycle rules
An identity can be active or retired. A route can be prepared, active, expired, or revoked. An execution can finish independently of its parent task, but it cannot use a stale route after authorization changes. The gateway records route revocations and task or turn termination reasons so recovery does not accidentally resume work under an obsolete actor. When agent work appears in the UI, clients should combine task and turn projections. Use the task tree for lifecycle and result state, timeline rows for authored presentation, and capability snapshots for controls. Do not infer an agent’s access from its nickname or role label.Related pages
- Identity, authentication, and authorization explains principal and session access.
- Tasks architecture explains child runs, review, delivery, and write locks.
- Permission system explains turn-level policy caps.
- Agent domain API lists route methods and public projections.
- CLI runtime architecture explains runtime-backed agent identities.
- Timeline and turns explains how authored work reaches clients.