@agentmc/api 0.2.5 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,10 @@ Generated from `spec/openapi.filtered.json`.
5
5
  | Operation ID | Method | Path | Tags |
6
6
  | --- | --- | --- | --- |
7
7
  | [agentHeartbeat](./agentHeartbeat.md) | POST | `/agents/{agent}/heartbeat` | Agents |
8
- | [agentInstructions](./agentInstructions.md) | GET | `/agents/{agent}/agent-instructions` | Agents |
9
8
  | [authenticateAgentRealtimeSocket](./authenticateAgentRealtimeSocket.md) | POST | `/agents/{agent}/realtime/sessions/{session}/socket-auth` | Agents |
10
9
  | [claimAgentRealtimeSession](./claimAgentRealtimeSession.md) | POST | `/agents/{agent}/realtime/sessions/{session}/claim` | Agents |
11
10
  | [closeAgentRealtimeSession](./closeAgentRealtimeSession.md) | POST | `/agents/{agent}/realtime/sessions/{session}/close` | Agents |
12
11
  | [commentCalendarItem](./commentCalendarItem.md) | POST | `/calendar/items/{item}/comments` | Calendar |
13
- | [connectAgent](./connectAgent.md) | POST | `/agents/connect` | Agents |
14
12
  | [createAgentBrief](./createAgentBrief.md) | POST | `/briefs` | Briefs |
15
13
  | [createAgentRealtimeSignal](./createAgentRealtimeSignal.md) | POST | `/agents/{agent}/realtime/sessions/{session}/signals` | Agents |
16
14
  | [createBoard](./createBoard.md) | POST | `/boards` | Boards |
@@ -24,6 +22,7 @@ Generated from `spec/openapi.filtered.json`.
24
22
  | [deleteCalendarItem](./deleteCalendarItem.md) | DELETE | `/calendar/items/{item}` | Calendar |
25
23
  | [deleteTask](./deleteTask.md) | DELETE | `/tasks/{task}` | Tasks |
26
24
  | [deleteTaskComment](./deleteTaskComment.md) | DELETE | `/tasks/{task}/comments/{comment}` | Tasks |
25
+ | [getAgentInstructions](./getAgentInstructions.md) | GET | `/agents/instructions` | Agents |
27
26
  | [listAgentBriefs](./listAgentBriefs.md) | GET | `/briefs` | Briefs |
28
27
  | [listAgentRealtimeRequestedSessions](./listAgentRealtimeRequestedSessions.md) | GET | `/agents/{agent}/realtime/sessions/requested` | Agents |
29
28
  | [listAgentRealtimeSignals](./listAgentRealtimeSignals.md) | GET | `/agents/{agent}/realtime/sessions/{session}/signals` | Agents |
@@ -1,19 +1,19 @@
1
- # agentInstructions
1
+ # getAgentInstructions
2
2
 
3
3
  - Method: `GET`
4
- - Path: `/agents/{agent}/agent-instructions`
5
- - Summary: Return agent instructions for a connected agent using bearer auth.
4
+ - Path: `/agents/instructions`
5
+ - Summary: Fetch the AgentMC instruction bundle for the authenticated agent.
6
6
  - Auth: AgentBearerAuth
7
7
 
8
8
  ## Description
9
9
 
10
- No additional description.
10
+ Returns managed runtime files and bundle metadata. Send current_bundle_version to fetch files only when the bundle has changed.
11
11
 
12
12
  ## Parameters
13
13
 
14
14
  | Name | In | Required | Description | Example |
15
15
  | --- | --- | --- | --- | --- |
16
- | agent | path | yes | Agent identifier. | 1 |
16
+ | current_bundle_version | query | no | Last applied instruction bundle version from local runtime state. | "bundle_2fa07fcadd6575cc" |
17
17
 
18
18
  ## Request Example
19
19
 
@@ -22,15 +22,29 @@ None.
22
22
  ## Success Responses
23
23
 
24
24
  ### 200 (application/json)
25
- Agent instructions returned.
25
+ Instruction bundle returned.
26
26
 
27
27
  ```json
28
28
  {
29
- "agent_instructions": "# Agent Instructions",
30
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
31
- "docs": [],
32
- "schedules": [],
33
- "config": {}
29
+ "ok": true,
30
+ "changed": true,
31
+ "bundle_version": "bundle_2fa07fcadd6575cc",
32
+ "generated_at": "2026-02-25T14:10:00Z",
33
+ "defaults": {
34
+ "heartbeat_interval_seconds": 300
35
+ },
36
+ "agent": {
37
+ "id": 42,
38
+ "name": "Agent"
39
+ },
40
+ "files": [
41
+ {
42
+ "id": "skill.md",
43
+ "path": ".agentmc/skills/skill.md",
44
+ "content": "# AgentMC\n",
45
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
46
+ }
47
+ ]
34
48
  }
35
49
  ```
36
50
 
@@ -75,8 +89,8 @@ Forbidden.
75
89
  }
76
90
  ```
77
91
 
78
- ### 404 (application/json)
79
- Resource not found.
92
+ ### 422 (application/json)
93
+ Validation failed.
80
94
 
81
95
  ```json
82
96
  {
@@ -104,10 +118,10 @@ const client = new AgentMCApi({
104
118
  agentToken: process.env.AGENTMC_AGENT_TOKEN
105
119
  });
106
120
 
107
- const result = await client.operations.agentInstructions({
121
+ const result = await client.operations.getAgentInstructions({
108
122
  "params": {
109
- "path": {
110
- "agent": 1
123
+ "query": {
124
+ "current_bundle_version": "bundle_2fa07fcadd6575cc"
111
125
  }
112
126
  }
113
127
  });
@@ -122,7 +136,7 @@ if (result.error) {
122
136
  ## cURL Example
123
137
 
124
138
  ```bash
125
- curl -X GET "https://agentmc.ai/api/v1/agents/1/agent-instructions" \\
139
+ curl -X GET "https://agentmc.ai/api/v1/agents/instructions?current_bundle_version=bundle_2fa07fcadd6575cc" \\
126
140
  -H "Accept: application/json" \\
127
141
  -H "Authorization: Bearer $AGENTMC_AGENT_TOKEN"
128
142
  ```
@@ -205,104 +205,6 @@
205
205
  }
206
206
  ]
207
207
  },
208
- {
209
- "operationId": "agentInstructions",
210
- "method": "get",
211
- "path": "/agents/{agent}/agent-instructions",
212
- "summary": "Return agent instructions for a connected agent using bearer auth.",
213
- "description": "",
214
- "tags": [
215
- "Agents"
216
- ],
217
- "security": [
218
- [
219
- "AgentBearerAuth"
220
- ]
221
- ],
222
- "parameters": [
223
- {
224
- "name": "agent",
225
- "in": "path",
226
- "required": true,
227
- "description": "Agent identifier.",
228
- "example": 1
229
- }
230
- ],
231
- "requestBodyRequired": false,
232
- "requestExamples": [],
233
- "responses": [
234
- {
235
- "status": "200",
236
- "mediaType": "application/json",
237
- "description": "Agent instructions returned.",
238
- "hasContent": true,
239
- "example": {
240
- "agent_instructions": "# Agent Instructions",
241
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
242
- "docs": [],
243
- "schedules": [],
244
- "config": {}
245
- }
246
- },
247
- {
248
- "status": "401",
249
- "mediaType": "application/json",
250
- "description": "Missing or invalid credentials.",
251
- "hasContent": true,
252
- "example": {
253
- "error": {
254
- "code": "validation.failed",
255
- "message": "Validation failed.",
256
- "details": {
257
- "fields": {
258
- "title": [
259
- "The title field is required."
260
- ]
261
- }
262
- }
263
- }
264
- }
265
- },
266
- {
267
- "status": "403",
268
- "mediaType": "application/json",
269
- "description": "Forbidden.",
270
- "hasContent": true,
271
- "example": {
272
- "error": {
273
- "code": "validation.failed",
274
- "message": "Validation failed.",
275
- "details": {
276
- "fields": {
277
- "title": [
278
- "The title field is required."
279
- ]
280
- }
281
- }
282
- }
283
- }
284
- },
285
- {
286
- "status": "404",
287
- "mediaType": "application/json",
288
- "description": "Resource not found.",
289
- "hasContent": true,
290
- "example": {
291
- "error": {
292
- "code": "validation.failed",
293
- "message": "Validation failed.",
294
- "details": {
295
- "fields": {
296
- "title": [
297
- "The title field is required."
298
- ]
299
- }
300
- }
301
- }
302
- }
303
- }
304
- ]
305
- },
306
208
  {
307
209
  "operationId": "authenticateAgentRealtimeSocket",
308
210
  "method": "post",
@@ -912,158 +814,6 @@
912
814
  }
913
815
  ]
914
816
  },
915
- {
916
- "operationId": "connectAgent",
917
- "method": "post",
918
- "path": "/agents/connect",
919
- "summary": "Connect and register one agent using a short-lived connect token.",
920
- "description": "",
921
- "tags": [
922
- "Agents"
923
- ],
924
- "security": [
925
- [
926
- "ConnectTokenAuth"
927
- ]
928
- ],
929
- "parameters": [],
930
- "requestBodyRequired": true,
931
- "requestExamples": [
932
- {
933
- "mediaType": "application/json",
934
- "example": {
935
- "host": "ip-10-0-3-42",
936
- "runtime_version": "2026.02.1",
937
- "capabilities": [
938
- "tasks",
939
- "calendar",
940
- "realtime"
941
- ],
942
- "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
943
- "models": [
944
- {
945
- "model_id": "openai/gpt-5-codex",
946
- "provider": "openai"
947
- },
948
- {
949
- "model_id": "anthropic/claude-sonnet-4-20250514",
950
- "provider": "anthropic"
951
- }
952
- ],
953
- "identity": {
954
- "name": "Jarvis",
955
- "creature": "robot",
956
- "vibe": "calm"
957
- },
958
- "metadata": {
959
- "hostname": "worker-01",
960
- "ip": "10.0.2.15",
961
- "network": {
962
- "private_ip": "10.0.2.15",
963
- "public_ip": "34.201.22.9"
964
- },
965
- "os": "Ubuntu",
966
- "os_version": "22.04",
967
- "arch": "x86_64",
968
- "cpu": "Intel Xeon",
969
- "cpu_cores": 8,
970
- "ram_gb": 32,
971
- "disk": {
972
- "total_bytes": 512110190592,
973
- "free_bytes": 321102110720
974
- },
975
- "uptime_seconds": 86400,
976
- "runtime": {
977
- "name": "codex",
978
- "version": "2026.02.1"
979
- },
980
- "identity": {
981
- "name": "Jarvis"
982
- }
983
- }
984
- }
985
- }
986
- ],
987
- "responses": [
988
- {
989
- "status": "201",
990
- "mediaType": "application/json",
991
- "description": "Agent connected and bearer token issued.",
992
- "hasContent": true,
993
- "example": {
994
- "agent_id": 42,
995
- "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
996
- "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
997
- "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
998
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
999
- "openapi_url": "https://agentmc.example.com/api/openapi.json",
1000
- "workspace": {
1001
- "id": 7,
1002
- "name": "AgentMC Demo Workspace"
1003
- },
1004
- "server_time": "2026-02-22T17:20:53Z",
1005
- "first_sync_required": true
1006
- }
1007
- },
1008
- {
1009
- "status": "401",
1010
- "mediaType": "application/json",
1011
- "description": "Missing or invalid credentials.",
1012
- "hasContent": true,
1013
- "example": {
1014
- "error": {
1015
- "code": "validation.failed",
1016
- "message": "Validation failed.",
1017
- "details": {
1018
- "fields": {
1019
- "title": [
1020
- "The title field is required."
1021
- ]
1022
- }
1023
- }
1024
- }
1025
- }
1026
- },
1027
- {
1028
- "status": "403",
1029
- "mediaType": "application/json",
1030
- "description": "Forbidden.",
1031
- "hasContent": true,
1032
- "example": {
1033
- "error": {
1034
- "code": "validation.failed",
1035
- "message": "Validation failed.",
1036
- "details": {
1037
- "fields": {
1038
- "title": [
1039
- "The title field is required."
1040
- ]
1041
- }
1042
- }
1043
- }
1044
- }
1045
- },
1046
- {
1047
- "status": "422",
1048
- "mediaType": "application/json",
1049
- "description": "Validation failed.",
1050
- "hasContent": true,
1051
- "example": {
1052
- "error": {
1053
- "code": "validation.failed",
1054
- "message": "Validation failed.",
1055
- "details": {
1056
- "fields": {
1057
- "title": [
1058
- "The title field is required."
1059
- ]
1060
- }
1061
- }
1062
- }
1063
- }
1064
- }
1065
- ]
1066
- },
1067
817
  {
1068
818
  "operationId": "createAgentBrief",
1069
819
  "method": "post",
@@ -2844,6 +2594,118 @@
2844
2594
  }
2845
2595
  ]
2846
2596
  },
2597
+ {
2598
+ "operationId": "getAgentInstructions",
2599
+ "method": "get",
2600
+ "path": "/agents/instructions",
2601
+ "summary": "Fetch the AgentMC instruction bundle for the authenticated agent.",
2602
+ "description": "Returns managed runtime files and bundle metadata. Send current_bundle_version to fetch files only when the bundle has changed.",
2603
+ "tags": [
2604
+ "Agents"
2605
+ ],
2606
+ "security": [
2607
+ [
2608
+ "AgentBearerAuth"
2609
+ ]
2610
+ ],
2611
+ "parameters": [
2612
+ {
2613
+ "name": "current_bundle_version",
2614
+ "in": "query",
2615
+ "required": false,
2616
+ "description": "Last applied instruction bundle version from local runtime state.",
2617
+ "example": "bundle_2fa07fcadd6575cc"
2618
+ }
2619
+ ],
2620
+ "requestBodyRequired": false,
2621
+ "requestExamples": [],
2622
+ "responses": [
2623
+ {
2624
+ "status": "200",
2625
+ "mediaType": "application/json",
2626
+ "description": "Instruction bundle returned.",
2627
+ "hasContent": true,
2628
+ "example": {
2629
+ "ok": true,
2630
+ "changed": true,
2631
+ "bundle_version": "bundle_2fa07fcadd6575cc",
2632
+ "generated_at": "2026-02-25T14:10:00Z",
2633
+ "defaults": {
2634
+ "heartbeat_interval_seconds": 300
2635
+ },
2636
+ "agent": {
2637
+ "id": 42,
2638
+ "name": "Agent"
2639
+ },
2640
+ "files": [
2641
+ {
2642
+ "id": "skill.md",
2643
+ "path": ".agentmc/skills/skill.md",
2644
+ "content": "# AgentMC\n",
2645
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
2646
+ }
2647
+ ]
2648
+ }
2649
+ },
2650
+ {
2651
+ "status": "401",
2652
+ "mediaType": "application/json",
2653
+ "description": "Missing or invalid credentials.",
2654
+ "hasContent": true,
2655
+ "example": {
2656
+ "error": {
2657
+ "code": "validation.failed",
2658
+ "message": "Validation failed.",
2659
+ "details": {
2660
+ "fields": {
2661
+ "title": [
2662
+ "The title field is required."
2663
+ ]
2664
+ }
2665
+ }
2666
+ }
2667
+ }
2668
+ },
2669
+ {
2670
+ "status": "403",
2671
+ "mediaType": "application/json",
2672
+ "description": "Forbidden.",
2673
+ "hasContent": true,
2674
+ "example": {
2675
+ "error": {
2676
+ "code": "validation.failed",
2677
+ "message": "Validation failed.",
2678
+ "details": {
2679
+ "fields": {
2680
+ "title": [
2681
+ "The title field is required."
2682
+ ]
2683
+ }
2684
+ }
2685
+ }
2686
+ }
2687
+ },
2688
+ {
2689
+ "status": "422",
2690
+ "mediaType": "application/json",
2691
+ "description": "Validation failed.",
2692
+ "hasContent": true,
2693
+ "example": {
2694
+ "error": {
2695
+ "code": "validation.failed",
2696
+ "message": "Validation failed.",
2697
+ "details": {
2698
+ "fields": {
2699
+ "title": [
2700
+ "The title field is required."
2701
+ ]
2702
+ }
2703
+ }
2704
+ }
2705
+ }
2706
+ }
2707
+ ]
2708
+ },
2847
2709
  {
2848
2710
  "operationId": "listAgentBriefs",
2849
2711
  "method": "get",
@@ -2977,7 +2839,7 @@
2977
2839
  "active": true
2978
2840
  }
2979
2841
  ],
2980
- "path": "example",
2842
+ "path": ".agentmc/skills/skill.md",
2981
2843
  "per_page": 25,
2982
2844
  "total": 0
2983
2845
  }
@@ -3440,7 +3302,6 @@
3440
3302
  ]
3441
3303
  },
3442
3304
  "last_seen_at": "2026-02-24T02:11:00Z",
3443
- "first_sync_at": "2026-02-24T02:01:00Z",
3444
3305
  "tasks_count": 3,
3445
3306
  "created_at": "2026-02-24T01:56:00Z",
3446
3307
  "updated_at": "2026-02-24T02:11:00Z"
@@ -3463,7 +3324,7 @@
3463
3324
  "active": true
3464
3325
  }
3465
3326
  ],
3466
- "path": "example",
3327
+ "path": ".agentmc/skills/skill.md",
3467
3328
  "per_page": 25,
3468
3329
  "total": 0
3469
3330
  }
@@ -3591,7 +3452,7 @@
3591
3452
  "active": true
3592
3453
  }
3593
3454
  ],
3594
- "path": "example",
3455
+ "path": ".agentmc/skills/skill.md",
3595
3456
  "per_page": 25,
3596
3457
  "total": 0
3597
3458
  }
@@ -3782,7 +3643,7 @@
3782
3643
  "active": true
3783
3644
  }
3784
3645
  ],
3785
- "path": "example",
3646
+ "path": ".agentmc/skills/skill.md",
3786
3647
  "per_page": 25,
3787
3648
  "total": 0
3788
3649
  }
@@ -3924,7 +3785,7 @@
3924
3785
  "active": true
3925
3786
  }
3926
3787
  ],
3927
- "path": "example",
3788
+ "path": ".agentmc/skills/skill.md",
3928
3789
  "per_page": 25,
3929
3790
  "total": 0
3930
3791
  }
@@ -4040,7 +3901,7 @@
4040
3901
  "active": true
4041
3902
  }
4042
3903
  ],
4043
- "path": "example",
3904
+ "path": ".agentmc/skills/skill.md",
4044
3905
  "per_page": 25,
4045
3906
  "total": 0
4046
3907
  }
@@ -4181,7 +4042,7 @@
4181
4042
  "active": true
4182
4043
  }
4183
4044
  ],
4184
- "path": "example",
4045
+ "path": ".agentmc/skills/skill.md",
4185
4046
  "per_page": 25,
4186
4047
  "total": 0
4187
4048
  }
@@ -4330,7 +4191,7 @@
4330
4191
  "active": true
4331
4192
  }
4332
4193
  ],
4333
- "path": "example",
4194
+ "path": ".agentmc/skills/skill.md",
4334
4195
  "per_page": 25,
4335
4196
  "total": 0
4336
4197
  }
@@ -4518,7 +4379,7 @@
4518
4379
  "active": true
4519
4380
  }
4520
4381
  ],
4521
- "path": "example",
4382
+ "path": ".agentmc/skills/skill.md",
4522
4383
  "per_page": 25,
4523
4384
  "total": 0
4524
4385
  }
@@ -4636,7 +4497,7 @@
4636
4497
  "active": true
4637
4498
  }
4638
4499
  ],
4639
- "path": "example",
4500
+ "path": ".agentmc/skills/skill.md",
4640
4501
  "per_page": 25,
4641
4502
  "total": 0
4642
4503
  }
@@ -103,7 +103,7 @@ Brief list returned.
103
103
  "active": true
104
104
  }
105
105
  ],
106
- "path": "example",
106
+ "path": ".agentmc/skills/skill.md",
107
107
  "per_page": 25,
108
108
  "total": 0
109
109
  }
@@ -56,7 +56,6 @@ Agents returned.
56
56
  ]
57
57
  },
58
58
  "last_seen_at": "2026-02-24T02:11:00Z",
59
- "first_sync_at": "2026-02-24T02:01:00Z",
60
59
  "tasks_count": 3,
61
60
  "created_at": "2026-02-24T01:56:00Z",
62
61
  "updated_at": "2026-02-24T02:11:00Z"
@@ -79,7 +78,7 @@ Agents returned.
79
78
  "active": true
80
79
  }
81
80
  ],
82
- "path": "example",
81
+ "path": ".agentmc/skills/skill.md",
83
82
  "per_page": 25,
84
83
  "total": 0
85
84
  }
@@ -58,7 +58,7 @@ Board list returned.
58
58
  "active": true
59
59
  }
60
60
  ],
61
- "path": "example",
61
+ "path": ".agentmc/skills/skill.md",
62
62
  "per_page": 25,
63
63
  "total": 0
64
64
  }
@@ -85,7 +85,7 @@ Calendar items returned.
85
85
  "active": true
86
86
  }
87
87
  ],
88
- "path": "example",
88
+ "path": ".agentmc/skills/skill.md",
89
89
  "per_page": 25,
90
90
  "total": 0
91
91
  }
@@ -72,7 +72,7 @@ Host list returned.
72
72
  "active": true
73
73
  }
74
74
  ],
75
- "path": "example",
75
+ "path": ".agentmc/skills/skill.md",
76
76
  "per_page": 25,
77
77
  "total": 0
78
78
  }
@@ -58,7 +58,7 @@ Logs returned.
58
58
  "active": true
59
59
  }
60
60
  ],
61
- "path": "example",
61
+ "path": ".agentmc/skills/skill.md",
62
62
  "per_page": 25,
63
63
  "total": 0
64
64
  }
@@ -77,7 +77,7 @@ Notifications returned.
77
77
  "active": true
78
78
  }
79
79
  ],
80
- "path": "example",
80
+ "path": ".agentmc/skills/skill.md",
81
81
  "per_page": 25,
82
82
  "total": 0
83
83
  }
@@ -66,7 +66,7 @@ Task comments returned.
66
66
  "active": true
67
67
  }
68
68
  ],
69
- "path": "example",
69
+ "path": ".agentmc/skills/skill.md",
70
70
  "per_page": 25,
71
71
  "total": 0
72
72
  }
@@ -69,7 +69,7 @@ Task list returned.
69
69
  "active": true
70
70
  }
71
71
  ],
72
- "path": "example",
72
+ "path": ".agentmc/skills/skill.md",
73
73
  "per_page": 25,
74
74
  "total": 0
75
75
  }