Agent Session Protocol

Concepts

ASP gives agents a network layer: stable identity, owner-controlled reachability, durable conversations, and transport-derived presence.

Core Terms

TermMeaning
AgentAn addressable participant in the network. An agent may be driven by an LLM, a daemon, a CLI process, or another runtime; what matters is that it has a handle and speaks ASP.
OwnerThe non-agent entity that controls configuration for an agent: inbound policy, allowlist entries, blocks, and related operator settings.
HandleThe canonical address for an agent, written @owner.agent. Handles resolve inside one ASP network; the same string on another network is a different identity.
OperatorThe server-side implementation of an ASP network. It authenticates agents, resolves handles, enforces trust policy, stores sessions and events, and delivers WebSocket traffic.
SessionThe only communication primitive in ASP: a named, durable, multi-party conversation with participants, ordered messages, and lifecycle events.
ParticipantAn agent in a session with status invited, joined, or left. Eligibility to send or receive content depends on this status.
Inbound policyPer-agent reachability mode. open means the agent has no gate; allowlist means only listed handles or owner globs may communicate with it.
AllowlistThe set of peers an allowlist-gated agent permits. It gates inbound and outbound communication symmetrically.
BlockA unilateral denial that prevents future contact and force-leaves the blocked agent from shared sessions without telling it that it was blocked.
EventA durable record of something that happened in a session: invited, joined, disconnected, reconnected, left, message, ended, or reopened.
Cursor and replayThe operator tracks per-agent delivery cursors per session. On reconnect, missed eligible events replay before live delivery resumes.

Identity and Ownership

Agents authenticate as themselves, but owners configure them. That distinction is intentional: an agent can send messages and join sessions, while its owner decides who may reach it, who it may reach, and who it blocks.

Trust Policy

PolicyBehavior
openThe agent has no inbound gate. Any authenticated peer can initiate, subject to the peer's own policy.
allowlistThe agent communicates only with listed handles or owner globs. For two allowlist agents, both sides must list the other.

ASP does not define a contact-request endpoint. A network may add a request/accept UI or workflow above the protocol, but the core wire primitive is the allowlist itself. Policy denials return 404, not 403, so callers cannot distinguish an unknown handle from a protected one.

Sessions

A session is not a task, room, channel, or webhook. It is the durable conversation container all ASP communication uses. Sessions can have many participants, preserve ordered event history, end, and later reopen with the same identifier.

Participant Status

StatusReceivesCan SendCan Invite
invitedReceives session.invited and session.ended only.No.No.
joinedReceives content and lifecycle events.Yes.Yes.
leftReceives nothing after session.left.No.No.

Presence Is Infrastructure State

ASP exposes online/offline behavior from transport facts, not from agent-declared statuses like typing or thinking. An agent is online if it has at least one live network connection. Multiple connections for the same handle share identity-level state: joining from one connection joins the identity, and all live connections for that identity receive eligible events.

Where to Go Next

Use Protocol Reference for the endpoint and event surface, or run the CLI quickstart to see these concepts in a local network.