Agents can now sign in to s2.dev with AgentID
S2 is an API for durable streams. With Sign in with AgentID, agents can create and return to an S2 account using their AgentMail identity.

An agent might need to collect events from a background job, send updates to another agent, or build a dashboard that shows users what is happening. Those tasks need somewhere to store updates and make them available to readers. S2 provides that through an API for durable streams.
With Sign in with AgentID, agents can now create and return to an S2 account using their AgentMail identity. This makes it easier to get started, whether the agent is using S2 for its own work or building an application for someone else.
In short
- S2 is a serverless API for durable streams: append records, read their history, and follow new records as they arrive.
- Use streams for live progress, agent-to-agent communication, event collection, or the recorded history behind application state.
- An agent can use S2 for its own tasks or as infrastructure for an application it is building.
- AgentID makes account setup and return visits easier by letting the agent sign in with its AgentMail identity.
- Stream operations use S2 access tokens, with permissions scoped to the resources and operations the application needs.
What is S2?
S2 stores data in durable, ordered streams. Append records as events happen, read from a retained position or timestamp, and keep reading as new records arrive. You can create a stream per session, job, device, or document. The hosted service manages the storage and serving infrastructure.
The stream can be where the data stays. Choose a retention period, including indefinite retention, and use the same read API to inspect old events and follow current activity. A browser, worker, or another agent can read independently using a scoped access token.
What could an agent use S2 for?
These patterns apply both to an agent carrying out a task and to an agent writing software for other people:
- Show task progress. Append updates from a long-running job and let a dashboard follow them live. A reader that disconnects can catch up from its last position.
- Communicate with another agent or worker. Use a stream as a durable channel. An acknowledged message remains available while retained, even if its recipient is offline; the recipient reads it when it runs. Every stream has its own URI (at
s2://{basin}/{stream}), and can be accessed directly over HTTP. - Collect and keep events. Append observations, logs, or completed conversation turns as they arrive. Read the retained history later for investigation or processing, then follow new events through the same API.
- Reconstruct session state. Record messages, tool results, and state changes. Application code can rebuild context from the log, optionally starting from a snapshot, when a new execution takes over.
How AgentID makes setup easier
AgentID is AgentMail's sign-in service for AI agents. It uses OpenID Connect, the same standard behind Sign in with Google, to supply a verified email address and a stable identifier associated with the agent's inbox. An agent can use that identity to create an S2 account and sign back in later.
Once signed in, the agent can obtain S2 access tokens and configure the streams its application needs. AgentID handles sign-in; the S2 API handles storing and reading data. The application still chooses how to organize its accounts, streams, and credentials.
The identity includes a working inbox, so the agent can receive and read account emails sent to that address.
Who controls what
| Stage | AgentID | S2 |
|---|---|---|
| Identity at sign-in | Supplies verified agent email and stable identifier through OpenID Connect | Accepts the sign-in, creates the account |
| Streams and appends | Not involved | Owns the API, ordering, and durability |
| Access tokens for stream operations | Not involved | Issues tokens with caller-selected scopes |
| Quotas, retention, and cleanup | Not involved | Enforces limits; applications configure retention and cleanup |
| Pricing and billing | Not involved | Controls both |
| Account email | Provides the inbox behind the identity | Decides which messages it sends |
Get started
- Open Sign in with AgentID on S2 and complete sign-in using your agent's AgentMail identity.
- Create an S2 access token in the dashboard and store it in the application's secret store.
- Follow the S2 quickstart to create a basin and stream, then append a record using the CLI or an SDK.
- Read the stream from another process. Read the existing records, then keep the read open to follow new updates.
For a small example, give a background task a stream such as jobs/report-123. Append status updates while it runs. A separate reader can display those updates, reconnect from its last position, and inspect the history after the task finishes.
The AgentID guide explains how to prepare an inbox identity and sign in from an assistant.
