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
11 changes: 8 additions & 3 deletions MIGRATION_STABLE_UNSTABLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ narrowing helpers.
Before:

```ts
import { client, methods, type SystemPrompt } from "@agentclientprotocol/sdk";
import {
client,
methods,
type ForkSessionRequest,
} from "@agentclientprotocol/sdk";
```

After:
Expand All @@ -69,7 +73,7 @@ After:
import {
client,
methods,
type SystemPrompt,
type ForkSessionRequest,
} from "@agentclientprotocol/sdk/unstable";
```

Expand Down Expand Up @@ -108,7 +112,8 @@ of APIs that require `/unstable` include:

- Session forking and provider configuration.
- MCP-over-ACP types and method constants.
- `systemPrompt` on session lifecycle requests and its advertised capabilities.
- `systemPrompt` on `session/fork`. On `session/new`, `session/load` (v1), and
`session/resume` it is stable.
- Turn `usage` on v1 prompt responses and usage on v2 idle state updates.
- Subagent capabilities and session updates.
- Additional plan representations and `plan_removed` updates. V1's existing
Expand Down
153 changes: 153 additions & 0 deletions schema/v1/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2565,6 +2565,18 @@
],
"x-deserialize-default-on-error": true
},
"systemPrompt": {
"description": "Whether the agent supports `systemPrompt` on session lifecycle requests.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports `systemPrompt` in `append` mode.",
"anyOf": [
{
"$ref": "#/$defs/SessionSystemPromptCapabilities"
},
{
"type": "null"
}
],
"x-deserialize-default-on-error": true
},
"resume": {
"description": "Whether the agent supports `session/resume`.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports resuming sessions.",
"anyOf": [
Expand Down Expand Up @@ -2633,6 +2645,66 @@
}
}
},
"SessionSystemPromptCapabilities": {
"description": "Capabilities for client-provided system prompts.\n\nSupplying `{}` means the agent supports `systemPrompt` on session lifecycle\nrequests in `append` mode.",
"type": "object",
"properties": {
"mode": {
"description": "Delivery modes the agent supports in addition to `append`.\n\nOptional. Omitted or `null` both mean the agent supports only `append`.",
"anyOf": [
{
"$ref": "#/$defs/SessionSystemPromptModeCapabilities"
},
{
"type": "null"
}
],
"x-deserialize-default-on-error": true
},
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
}
},
"SessionSystemPromptModeCapabilities": {
"description": "System prompt delivery modes the agent supports in addition to `append`.\n\n`append` has no entry because every agent advertising\n`sessionCapabilities.systemPrompt` supports it.",
"type": "object",
"properties": {
"override": {
"description": "Whether the agent supports `override` mode.\n\nOptional. Omitted or `null` both mean the agent does not advertise support.\nSupplying `{}` means the agent supports replacing its built-in default\ninstructions with the client-provided system prompt.",
"anyOf": [
{
"$ref": "#/$defs/SessionSystemPromptOverrideCapabilities"
},
{
"type": "null"
}
],
"x-deserialize-default-on-error": true
},
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
}
},
"SessionSystemPromptOverrideCapabilities": {
"description": "Capabilities for the `override` system prompt mode.\n\nSupplying `{}` means the agent supports replacing its built-in default\ninstructions with the client-provided system prompt.",
"type": "object",
"properties": {
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
}
},
"SessionResumeCapabilities": {
"description": "Capabilities for the `session/resume` method.\n\nSupplying `{}` means the agent supports resuming sessions.",
"type": "object",
Expand Down Expand Up @@ -5005,6 +5077,17 @@
},
"x-deserialize-default-on-null": true
},
"systemPrompt": {
"description": "System-level instructions for the new session.\n\nOptional. Omitted and `null` are equivalent and mean the Agent uses its\nown default instructions. Clients MUST only send this when the Agent\nadvertises `sessionCapabilities.systemPrompt`.",
"anyOf": [
{
"$ref": "#/$defs/SystemPrompt"
},
{
"type": "null"
}
]
},
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
Expand Down Expand Up @@ -5178,6 +5261,54 @@
},
"required": ["name", "command", "args", "env"]
},
"SystemPrompt": {
"description": "Client-provided system-level instructions for a session.\n\nClients MUST only send this when the Agent advertises\n`sessionCapabilities.systemPrompt`. Agents that cannot apply it, for example\nbecause of an unadvertised mode or an unsupported content block type, MUST\nreturn an error instead of creating, loading, or resuming the session.",
"type": "object",
"properties": {
"mode": {
"description": "How the Agent combines `content` with its own instructions.\n\nRequired. Agents MUST return an error for a mode they do not support rather than\ntreating it as `append` or `override`.",
"allOf": [
{
"$ref": "#/$defs/SystemPromptMode"
}
]
},
"content": {
"description": "The system prompt content.\n\nAgents advertising the capability MUST accept `text` content blocks.\nClients MUST NOT send other content block types until a future\ncapability allows them, and Agents MUST return an error for content\nblocks they do not support.\n\nClients MUST NOT send an empty array. Agents MAY reject one with\n`-32602` without creating, loading, or resuming the session.",
"type": "array",
"items": {
"$ref": "#/$defs/ContentBlock"
}
},
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["mode", "content"]
},
"SystemPromptMode": {
"description": "How the Agent combines a client-provided system prompt with its own instructions.\n\nUnknown modes are preserved so they can be stored,\nproxied, or forwarded. An Agent MUST return an error for a mode it does not\nsupport rather than treating it as `append` or `override`.",
"anyOf": [
{
"description": "Add the content to the Agent's own instructions rather than replacing them.\n\nEvery Agent that advertises `sessionCapabilities.systemPrompt` supports this mode.\nAgents SHOULD give the content system-level precedence, for example in the\nmodel's system prompt or developer instructions rather than in user-turn\ncontent. Where it is placed and how it is formatted is implementation-defined.",
"type": "string",
"const": "append"
},
{
"description": "Replace the Agent's built-in default instructions with the content.\n\nThis does not change tool availability, MCP servers, permissions, or session\nconfiguration. Context the Agent supplies from the workspace or environment\nMAY still be included. Clients that use this mode take responsibility for any\ntool guidance or safety instructions the Agent's default instructions\nprovided, and MUST only use it when the Agent advertises\n`sessionCapabilities.systemPrompt.mode.override`.",
"type": "string",
"const": "override"
},
{
"title": "other",
"description": "Custom or future system prompt mode.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.",
"type": "string"
}
]
},
"LoadSessionRequest": {
"description": "Request parameters for loading an existing session.\n\nOnly available if the Agent supports the `loadSession` capability.\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/v1/session-setup#loading-sessions)",
"type": "object",
Expand Down Expand Up @@ -5210,6 +5341,17 @@
}
]
},
"systemPrompt": {
"description": "System-level instructions for the loaded session.\n\nOptional. Omitted and `null` are equivalent. The Agent may then keep a\nsystem prompt it stored with the session or use its default instructions.\nClients MUST only send this when the Agent advertises\n`sessionCapabilities.systemPrompt`, and SHOULD send the same value they used\nwhen the session was created.",
"anyOf": [
{
"$ref": "#/$defs/SystemPrompt"
},
{
"type": "null"
}
]
},
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
Expand Down Expand Up @@ -5298,6 +5440,17 @@
},
"x-deserialize-default-on-null": true
},
"systemPrompt": {
"description": "System-level instructions for the resumed session.\n\nOptional. Omitted and `null` are equivalent. The Agent may then keep a\nsystem prompt it stored with the session or use its default instructions.\nClients MUST only send this when the Agent advertises\n`sessionCapabilities.systemPrompt`, and SHOULD send the same value they used\nwhen the session was created.",
"anyOf": [
{
"$ref": "#/$defs/SystemPrompt"
},
{
"type": "null"
}
]
},
"_meta": {
"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/v1/extensibility)",
"type": ["object", "null"],
Expand Down
Loading
Loading