Skip to content

Commit a8a6ab5

Browse files
Add session/setTitle method for client-driven session renaming
1 parent f9b753b commit a8a6ab5

13 files changed

Lines changed: 611 additions & 3 deletions

docs/protocol/draft/schema-v2.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,56 @@ See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/sess
15331533

15341534
</ResponseField>
15351535

1536+
<a id="session-settitle"></a>
1537+
### <span class="font-mono">session/setTitle</span>
1538+
1539+
Sets the title for a session.
1540+
1541+
Empty titles are valid and request that the agent clear the session title.
1542+
1543+
This method can be called at any time during a session, whether the Agent is
1544+
idle or actively generating a response.
1545+
1546+
#### <span class="font-mono">SetSessionTitleRequest</span>
1547+
1548+
Request parameters for setting a session title.
1549+
1550+
**Type:** Object
1551+
1552+
**Properties:**
1553+
1554+
<ResponseField name="_meta" type={"object | null"} >
1555+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1556+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1557+
these keys.
1558+
1559+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1560+
1561+
</ResponseField>
1562+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
1563+
The ID of the session to set the title for.
1564+
</ResponseField>
1565+
<ResponseField name="title" type={"string"} required>
1566+
The new title for the session.
1567+
</ResponseField>
1568+
1569+
#### <span class="font-mono">SetSessionTitleResponse</span>
1570+
1571+
Response to `session/setTitle` method.
1572+
1573+
**Type:** Object
1574+
1575+
**Properties:**
1576+
1577+
<ResponseField name="_meta" type={"object | null"} >
1578+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1579+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1580+
these keys.
1581+
1582+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1583+
1584+
</ResponseField>
1585+
15361586
<a id="session-set_config_option"></a>
15371587
### <span class="font-mono">session/set_config_option</span>
15381588

docs/protocol/draft/schema.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,56 @@ See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/sess
15331533

15341534
</ResponseField>
15351535

1536+
<a id="session-settitle"></a>
1537+
### <span class="font-mono">session/setTitle</span>
1538+
1539+
Sets the title for a session.
1540+
1541+
Empty titles are valid and request that the agent clear the session title.
1542+
1543+
This method can be called at any time during a session, whether the Agent is
1544+
idle or actively generating a response.
1545+
1546+
#### <span class="font-mono">SetSessionTitleRequest</span>
1547+
1548+
Request parameters for setting a session title.
1549+
1550+
**Type:** Object
1551+
1552+
**Properties:**
1553+
1554+
<ResponseField name="_meta" type={"object | null"} >
1555+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1556+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1557+
these keys.
1558+
1559+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1560+
1561+
</ResponseField>
1562+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
1563+
The ID of the session to set the title for.
1564+
</ResponseField>
1565+
<ResponseField name="title" type={"string"} required>
1566+
The new title for the session.
1567+
</ResponseField>
1568+
1569+
#### <span class="font-mono">SetSessionTitleResponse</span>
1570+
1571+
Response to `session/setTitle` method.
1572+
1573+
**Type:** Object
1574+
1575+
**Properties:**
1576+
1577+
<ResponseField name="_meta" type={"object | null"} >
1578+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1579+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1580+
these keys.
1581+
1582+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
1583+
1584+
</ResponseField>
1585+
15361586
<a id="session-set_config_option"></a>
15371587
### <span class="font-mono">session/set_config_option</span>
15381588

docs/protocol/schema.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,56 @@ See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/sess
599599

600600
</ResponseField>
601601

602+
<a id="session-settitle"></a>
603+
### <span class="font-mono">session/setTitle</span>
604+
605+
Sets the title for a session.
606+
607+
Empty titles are valid and request that the agent clear the session title.
608+
609+
This method can be called at any time during a session, whether the Agent is
610+
idle or actively generating a response.
611+
612+
#### <span class="font-mono">SetSessionTitleRequest</span>
613+
614+
Request parameters for setting a session title.
615+
616+
**Type:** Object
617+
618+
**Properties:**
619+
620+
<ResponseField name="_meta" type={"object | null"} >
621+
The _meta property is reserved by ACP to allow clients and agents to attach additional
622+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
623+
these keys.
624+
625+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
626+
627+
</ResponseField>
628+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
629+
The ID of the session to set the title for.
630+
</ResponseField>
631+
<ResponseField name="title" type={"string"} required>
632+
The new title for the session.
633+
</ResponseField>
634+
635+
#### <span class="font-mono">SetSessionTitleResponse</span>
636+
637+
Response to `session/setTitle` method.
638+
639+
**Type:** Object
640+
641+
**Properties:**
642+
643+
<ResponseField name="_meta" type={"object | null"} >
644+
The _meta property is reserved by ACP to allow clients and agents to attach additional
645+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
646+
these keys.
647+
648+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
649+
650+
</ResponseField>
651+
602652
<a id="session-set_config_option"></a>
603653
### <span class="font-mono">session/set_config_option</span>
604654

schema/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"session_prompt": "session/prompt",
1111
"session_resume": "session/resume",
1212
"session_set_config_option": "session/set_config_option",
13-
"session_set_mode": "session/set_mode"
13+
"session_set_mode": "session/set_mode",
14+
"session_set_title": "session/setTitle"
1415
},
1516
"clientMethods": {
1617
"fs_read_text_file": "fs/read_text_file",

schema/meta.unstable.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"session_resume": "session/resume",
2828
"session_set_config_option": "session/set_config_option",
2929
"session_set_mode": "session/set_mode",
30-
"session_set_model": "session/set_model"
30+
"session_set_model": "session/set_model",
31+
"session_set_title": "session/setTitle"
3132
},
3233
"clientMethods": {
3334
"elicitation_complete": "elicitation/complete",

schema/meta.v2.unstable.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"session_resume": "session/resume",
2828
"session_set_config_option": "session/set_config_option",
2929
"session_set_mode": "session/set_mode",
30-
"session_set_model": "session/set_model"
30+
"session_set_model": "session/set_model",
31+
"session_set_title": "session/setTitle"
3132
},
3233
"clientMethods": {
3334
"elicitation_complete": "elicitation/complete",

schema/schema.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,14 @@
268268
],
269269
"title": "SetSessionModeResponse"
270270
},
271+
{
272+
"allOf": [
273+
{
274+
"$ref": "#/$defs/SetSessionTitleResponse"
275+
}
276+
],
277+
"title": "SetSessionTitleResponse"
278+
},
271279
{
272280
"allOf": [
273281
{
@@ -696,6 +704,15 @@
696704
"description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
697705
"title": "SetSessionModeRequest"
698706
},
707+
{
708+
"allOf": [
709+
{
710+
"$ref": "#/$defs/SetSessionTitleRequest"
711+
}
712+
],
713+
"description": "Sets the title for a session.\n\nEmpty titles are valid and request that the agent clear the session title.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.",
714+
"title": "SetSessionTitleRequest"
715+
},
699716
{
700717
"allOf": [
701718
{
@@ -3123,6 +3140,45 @@
31233140
"x-method": "session/set_mode",
31243141
"x-side": "agent"
31253142
},
3143+
"SetSessionTitleRequest": {
3144+
"description": "Request parameters for setting a session title.",
3145+
"properties": {
3146+
"_meta": {
3147+
"additionalProperties": true,
3148+
"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)",
3149+
"type": ["object", "null"]
3150+
},
3151+
"sessionId": {
3152+
"allOf": [
3153+
{
3154+
"$ref": "#/$defs/SessionId"
3155+
}
3156+
],
3157+
"description": "The ID of the session to set the title for."
3158+
},
3159+
"title": {
3160+
"description": "The new title for the session.",
3161+
"type": "string"
3162+
}
3163+
},
3164+
"required": ["sessionId", "title"],
3165+
"type": "object",
3166+
"x-method": "session/setTitle",
3167+
"x-side": "agent"
3168+
},
3169+
"SetSessionTitleResponse": {
3170+
"description": "Response to `session/setTitle` method.",
3171+
"properties": {
3172+
"_meta": {
3173+
"additionalProperties": true,
3174+
"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)",
3175+
"type": ["object", "null"]
3176+
}
3177+
},
3178+
"type": "object",
3179+
"x-method": "session/setTitle",
3180+
"x-side": "agent"
3181+
},
31263182
"StopReason": {
31273183
"description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)",
31283184
"oneOf": [

schema/schema.unstable.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,14 @@
453453
],
454454
"title": "SetSessionModeResponse"
455455
},
456+
{
457+
"allOf": [
458+
{
459+
"$ref": "#/$defs/SetSessionTitleResponse"
460+
}
461+
],
462+
"title": "SetSessionTitleResponse"
463+
},
456464
{
457465
"allOf": [
458466
{
@@ -1313,6 +1321,15 @@
13131321
"description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
13141322
"title": "SetSessionModeRequest"
13151323
},
1324+
{
1325+
"allOf": [
1326+
{
1327+
"$ref": "#/$defs/SetSessionTitleRequest"
1328+
}
1329+
],
1330+
"description": "Sets the title for a session.\n\nEmpty titles are valid and request that the agent clear the session title.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.",
1331+
"title": "SetSessionTitleRequest"
1332+
},
13161333
{
13171334
"allOf": [
13181335
{
@@ -6535,6 +6552,45 @@
65356552
"x-method": "session/set_model",
65366553
"x-side": "agent"
65376554
},
6555+
"SetSessionTitleRequest": {
6556+
"description": "Request parameters for setting a session title.",
6557+
"properties": {
6558+
"_meta": {
6559+
"additionalProperties": true,
6560+
"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)",
6561+
"type": ["object", "null"]
6562+
},
6563+
"sessionId": {
6564+
"allOf": [
6565+
{
6566+
"$ref": "#/$defs/SessionId"
6567+
}
6568+
],
6569+
"description": "The ID of the session to set the title for."
6570+
},
6571+
"title": {
6572+
"description": "The new title for the session.",
6573+
"type": "string"
6574+
}
6575+
},
6576+
"required": ["sessionId", "title"],
6577+
"type": "object",
6578+
"x-method": "session/setTitle",
6579+
"x-side": "agent"
6580+
},
6581+
"SetSessionTitleResponse": {
6582+
"description": "Response to `session/setTitle` method.",
6583+
"properties": {
6584+
"_meta": {
6585+
"additionalProperties": true,
6586+
"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)",
6587+
"type": ["object", "null"]
6588+
}
6589+
},
6590+
"type": "object",
6591+
"x-method": "session/setTitle",
6592+
"x-side": "agent"
6593+
},
65386594
"StartNesRequest": {
65396595
"description": "Request to start an NES session.",
65406596
"properties": {

0 commit comments

Comments
 (0)