Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ categories = ["development-tools", "api-bindings"]
include = ["/src/**/*.rs", "/README.md", "/LICENSE", "/Cargo.toml"]

[features]
unstable = ["unstable_session_model", "unstable_session_list", "unstable_session_fork", "unstable_cancel_request"]
unstable = ["unstable_session_model", "unstable_session_list", "unstable_session_fork", "unstable_session_resume", "unstable_cancel_request"]
unstable_cancel_request = []
unstable_session_model = []
unstable_session_list = []
unstable_session_fork = []
unstable_session_resume = []

[[bin]]
name = "generate"
Expand Down
115 changes: 115 additions & 0 deletions docs/protocol/draft/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,90 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
Indicates why the agent stopped processing the turn.
</ResponseField>

<a id="session-resume"></a>
### <span class="font-mono">session/resume</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Resumes an existing session without returning previous messages.

This method is only available if the agent advertises the `session.resume` capability.

The agent should resume the session context, allowing the conversation to continue
without replaying the message history (unlike `session/load`).

#### <span class="font-mono">ResumeSessionRequest</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Request parameters for resuming an existing session.

Resumes an existing session without returning previous messages (unlike `session/load`).
This is useful for agents that can resume sessions but don't implement full session loading.

Only available if the Agent supports the `session.resume` capability.

**Type:** Object

**Properties:**

<ResponseField name="_meta" type={"object | null"} >
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>
<ResponseField name="cwd" type={"string"} required>
The working directory for this session.
</ResponseField>
<ResponseField name="mcpServers" type={<><span><a href="#mcpserver">McpServer</a></span><span>[]</span></>} >
List of MCP servers to connect to for this session.
</ResponseField>
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
The ID of the session to resume.
</ResponseField>

#### <span class="font-mono">ResumeSessionResponse</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Response from resuming an existing session.

**Type:** Object

**Properties:**

<ResponseField name="_meta" type={"object | null"} >
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>
<ResponseField name="models" type={<><span><a href="#sessionmodelstate">SessionModelState</a></span><span> | null</span></>} >
**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Initial model state if supported by the Agent

</ResponseField>
<ResponseField name="modes" type={<><span><a href="#sessionmodestate">SessionModeState</a></span><span> | null</span></>} >
Initial mode state if supported by the Agent

See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)

</ResponseField>

<a id="session-set_mode"></a>
### <span class="font-mono">session/set_mode</span>

Expand Down Expand Up @@ -2759,6 +2843,14 @@ This capability is not part of the spec yet, and may be removed or changed at an

Whether the agent supports `session/list`.

</ResponseField>
<ResponseField name="resume" type={<><span><a href="#sessionresumecapabilities">SessionResumeCapabilities</a></span><span> | null</span></>} >
**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Whether the agent supports `session/resume`.

</ResponseField>

## <span class="font-mono">SessionForkCapabilities</span>
Expand Down Expand Up @@ -2930,6 +3022,29 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
The current model the Agent is in.
</ResponseField>

## <span class="font-mono">SessionResumeCapabilities</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Capabilities for the `session/resume` method.

By supplying `\{\}` it means that the agent supports resuming of sessions.

**Type:** Object

**Properties:**

<ResponseField name="_meta" type={"object | null"} >
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.

See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)

</ResponseField>

## <span class="font-mono">SessionUpdate</span>

Different types of updates that can be sent during session processing.
Expand Down
1 change: 1 addition & 0 deletions schema/meta.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"session_load": "session/load",
"session_new": "session/new",
"session_prompt": "session/prompt",
"session_resume": "session/resume",
"session_set_mode": "session/set_mode",
"session_set_model": "session/set_model"
},
Expand Down
101 changes: 101 additions & 0 deletions schema/schema.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
{
"$ref": "#/$defs/ForkSessionResponse"
},
{
"$ref": "#/$defs/ResumeSessionResponse"
},
{
"$ref": "#/$defs/SetSessionModeResponse"
},
Expand Down Expand Up @@ -606,6 +609,14 @@
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nForks an existing session to create a new independent session.\n\nThis method is only available if the agent advertises the `session.fork` capability.\n\nThe agent should create a new session with the same conversation context as the\noriginal, allowing operations like generating summaries without affecting the\noriginal session's history."
},
{
"allOf": [
{
"$ref": "#/$defs/ResumeSessionRequest"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResumes an existing session without returning previous messages.\n\nThis method is only available if the agent advertises the `session.resume` capability.\n\nThe agent should resume the session context, allowing the conversation to continue\nwithout replaying the message history (unlike `session/load`)."
},
{
"allOf": [
{
Expand Down Expand Up @@ -2254,6 +2265,74 @@
"required": ["name", "uri"],
"type": "object"
},
"ResumeSessionRequest": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for resuming an existing session.\n\nResumes an existing session without returning previous messages (unlike `session/load`).\nThis is useful for agents that can resume sessions but don't implement full session loading.\n\nOnly available if the Agent supports the `session.resume` capability.",
"properties": {
"_meta": {
"additionalProperties": true,
"description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)",
"type": ["object", "null"]
},
"cwd": {
"description": "The working directory for this session.",
"type": "string"
},
"mcpServers": {
"description": "List of MCP servers to connect to for this session.",
"items": {
"$ref": "#/$defs/McpServer"
},
"type": "array"
},
"sessionId": {
"allOf": [
{
"$ref": "#/$defs/SessionId"
}
],
"description": "The ID of the session to resume."
}
},
"required": ["sessionId", "cwd"],
"type": "object",
"x-method": "session/resume",
"x-side": "agent"
},
"ResumeSessionResponse": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse from resuming an existing session.",
"properties": {
"_meta": {
"additionalProperties": true,
"description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)",
"type": ["object", "null"]
},
"models": {
"anyOf": [
{
"$ref": "#/$defs/SessionModelState"
},
{
"type": "null"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
},
"modes": {
"anyOf": [
{
"$ref": "#/$defs/SessionModeState"
},
{
"type": "null"
}
],
"description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
}
},
"type": "object",
"x-method": "session/resume",
"x-side": "agent"
},
"Role": {
"description": "The sender or recipient of messages and data in a conversation.",
"enum": ["assistant", "user"],
Expand Down Expand Up @@ -2308,6 +2387,17 @@
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/list`."
},
"resume": {
"anyOf": [
{
"$ref": "#/$defs/SessionResumeCapabilities"
},
{
"type": "null"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the agent supports `session/resume`."
}
},
"type": "object"
Expand Down Expand Up @@ -2479,6 +2569,17 @@
"x-method": "session/update",
"x-side": "client"
},
"SessionResumeCapabilities": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for the `session/resume` method.\n\nBy supplying `{}` it means that the agent supports resuming of sessions.",
"properties": {
"_meta": {
"additionalProperties": true,
"description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)",
"type": ["object", "null"]
}
},
"type": "object"
},
"SessionUpdate": {
"description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)",
"discriminator": {
Expand Down
Loading