Repository navigation
Expand file tree
/
Copy pathschema.json
More file actions
9125 lines (9125 loc) · 394 KB
/
Copy pathschema.json
File metadata and controls
9125 lines (9125 loc) · 394 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Agent Client Protocol",
"anyOf": [
{
"title": "Agent",
"description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"enum": ["2.0"]
}
},
"required": ["jsonrpc"],
"anyOf": [
{
"title": "Request",
"allOf": [
{
"$ref": "#/$defs/AgentRequest"
}
]
},
{
"title": "Response",
"allOf": [
{
"$ref": "#/$defs/AgentResponse"
}
]
},
{
"title": "Notification",
"allOf": [
{
"$ref": "#/$defs/AgentNotification"
}
]
}
]
},
{
"title": "Client",
"description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"enum": ["2.0"]
}
},
"required": ["jsonrpc"],
"anyOf": [
{
"title": "Request",
"allOf": [
{
"$ref": "#/$defs/ClientRequest"
}
]
},
{
"title": "Response",
"allOf": [
{
"$ref": "#/$defs/ClientResponse"
}
]
},
{
"title": "Notification",
"allOf": [
{
"$ref": "#/$defs/ClientNotification"
}
]
}
]
},
{
"title": "ProtocolLevel",
"description": "A message (request, response, or notification) with `\"jsonrpc\": \"2.0\"` specified as\n[required by JSON-RPC 2.0 Specification][1].\n\n[1]: https://www.jsonrpc.org/specification#compatibility",
"type": "object",
"properties": {
"jsonrpc": {
"type": "string",
"enum": ["2.0"]
},
"method": {
"description": "The notification method name.",
"type": "string"
},
"params": {
"description": "Method-specific notification parameters.",
"anyOf": [
{
"description": "Protocol-level notifications, which either side can send.\n\nTheir methods start with `$/`. Acting on one is optional, because it might not\nbe implementable in every Client or Agent. For example, a single-threaded\nsynchronous implementation can do little to react to a `$/cancel_request`\nnotification. An Agent or Client MAY ignore a `$/` notification it cannot act on.\n\nNotifications do not expect a response.",
"anyOf": [
{
"title": "CancelRequestNotification",
"description": "Cancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MAY cancel the corresponding request activity and all nested activities\n2. MAY send any pending notifications.\n3. MUST still send a response for the original request. If the request already finished\n or is not cancelled, that is its normal response. If it is cancelled, it is either the\n method's defined cancellation result (for example an inserted `session/prompt`, or a\n `cancelled` permission outcome) or an error with code `-32800` (Request cancelled).\n\nReceivers MUST ignore this notification for an unknown or already-answered request ID,\nand MUST NOT send a second response for it.\n\nSee protocol docs: [Request Cancellation](https://agentclientprotocol.com/protocol/v2/cancellation)",
"allOf": [
{
"$ref": "#/$defs/CancelRequestNotification"
}
]
}
]
},
{
"type": "null"
}
]
}
},
"required": ["jsonrpc", "method"],
"x-docs-ignore": true
}
],
"$defs": {
"AgentRequest": {
"description": "A JSON-RPC request object.",
"type": "object",
"properties": {
"id": {
"description": "The request id used to correlate the matching response.",
"allOf": [
{
"$ref": "#/$defs/RequestId"
}
]
},
"method": {
"description": "The method name to invoke.",
"type": "string"
},
"params": {
"description": "Method-specific request parameters.",
"anyOf": [
{
"description": "All possible requests that an Agent can send to a Client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly.\n\nThis enum encompasses all method calls from Agent to Client.",
"anyOf": [
{
"title": "RequestPermissionRequest",
"description": "Requests permission from the user for an operation.\n\nCalled by the Agent when it needs user authorization before executing\na potentially sensitive operation. The Client presents the options\nto the user and returns their decision.\n\nAfter `session/cancel`, the Agent stops waiting for requests of the cancelled\nforeground work and MUST cancel them with `$/cancel_request`. The Client\nanswers a cancelled request with the `cancelled` outcome.\n\nIf the selected option has kind `reject_once` or `reject_always`, the Agent MUST NOT\nperform the requested operation.\n\nAn error response is not approval, and neither is a connection that ends\nbefore the Client answers. The Agent MUST NOT treat either as approval.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/v2/tool-calls#requesting-permission)",
"allOf": [
{
"$ref": "#/$defs/RequestPermissionRequest"
}
]
},
{
"title": "CreateElicitationRequest",
"description": "Requests structured user input via a form or URL.\n\nSee protocol docs: [Elicitation](https://agentclientprotocol.com/protocol/v2/elicitation)",
"allOf": [
{
"$ref": "#/$defs/CreateElicitationRequest"
}
]
},
{
"title": "ExtMethodRequest",
"description": "Handles extension method requests from the Agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods are custom methods that are not part of the ACP spec.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)",
"allOf": [
{
"$ref": "#/$defs/ExtRequest"
}
]
}
]
},
{
"type": "null"
}
]
}
},
"required": ["id", "method"],
"x-docs-ignore": true
},
"RequestId": {
"description": "A JSON-RPC request ID: a string or an integer. Unlike base JSON-RPC, it MUST NOT be `null`.\n\nThe receiver MUST reply with the same value in the response. Each side chooses IDs for its own\nrequests, so the same ID can be in use in both directions. A sender MUST NOT reuse an ID while\na request with it is still awaiting a response.",
"anyOf": [
{
"title": "Number",
"description": "A numeric request ID.",
"type": "integer",
"format": "int64"
},
{
"title": "Str",
"description": "A string request ID.",
"type": "string"
}
]
},
"RequestPermissionRequest": {
"description": "Request for user permission to proceed with an operation.\n\nSent when the Agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/v2/tool-calls#requesting-permission)",
"type": "object",
"properties": {
"sessionId": {
"description": "The session ID for this request.",
"allOf": [
{
"$ref": "#/$defs/SessionId"
}
]
},
"title": {
"description": "Human-readable title shown with the permission prompt, in plain text.\n\nThis title is specific to the permission prompt and does not update any\nsubject's displayed title.",
"type": "string"
},
"description": {
"description": "Optional human-readable explanation of why permission is needed.\nMay contain Markdown.\n\nThis text is specific to the permission prompt and does not update any\nsubject's displayed content. Omitted and `null` are equivalent and mean no separate\npermission description was provided.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"subject": {
"description": "Optional structured context about the operation requiring permission.\n\nOmitted and `null` are equivalent and mean no structured subject was provided.",
"anyOf": [
{
"$ref": "#/$defs/RequestPermissionSubject"
},
{
"type": "null"
}
]
},
"options": {
"description": "Available permission options for the user to choose from.\nMust contain at least one option.",
"type": "array",
"items": {
"$ref": "#/$defs/PermissionOption"
},
"minItems": 1
},
"_meta": {
"description": "The _meta property is reserved by ACP to allow Clients and Agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT assign meaning to keys they do not recognize.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["sessionId", "title", "options"],
"x-side": "client",
"x-method": "session/request_permission",
"x-scope": {
"session": ["sessionId"],
"toolCall": ["subject.toolCall.toolCallId", "subject.toolCallId"]
},
"x-state": {
"session": [
{
"action": "upsert",
"target": "toolCall",
"id": "subject.toolCall.toolCallId",
"value": "subject.toolCall"
}
]
}
},
"SessionId": {
"description": "A unique identifier for a conversation session between a Client and Agent.\n\nEach session has its own context, conversation history, and state, so one\nAgent can run several independent sessions.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/v2/session-setup#session-id)",
"type": "string"
},
"RequestPermissionSubject": {
"description": "The operation requiring permission.",
"anyOf": [
{
"description": "Permission is requested before executing a tool call.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "tool_call"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/ToolCallPermissionSubject"
}
]
},
{
"description": "Permission is requested before running a command.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "command"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/CommandPermissionSubject"
}
]
},
{
"title": "other",
"description": "Custom or future permission subject.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients that do not understand this subject type SHOULD preserve the raw\npayload when storing, replaying, proxying, or forwarding permission\nrequests, and otherwise display a generic permission prompt or decline it\naccording to policy.",
"type": "object",
"properties": {
"type": {
"description": "Custom or future permission subject type.\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"
}
},
"required": ["type"],
"not": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "tool_call"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "command"
}
},
"required": ["type"]
}
]
},
"additionalProperties": true
}
]
},
"ToolCallUpdate": {
"description": "Represents an upsert for a tool call that the language model has requested.\n\nTool calls are actions that the Agent executes on behalf of the language model,\nsuch as reading files, executing code, or fetching data from external sources.\n\nOnly `toolCallId` is required. Other fields have patch semantics:\nomitted fields leave the existing tool call value unchanged, `null` clears or\nunsets the value, and concrete values replace the previous value. For\ncollection fields, concrete arrays replace the previous collection, and both\n`null` and `[]` clear the collection. A concrete `_meta` object instead\npatches the stored metadata by top-level key. When a Client receives a tool\ncall ID it has not seen before, omitted fields start at their protocol defaults.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/v2/tool-calls)",
"type": "object",
"properties": {
"toolCallId": {
"description": "Unique identifier for this tool call within the session.",
"allOf": [
{
"$ref": "#/$defs/ToolCallId"
}
]
},
"name": {
"description": "Programmatic name of the tool being invoked.\n\nThis field is optional and has patch semantics. Omission means no\nchange, `null` clears the name, and a string replaces it. For a tool\ncall ID the Client has not seen before, omission or `null` means that no\ntool name is available.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"title": {
"description": "Human-readable plain-text title describing what the tool is doing.\n\nOmission leaves the title unchanged, `null` unsets it, and a string replaces it.\nA new tool call starts without a title.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"kind": {
"description": "The category of tool being invoked.\nHelps Clients choose appropriate icons and UI treatment.\n\nOmission leaves the kind unchanged, `null` resets it to `other`, and a value replaces it.\nA new tool call starts as `other`.",
"anyOf": [
{
"$ref": "#/$defs/ToolKind"
},
{
"type": "null"
}
],
"x-deserialize-default-on-error": true
},
"status": {
"description": "Current execution status of the tool call.\n\nOmission leaves the status unchanged, `null` resets it to `pending`, and a value\nreplaces it. A new tool call starts as `pending`. Agents do not move a tool call\nback to `pending` once it has another status.",
"anyOf": [
{
"$ref": "#/$defs/ToolCallStatus"
},
{
"type": "null"
}
],
"x-deserialize-default-on-error": true
},
"content": {
"description": "Content produced by the tool call.",
"type": ["array", "null"],
"items": {
"$ref": "#/$defs/ToolCallContent"
},
"x-deserialize-default-on-error": true,
"x-deserialize-skip-invalid-items": true
},
"locations": {
"description": "File locations affected by this tool call.\nEnables \"follow-along\" features in Clients.",
"type": ["array", "null"],
"items": {
"$ref": "#/$defs/ToolCallLocation"
},
"x-deserialize-default-on-error": true,
"x-deserialize-skip-invalid-items": true
},
"rawInput": {
"description": "Raw input parameters sent to the tool.",
"x-deserialize-default-on-error": true
},
"rawOutput": {
"description": "Raw output returned by the tool.",
"x-deserialize-default-on-error": true
},
"capabilities": {
"description": "Client-initiated controls this tool call currently supports, such as cancellation.\n\nOmission leaves the capabilities unchanged, `null` clears them, and an object replaces\nthe whole previous value. A new tool call starts with none.",
"anyOf": [
{
"$ref": "#/$defs/ToolCallCapabilities"
},
{
"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. Omitted leaves the stored metadata unchanged. `null`\nclears it. An object patches the stored metadata by top-level key: keys it omits are\nunchanged, a key set to `null` is removed, and any other value replaces that key's\nstored value without merging nested objects. Beyond this patch rule, implementations\nMUST NOT assign meaning to keys they do not recognize.\n\nSee protocol docs: [Metadata Patches](https://agentclientprotocol.com/protocol/v2/extensibility#metadata-patches)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["toolCallId"]
},
"ToolCallId": {
"description": "Unique identifier for a tool call within a session.",
"type": "string"
},
"ToolKind": {
"description": "Categories of tools that can be invoked.\n\nTool kinds help Clients choose appropriate icons and optimize how they\ndisplay tool execution progress.\n\nSee protocol docs: [Reporting](https://agentclientprotocol.com/protocol/v2/tool-calls#reporting)",
"anyOf": [
{
"description": "Reading files or data.",
"type": "string",
"const": "read"
},
{
"description": "Modifying files or content.",
"type": "string",
"const": "edit"
},
{
"description": "Removing files or data.",
"type": "string",
"const": "delete"
},
{
"description": "Moving or renaming files.",
"type": "string",
"const": "move"
},
{
"description": "Searching for information.",
"type": "string",
"const": "search"
},
{
"description": "Running commands or code.",
"type": "string",
"const": "execute"
},
{
"description": "Internal reasoning or planning.",
"type": "string",
"const": "think"
},
{
"description": "Retrieving external data.",
"type": "string",
"const": "fetch"
},
{
"description": "Changing the session's mode, a [config option](https://agentclientprotocol.com/protocol/v2/session-config-options) with the `mode` category.",
"type": "string",
"const": "switch_mode"
},
{
"description": "Other tool types (default).",
"type": "string",
"const": "other"
},
{
"title": "unknown",
"description": "Custom or future tool kind.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants. Clients display an unrecognized kind as `other`.",
"type": "string"
}
]
},
"ToolCallStatus": {
"description": "Execution status of a tool call.\n\nTool calls progress through different statuses during their lifecycle.\n\nSee protocol docs: [Status](https://agentclientprotocol.com/protocol/v2/tool-calls#status)",
"anyOf": [
{
"description": "The tool call hasn't started running yet, for example because its input is\nstreaming, it is awaiting approval, or it is scheduled to run later.",
"type": "string",
"const": "pending"
},
{
"description": "The tool call is currently running.",
"type": "string",
"const": "in_progress"
},
{
"description": "The tool call has started, is not running now, and will not continue until\nsomething resumes it. It may return to `in_progress` any number of times.",
"type": "string",
"const": "paused"
},
{
"description": "The tool call completed successfully.",
"type": "string",
"const": "completed"
},
{
"description": "The tool call failed with an error.",
"type": "string",
"const": "failed"
},
{
"description": "The tool call was cancelled before it completed.",
"type": "string",
"const": "cancelled"
},
{
"title": "other",
"description": "Custom or future tool call status.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nClients treat a tool call with an unrecognized status as still in progress.",
"type": "string"
}
]
},
"ToolCallContent": {
"description": "Content produced by a tool call.\n\nTool calls can produce different types of content including standard\ncontent blocks (text, images), file diffs, or display-only terminals.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/tool-calls#content)",
"anyOf": [
{
"description": "Standard content block (text, images, resources).",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "content"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/Content"
}
]
},
{
"description": "File modification shown as a diff.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "diff"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/Diff"
}
]
},
{
"description": "A display-only reference to an Agent-owned terminal.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "terminal"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/Terminal"
}
]
},
{
"description": "A display-only reference to another session, such as a subagent.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "session"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/SessionReference"
}
]
},
{
"title": "other",
"description": "Custom or future tool call content.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this content type SHOULD preserve the\nraw payload when storing, replaying, proxying, or forwarding tool call\noutput, and otherwise ignore it or display it generically.",
"type": "object",
"properties": {
"type": {
"description": "Custom or future tool call content type.\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"
}
},
"required": ["type"],
"not": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "content"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "diff"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "terminal"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "session"
}
},
"required": ["type"]
}
]
},
"additionalProperties": true
}
]
},
"ContentBlock": {
"description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output reported through `session/update` notifications as\n message updates or streamed chunks\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), so Agents can\nforward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/content)",
"anyOf": [
{
"description": "Text content. May be plain text or formatted with Markdown.\n\nAll Agents MUST support text content blocks in prompts.\nClients SHOULD join adjacent text blocks without a separator before rendering.\nClients SHOULD render this text as CommonMark and MAY support GitHub Flavored Markdown\nextensions.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/TextContent"
}
]
},
{
"description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "image"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/ImageContent"
}
]
},
{
"description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "audio"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/AudioContent"
}
]
},
{
"description": "References to resources that the receiver may be able to read.\n\nAll Agents MUST support resource links in prompts.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "resource_link"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/ResourceLink"
}
]
},
{
"description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "resource"
}
},
"required": ["type"],
"allOf": [
{
"$ref": "#/$defs/EmbeddedResource"
}
]
},
{
"title": "other",
"description": "Custom or future content block.\n\nValues beginning with `_` are reserved for implementation-specific\nextensions. Unknown values that do not begin with `_` are reserved for\nfuture ACP variants.\n\nReceivers that do not understand this content block type SHOULD preserve\nthe raw payload when storing, replaying, proxying, or forwarding content,\nand otherwise ignore it or display it generically. Agents MUST reject a\n`session/prompt` request with a content block type they do not support\nwith `-32602`.",
"type": "object",
"properties": {
"type": {
"description": "Custom or future content block type.\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"
}
},
"required": ["type"],
"not": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "image"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "audio"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "resource_link"
}
},
"required": ["type"]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "resource"
}
},
"required": ["type"]
}
]
},
"additionalProperties": true
}
]
},
"Annotations": {
"description": "Optional annotations for the Client. The Client can use annotations to inform how objects are used or displayed",
"type": "object",
"properties": {
"audience": {
"description": "Intended recipients for this content, such as the user or assistant.\n\nOmitted and `null` are equivalent and mean no audience is specified.",
"type": ["array", "null"],
"items": {
"$ref": "#/$defs/Role"
},
"x-deserialize-default-on-error": true,
"x-deserialize-skip-invalid-items": true
},
"lastModified": {
"description": "Timestamp indicating when the underlying resource was last modified.\n\nShould be an ISO 8601 formatted string (e.g., \"2025-01-12T15:00:58Z\"), as in MCP.\n\nOmitted and `null` are equivalent and mean the modification time is not reported.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
"priority": {
"description": "Relative importance of this content when Clients choose what to surface, from 0 (least\nimportant) to 1 (most important).\n\nOmitted and `null` are equivalent and mean no priority is specified.",
"type": ["number", "null"],
"format": "double",
"minimum": 0,
"maximum": 1,
"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. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT assign meaning to keys they do not recognize.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
}
},
"Role": {
"description": "The sender or recipient of messages and data in a conversation.",
"anyOf": [
{
"description": "The assistant side of a conversation.",
"type": "string",
"const": "assistant"
},
{
"description": "The user side of a conversation.",
"type": "string",
"const": "user"
},
{
"title": "other",
"description": "Custom or future role.\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"
}
]
},
"TextContent": {
"description": "Text provided to or from an LLM.",
"type": "object",
"properties": {
"text": {
"description": "Text payload carried by this content block. It may be plain text or Markdown.",
"type": "string"
},
"annotations": {
"description": "Optional annotations that help Clients decide how to display or route this content.\n\nOmitted and `null` are equivalent and mean no annotations are provided.",
"anyOf": [
{
"$ref": "#/$defs/Annotations"
},
{
"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. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT assign meaning to keys they do not recognize.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["text"]
},
"MediaType": {
"description": "An Internet media type identifying the format of protocol content.",
"type": "string"
},
"ImageContent": {
"description": "An image provided to or from an LLM.",
"type": "object",
"properties": {
"data": {
"description": "Base64-encoded media payload.",
"type": "string",
"contentEncoding": "base64"
},
"mimeType": {
"description": "MIME type describing the encoded media payload.",
"allOf": [
{
"$ref": "#/$defs/MediaType"
}
]
},
"uri": {
"description": "URI associated with this resource or media payload.\n\nOmitted and `null` are equivalent and mean no URI is associated with the image.",
"type": ["string", "null"],
"format": "uri",
"x-deserialize-default-on-error": true
},
"annotations": {
"description": "Optional annotations that help Clients decide how to display or route this content.\n\nOmitted and `null` are equivalent and mean no annotations are provided.",
"anyOf": [
{
"$ref": "#/$defs/Annotations"
},
{
"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. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT assign meaning to keys they do not recognize.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["data", "mimeType"]
},
"AudioContent": {
"description": "Audio provided to or from an LLM.",
"type": "object",
"properties": {
"data": {
"description": "Base64-encoded media payload.",
"type": "string",
"contentEncoding": "base64"
},
"mimeType": {
"description": "MIME type describing the encoded media payload.",
"allOf": [
{
"$ref": "#/$defs/MediaType"
}
]
},
"annotations": {
"description": "Optional annotations that help Clients decide how to display or route this content.\n\nOmitted and `null` are equivalent and mean no annotations are provided.",
"anyOf": [
{
"$ref": "#/$defs/Annotations"
},
{
"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. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT assign meaning to keys they do not recognize.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["data", "mimeType"]
},
"Icon": {
"description": "An optionally-sized icon that can be displayed in a user interface.",
"type": "object",
"properties": {
"src": {
"description": "A standard URI pointing to an icon resource. May be an HTTP/HTTPS URL or a\n`data:` URI with Base64-encoded image data.\n\nClients MUST accept only `https:` and `data:` URIs, MUST fetch without\ncredentials, and MUST NOT follow redirects that change the scheme or origin.",
"type": "string",
"format": "uri"
},
"mimeType": {
"description": "Optional MIME type override if the source MIME type is missing or generic.\n\nOmitted and `null` are equivalent and mean the source MIME type is used.",
"anyOf": [
{
"$ref": "#/$defs/MediaType"
},
{