Skip to content

Commit aa232d5

Browse files
Add session/setTitle method for client-driven session renaming
1 parent 2b3c65b commit aa232d5

14 files changed

Lines changed: 660 additions & 3 deletions

File tree

‎docs/protocol/v1/draft/schema.mdx‎

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

15281528
</ResponseField>
15291529

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

‎docs/protocol/v1/schema.mdx‎

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

674674
</ResponseField>
675675

676+
<a id="session-settitle"></a>
677+
### <span class="font-mono">session/setTitle</span>
678+
679+
Sets the title for a session.
680+
681+
Empty titles are valid and request that the agent clear the session title.
682+
683+
This method can be called at any time during a session, whether the Agent is
684+
idle or actively generating a response.
685+
686+
#### <span class="font-mono">SetSessionTitleRequest</span>
687+
688+
Request parameters for setting a session title.
689+
690+
**Type:** Object
691+
692+
**Properties:**
693+
694+
<ResponseField name="_meta" type={"object | null"} >
695+
The _meta property is reserved by ACP to allow clients and agents to attach additional
696+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
697+
these keys.
698+
699+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/extensibility)
700+
701+
</ResponseField>
702+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
703+
The ID of the session to set the title for.
704+
</ResponseField>
705+
<ResponseField name="title" type={"string"} required>
706+
The new title for the session.
707+
</ResponseField>
708+
709+
#### <span class="font-mono">SetSessionTitleResponse</span>
710+
711+
Response to `session/setTitle` method.
712+
713+
**Type:** Object
714+
715+
**Properties:**
716+
717+
<ResponseField name="_meta" type={"object | null"} >
718+
The _meta property is reserved by ACP to allow clients and agents to attach additional
719+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
720+
these keys.
721+
722+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/extensibility)
723+
724+
</ResponseField>
725+
676726
<a id="session-set_config_option"></a>
677727
### <span class="font-mono">session/set_config_option</span>
678728

‎docs/protocol/v2/draft/schema.mdx‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,56 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
15041504
Initial session configuration options if supported by the Agent.
15051505
</ResponseField>
15061506

1507+
<a id="session-settitle"></a>
1508+
### <span class="font-mono">session/setTitle</span>
1509+
1510+
Sets the title for a session.
1511+
1512+
Empty titles are valid and request that the agent clear the session title.
1513+
1514+
This method can be called at any time during a session, whether the Agent is
1515+
idle or actively generating a response.
1516+
1517+
#### <span class="font-mono">SetSessionTitleRequest</span>
1518+
1519+
Request parameters for setting a session title.
1520+
1521+
**Type:** Object
1522+
1523+
**Properties:**
1524+
1525+
<ResponseField name="_meta" type={"object | null"} >
1526+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1527+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1528+
these keys.
1529+
1530+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)
1531+
1532+
</ResponseField>
1533+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
1534+
The ID of the session to set the title for.
1535+
</ResponseField>
1536+
<ResponseField name="title" type={"string"} required>
1537+
The new title for the session.
1538+
</ResponseField>
1539+
1540+
#### <span class="font-mono">SetSessionTitleResponse</span>
1541+
1542+
Response to `session/setTitle` method.
1543+
1544+
**Type:** Object
1545+
1546+
**Properties:**
1547+
1548+
<ResponseField name="_meta" type={"object | null"} >
1549+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1550+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1551+
these keys.
1552+
1553+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)
1554+
1555+
</ResponseField>
1556+
15071557
<a id="session-set_config_option"></a>
15081558
### <span class="font-mono">session/set_config_option</span>
15091559

‎docs/protocol/v2/schema.mdx‎

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,56 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e
655655
Initial session configuration options if supported by the Agent.
656656
</ResponseField>
657657

658+
<a id="session-settitle"></a>
659+
### <span class="font-mono">session/setTitle</span>
660+
661+
Sets the title for a session.
662+
663+
Empty titles are valid and request that the agent clear the session title.
664+
665+
This method can be called at any time during a session, whether the Agent is
666+
idle or actively generating a response.
667+
668+
#### <span class="font-mono">SetSessionTitleRequest</span>
669+
670+
Request parameters for setting a session title.
671+
672+
**Type:** Object
673+
674+
**Properties:**
675+
676+
<ResponseField name="_meta" type={"object | null"} >
677+
The _meta property is reserved by ACP to allow clients and agents to attach additional
678+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
679+
these keys.
680+
681+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)
682+
683+
</ResponseField>
684+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
685+
The ID of the session to set the title for.
686+
</ResponseField>
687+
<ResponseField name="title" type={"string"} required>
688+
The new title for the session.
689+
</ResponseField>
690+
691+
#### <span class="font-mono">SetSessionTitleResponse</span>
692+
693+
Response to `session/setTitle` method.
694+
695+
**Type:** Object
696+
697+
**Properties:**
698+
699+
<ResponseField name="_meta" type={"object | null"} >
700+
The _meta property is reserved by ACP to allow clients and agents to attach additional
701+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
702+
these keys.
703+
704+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)
705+
706+
</ResponseField>
707+
658708
<a id="session-set_config_option"></a>
659709
### <span class="font-mono">session/set_config_option</span>
660710

‎schema/meta.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"session_prompt": "session/prompt",
1212
"session_resume": "session/resume",
1313
"session_set_config_option": "session/set_config_option",
14-
"session_set_mode": "session/set_mode"
14+
"session_set_mode": "session/set_mode",
15+
"session_set_title": "session/setTitle"
1516
},
1617
"clientMethods": {
1718
"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_prompt": "session/prompt",
2828
"session_resume": "session/resume",
2929
"session_set_config_option": "session/set_config_option",
30-
"session_set_mode": "session/set_mode"
30+
"session_set_mode": "session/set_mode",
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
@@ -26,7 +26,8 @@
2626
"session_new": "session/new",
2727
"session_prompt": "session/prompt",
2828
"session_resume": "session/resume",
29-
"session_set_config_option": "session/set_config_option"
29+
"session_set_config_option": "session/set_config_option",
30+
"session_set_title": "session/setTitle"
3031
},
3132
"clientMethods": {
3233
"elicitation_complete": "elicitation/complete",

‎schema/schema.json‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@
308308
],
309309
"title": "SetSessionModeResponse"
310310
},
311+
{
312+
"allOf": [
313+
{
314+
"$ref": "#/$defs/SetSessionTitleResponse"
315+
}
316+
],
317+
"title": "SetSessionTitleResponse"
318+
},
311319
{
312320
"allOf": [
313321
{
@@ -751,6 +759,15 @@
751759
"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)",
752760
"title": "SetSessionModeRequest"
753761
},
762+
{
763+
"allOf": [
764+
{
765+
"$ref": "#/$defs/SetSessionTitleRequest"
766+
}
767+
],
768+
"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.",
769+
"title": "SetSessionTitleRequest"
770+
},
754771
{
755772
"allOf": [
756773
{
@@ -3299,6 +3316,45 @@
32993316
"x-method": "session/set_mode",
33003317
"x-side": "agent"
33013318
},
3319+
"SetSessionTitleRequest": {
3320+
"description": "Request parameters for setting a session title.",
3321+
"properties": {
3322+
"_meta": {
3323+
"additionalProperties": true,
3324+
"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)",
3325+
"type": ["object", "null"]
3326+
},
3327+
"sessionId": {
3328+
"allOf": [
3329+
{
3330+
"$ref": "#/$defs/SessionId"
3331+
}
3332+
],
3333+
"description": "The ID of the session to set the title for."
3334+
},
3335+
"title": {
3336+
"description": "The new title for the session.",
3337+
"type": "string"
3338+
}
3339+
},
3340+
"required": ["sessionId", "title"],
3341+
"type": "object",
3342+
"x-method": "session/setTitle",
3343+
"x-side": "agent"
3344+
},
3345+
"SetSessionTitleResponse": {
3346+
"description": "Response to `session/setTitle` method.",
3347+
"properties": {
3348+
"_meta": {
3349+
"additionalProperties": true,
3350+
"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)",
3351+
"type": ["object", "null"]
3352+
}
3353+
},
3354+
"type": "object",
3355+
"x-method": "session/setTitle",
3356+
"x-side": "agent"
3357+
},
33023358
"StopReason": {
33033359
"description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)",
33043360
"oneOf": [

0 commit comments

Comments
 (0)