Skip to content

Commit 71bf75e

Browse files
Add session/setTitle method for client-driven session renaming
1 parent 63dfd5f commit 71bf75e

16 files changed

Lines changed: 1054 additions & 0 deletions

File tree

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

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

14921492
</ResponseField>
14931493

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

@@ -6870,6 +6920,9 @@ Whether the agent supports `session/fork`.
68706920
<ResponseField name="resume" type={<><span><a href="#sessionresumecapabilities">SessionResumeCapabilities</a></span><span> | null</span></>} >
68716921
Whether the agent supports `session/resume`.
68726922
</ResponseField>
6923+
<ResponseField name="setTitle" type={<><span><a href="#sessionsettitlecapabilities">SessionSetTitleCapabilities</a></span><span> | null</span></>} >
6924+
Whether the agent supports `session/setTitle`.
6925+
</ResponseField>
68736926

68746927
## <span class="font-mono">SessionCloseCapabilities</span>
68756928

@@ -7327,6 +7380,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d
73277380

73287381
</ResponseField>
73297382

7383+
## <span class="font-mono">SessionSetTitleCapabilities</span>
7384+
7385+
Capabilities for the `session/setTitle` method.
7386+
7387+
By supplying `\{\}` it means that the agent supports setting session titles.
7388+
7389+
**Type:** Object
7390+
7391+
**Properties:**
7392+
7393+
<ResponseField name="_meta" type={"object | null"} >
7394+
The _meta property is reserved by ACP to allow clients and agents to attach additional
7395+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
7396+
these keys.
7397+
7398+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/draft/extensibility)
7399+
7400+
</ResponseField>
7401+
73307402
## <span class="font-mono">SessionUpdate</span>
73317403

73327404
Different types of updates that can be sent during session processing.

‎docs/protocol/v1/schema.mdx‎

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

720720
</ResponseField>
721721

722+
<a id="session-settitle"></a>
723+
### <span class="font-mono">session/setTitle</span>
724+
725+
Sets the title for a session.
726+
727+
Empty titles are valid and request that the agent clear the session title.
728+
729+
This method can be called at any time during a session, whether the Agent is
730+
idle or actively generating a response.
731+
732+
#### <span class="font-mono">SetSessionTitleRequest</span>
733+
734+
Request parameters for setting a session title.
735+
736+
**Type:** Object
737+
738+
**Properties:**
739+
740+
<ResponseField name="_meta" type={"object | null"} >
741+
The _meta property is reserved by ACP to allow clients and agents to attach additional
742+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
743+
these keys.
744+
745+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/extensibility)
746+
747+
</ResponseField>
748+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
749+
The ID of the session to set the title for.
750+
</ResponseField>
751+
<ResponseField name="title" type={"string"} required>
752+
The new title for the session.
753+
</ResponseField>
754+
755+
#### <span class="font-mono">SetSessionTitleResponse</span>
756+
757+
Response to `session/setTitle` method.
758+
759+
**Type:** Object
760+
761+
**Properties:**
762+
763+
<ResponseField name="_meta" type={"object | null"} >
764+
The _meta property is reserved by ACP to allow clients and agents to attach additional
765+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
766+
these keys.
767+
768+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/extensibility)
769+
770+
</ResponseField>
771+
722772
<a id="session-set_config_option"></a>
723773
### <span class="font-mono">session/set_config_option</span>
724774

@@ -2961,6 +3011,9 @@ Supplying `\{\}` means the agent supports deleting sessions from `session/list`.
29613011
<ResponseField name="resume" type={<><span><a href="#sessionresumecapabilities">SessionResumeCapabilities</a></span><span> | null</span></>} >
29623012
Whether the agent supports `session/resume`.
29633013
</ResponseField>
3014+
<ResponseField name="setTitle" type={<><span><a href="#sessionsettitlecapabilities">SessionSetTitleCapabilities</a></span><span> | null</span></>} >
3015+
Whether the agent supports `session/setTitle`.
3016+
</ResponseField>
29643017

29653018
## <span class="font-mono">SessionCloseCapabilities</span>
29663019

@@ -3331,6 +3384,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e
33313384

33323385
</ResponseField>
33333386

3387+
## <span class="font-mono">SessionSetTitleCapabilities</span>
3388+
3389+
Capabilities for the `session/setTitle` method.
3390+
3391+
By supplying `\{\}` it means that the agent supports setting session titles.
3392+
3393+
**Type:** Object
3394+
3395+
**Properties:**
3396+
3397+
<ResponseField name="_meta" type={"object | null"} >
3398+
The _meta property is reserved by ACP to allow clients and agents to attach additional
3399+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
3400+
these keys.
3401+
3402+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/extensibility)
3403+
3404+
</ResponseField>
3405+
33343406
## <span class="font-mono">SessionUpdate</span>
33353407

33363408
Different types of updates that can be sent during session processing.

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

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

1465+
<a id="session-settitle"></a>
1466+
### <span class="font-mono">session/setTitle</span>
1467+
1468+
Sets the title for a session.
1469+
1470+
Empty titles are valid and request that the agent clear the session title.
1471+
1472+
This method can be called at any time during a session, whether the Agent is
1473+
idle or actively generating a response.
1474+
1475+
#### <span class="font-mono">SetSessionTitleRequest</span>
1476+
1477+
Request parameters for setting a session title.
1478+
1479+
**Type:** Object
1480+
1481+
**Properties:**
1482+
1483+
<ResponseField name="_meta" type={"object | null"} >
1484+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1485+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1486+
these keys.
1487+
1488+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)
1489+
1490+
</ResponseField>
1491+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
1492+
The ID of the session to set the title for.
1493+
</ResponseField>
1494+
<ResponseField name="title" type={"string"} required>
1495+
The new title for the session.
1496+
</ResponseField>
1497+
1498+
#### <span class="font-mono">SetSessionTitleResponse</span>
1499+
1500+
Response to `session/setTitle` method.
1501+
1502+
**Type:** Object
1503+
1504+
**Properties:**
1505+
1506+
<ResponseField name="_meta" type={"object | null"} >
1507+
The _meta property is reserved by ACP to allow clients and agents to attach additional
1508+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
1509+
these keys.
1510+
1511+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)
1512+
1513+
</ResponseField>
1514+
14651515
<a id="session-set_config_option"></a>
14661516
### <span class="font-mono">session/set_config_option</span>
14671517

@@ -6683,6 +6733,9 @@ required by `session/prompt`.
66836733
<ResponseField name="resume" type={<><span><a href="#sessionresumecapabilities">SessionResumeCapabilities</a></span><span> | null</span></>} >
66846734
Whether the agent supports `session/resume`.
66856735
</ResponseField>
6736+
<ResponseField name="setTitle" type={<><span><a href="#sessionsettitlecapabilities">SessionSetTitleCapabilities</a></span><span> | null</span></>} >
6737+
Whether the agent supports `session/setTitle`.
6738+
</ResponseField>
66866739

66876740
## <span class="font-mono">SessionCloseCapabilities</span>
66886741

@@ -7135,6 +7188,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
71357188

71367189
</ResponseField>
71377190

7191+
## <span class="font-mono">SessionSetTitleCapabilities</span>
7192+
7193+
Capabilities for the `session/setTitle` method.
7194+
7195+
By supplying `\{\}` it means that the agent supports setting session titles.
7196+
7197+
**Type:** Object
7198+
7199+
**Properties:**
7200+
7201+
<ResponseField name="_meta" type={"object | null"} >
7202+
The _meta property is reserved by ACP to allow clients and agents to attach additional
7203+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
7204+
these keys.
7205+
7206+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)
7207+
7208+
</ResponseField>
7209+
71387210
## <span class="font-mono">SessionUpdate</span>
71397211

71407212
Different types of updates that can be sent during session processing.

‎docs/protocol/v2/schema.mdx‎

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

707+
<a id="session-settitle"></a>
708+
### <span class="font-mono">session/setTitle</span>
709+
710+
Sets the title for a session.
711+
712+
Empty titles are valid and request that the agent clear the session title.
713+
714+
This method can be called at any time during a session, whether the Agent is
715+
idle or actively generating a response.
716+
717+
#### <span class="font-mono">SetSessionTitleRequest</span>
718+
719+
Request parameters for setting a session title.
720+
721+
**Type:** Object
722+
723+
**Properties:**
724+
725+
<ResponseField name="_meta" type={"object | null"} >
726+
The _meta property is reserved by ACP to allow clients and agents to attach additional
727+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
728+
these keys.
729+
730+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)
731+
732+
</ResponseField>
733+
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
734+
The ID of the session to set the title for.
735+
</ResponseField>
736+
<ResponseField name="title" type={"string"} required>
737+
The new title for the session.
738+
</ResponseField>
739+
740+
#### <span class="font-mono">SetSessionTitleResponse</span>
741+
742+
Response to `session/setTitle` method.
743+
744+
**Type:** Object
745+
746+
**Properties:**
747+
748+
<ResponseField name="_meta" type={"object | null"} >
749+
The _meta property is reserved by ACP to allow clients and agents to attach additional
750+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
751+
these keys.
752+
753+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)
754+
755+
</ResponseField>
756+
707757
<a id="session-set_config_option"></a>
708758
### <span class="font-mono">session/set_config_option</span>
709759

@@ -2827,6 +2877,9 @@ required by `session/prompt`.
28272877
<ResponseField name="resume" type={<><span><a href="#sessionresumecapabilities">SessionResumeCapabilities</a></span><span> | null</span></>} >
28282878
Whether the agent supports `session/resume`.
28292879
</ResponseField>
2880+
<ResponseField name="setTitle" type={<><span><a href="#sessionsettitlecapabilities">SessionSetTitleCapabilities</a></span><span> | null</span></>} >
2881+
Whether the agent supports `session/setTitle`.
2882+
</ResponseField>
28302883

28312884
## <span class="font-mono">SessionCloseCapabilities</span>
28322885

@@ -3221,6 +3274,25 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e
32213274

32223275
</ResponseField>
32233276

3277+
## <span class="font-mono">SessionSetTitleCapabilities</span>
3278+
3279+
Capabilities for the `session/setTitle` method.
3280+
3281+
By supplying `\{\}` it means that the agent supports setting session titles.
3282+
3283+
**Type:** Object
3284+
3285+
**Properties:**
3286+
3287+
<ResponseField name="_meta" type={"object | null"} >
3288+
The _meta property is reserved by ACP to allow clients and agents to attach additional
3289+
metadata to their interactions. Implementations MUST NOT make assumptions about values at
3290+
these keys.
3291+
3292+
See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)
3293+
3294+
</ResponseField>
3295+
32243296
## <span class="font-mono">SessionUpdate</span>
32253297

32263298
Different types of updates that can be sent during session processing.

‎schema-generator/src/main.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,7 @@ starting with '$/' it is free to ignore the notification."
15561556
"session/fork" => self.agent.get("ForkSessionRequest").unwrap(),
15571557
"session/resume" => self.agent.get("ResumeSessionRequest").unwrap(),
15581558
"session/set_mode" => self.agent.get("SetSessionModeRequest").unwrap(),
1559+
"session/setTitle" => self.agent.get("SetSessionTitleRequest").unwrap(),
15591560
"session/set_config_option" => {
15601561
self.agent.get("SetSessionConfigOptionRequest").unwrap()
15611562
}

‎schema/v1/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"session_new": "session/new",
77
"session_load": "session/load",
88
"session_set_mode": "session/set_mode",
9+
"session_set_title": "session/setTitle",
910
"session_set_config_option": "session/set_config_option",
1011
"session_prompt": "session/prompt",
1112
"session_cancel": "session/cancel",

‎schema/v1/meta.unstable.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"session_new": "session/new",
1010
"session_load": "session/load",
1111
"session_set_mode": "session/set_mode",
12+
"session_set_title": "session/setTitle",
1213
"session_set_config_option": "session/set_config_option",
1314
"session_prompt": "session/prompt",
1415
"session_cancel": "session/cancel",

0 commit comments

Comments
 (0)