@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.
@@ -12,92 +12,54 @@
12
12
  }
13
13
  ],
14
14
  "paths": {
15
- "/agents/connect": {
16
- "post": {
17
- "tags": [
18
- "Agents"
19
- ],
20
- "summary": "Connect and register one agent using a short-lived connect token.",
21
- "operationId": "connectAgent",
22
- "responses": {
23
- "201": {
24
- "description": "Agent connected and bearer token issued.",
25
- "content": {
26
- "application/json": {
27
- "schema": {
28
- "$ref": "#/components/schemas/AgentRegisterResponse"
29
- },
30
- "example": {
31
- "agent_id": 42,
32
- "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
33
- "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
34
- "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
35
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
36
- "openapi_url": "https://agentmc.example.com/api/openapi.json",
37
- "workspace": {
38
- "id": 7,
39
- "name": "AgentMC Demo Workspace"
40
- },
41
- "server_time": "2026-02-22T17:20:53Z",
42
- "first_sync_required": true
43
- }
44
- }
45
- }
46
- },
47
- "401": {
48
- "$ref": "#/components/responses/ApiError401"
49
- },
50
- "403": {
51
- "$ref": "#/components/responses/ApiError403"
52
- },
53
- "422": {
54
- "$ref": "#/components/responses/ApiError422"
55
- }
56
- },
57
- "security": [
58
- {
59
- "ConnectTokenAuth": []
60
- }
61
- ],
62
- "requestBody": {
63
- "$ref": "#/components/requestBodies/RegisterAgentApiRequest"
64
- }
65
- }
66
- },
67
- "/agents/{agent}/agent-instructions": {
15
+ "/agents/instructions": {
68
16
  "get": {
69
17
  "tags": [
70
18
  "Agents"
71
19
  ],
72
- "summary": "Return agent instructions for a connected agent using bearer auth.",
73
- "operationId": "agentInstructions",
20
+ "summary": "Fetch the AgentMC instruction bundle for the authenticated agent.",
21
+ "description": "Returns managed runtime files and bundle metadata. Send current_bundle_version to fetch files only when the bundle has changed.",
22
+ "operationId": "getAgentInstructions",
74
23
  "parameters": [
75
24
  {
76
- "name": "agent",
77
- "in": "path",
78
- "description": "Agent identifier.",
79
- "required": true,
25
+ "name": "current_bundle_version",
26
+ "in": "query",
27
+ "required": false,
28
+ "description": "Last applied instruction bundle version from local runtime state.",
80
29
  "schema": {
81
- "type": "integer",
82
- "minimum": 1
30
+ "type": "string"
83
31
  },
84
- "example": 1
32
+ "example": "bundle_2fa07fcadd6575cc"
85
33
  }
86
34
  ],
87
35
  "responses": {
88
36
  "200": {
89
- "description": "Agent instructions returned.",
37
+ "description": "Instruction bundle returned.",
90
38
  "content": {
91
39
  "application/json": {
92
40
  "schema": {
93
41
  "$ref": "#/components/schemas/AgentInstructionsResponse"
94
42
  },
95
43
  "example": {
96
- "agent_instructions": "# Agent Instructions",
97
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
98
- "docs": [],
99
- "schedules": [],
100
- "config": {}
44
+ "ok": true,
45
+ "changed": true,
46
+ "bundle_version": "bundle_2fa07fcadd6575cc",
47
+ "generated_at": "2026-02-25T14:10:00Z",
48
+ "defaults": {
49
+ "heartbeat_interval_seconds": 300
50
+ },
51
+ "agent": {
52
+ "id": 42,
53
+ "name": "Agent"
54
+ },
55
+ "files": [
56
+ {
57
+ "id": "skill.md",
58
+ "path": ".agentmc/skills/skill.md",
59
+ "content": "# AgentMC\n",
60
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
61
+ }
62
+ ]
101
63
  }
102
64
  }
103
65
  }
@@ -108,8 +70,8 @@
108
70
  "403": {
109
71
  "$ref": "#/components/responses/ApiError403"
110
72
  },
111
- "404": {
112
- "$ref": "#/components/responses/ApiError404"
73
+ "422": {
74
+ "$ref": "#/components/responses/ApiError422"
113
75
  }
114
76
  },
115
77
  "security": [
@@ -334,7 +296,7 @@
334
296
  "active": true
335
297
  }
336
298
  ],
337
- "path": "example",
299
+ "path": ".agentmc/skills/skill.md",
338
300
  "per_page": 25,
339
301
  "total": 0
340
302
  }
@@ -608,7 +570,7 @@
608
570
  "active": true
609
571
  }
610
572
  ],
611
- "path": "example",
573
+ "path": ".agentmc/skills/skill.md",
612
574
  "per_page": 25,
613
575
  "total": 0
614
576
  }
@@ -1641,7 +1603,7 @@
1641
1603
  "active": true
1642
1604
  }
1643
1605
  ],
1644
- "path": "example",
1606
+ "path": ".agentmc/skills/skill.md",
1645
1607
  "per_page": 25,
1646
1608
  "total": 0
1647
1609
  }
@@ -2243,7 +2205,7 @@
2243
2205
  "active": true
2244
2206
  }
2245
2207
  ],
2246
- "path": "example",
2208
+ "path": ".agentmc/skills/skill.md",
2247
2209
  "per_page": 25,
2248
2210
  "total": 0
2249
2211
  }
@@ -2728,7 +2690,7 @@
2728
2690
  "active": true
2729
2691
  }
2730
2692
  ],
2731
- "path": "example",
2693
+ "path": ".agentmc/skills/skill.md",
2732
2694
  "per_page": 25,
2733
2695
  "total": 0
2734
2696
  }
@@ -3045,7 +3007,6 @@
3045
3007
  ]
3046
3008
  },
3047
3009
  "last_seen_at": "2026-02-24T02:11:00Z",
3048
- "first_sync_at": "2026-02-24T02:01:00Z",
3049
3010
  "tasks_count": 3,
3050
3011
  "created_at": "2026-02-24T01:56:00Z",
3051
3012
  "updated_at": "2026-02-24T02:11:00Z"
@@ -3068,7 +3029,7 @@
3068
3029
  "active": true
3069
3030
  }
3070
3031
  ],
3071
- "path": "example",
3032
+ "path": ".agentmc/skills/skill.md",
3072
3033
  "per_page": 25,
3073
3034
  "total": 0
3074
3035
  }
@@ -3166,7 +3127,7 @@
3166
3127
  "active": true
3167
3128
  }
3168
3129
  ],
3169
- "path": "example",
3130
+ "path": ".agentmc/skills/skill.md",
3170
3131
  "per_page": 25,
3171
3132
  "total": 0
3172
3133
  }
@@ -3269,7 +3230,7 @@
3269
3230
  "active": true
3270
3231
  }
3271
3232
  ],
3272
- "path": "example",
3233
+ "path": ".agentmc/skills/skill.md",
3273
3234
  "per_page": 25,
3274
3235
  "total": 0
3275
3236
  }
@@ -3377,7 +3338,7 @@
3377
3338
  "active": true
3378
3339
  }
3379
3340
  ],
3380
- "path": "example",
3341
+ "path": ".agentmc/skills/skill.md",
3381
3342
  "per_page": 25,
3382
3343
  "total": 0
3383
3344
  }
@@ -3654,7 +3615,7 @@
3654
3615
  "active": true
3655
3616
  }
3656
3617
  ],
3657
- "path": "example",
3618
+ "path": ".agentmc/skills/skill.md",
3658
3619
  "per_page": 25,
3659
3620
  "total": 0
3660
3621
  }
@@ -4225,16 +4186,10 @@
4225
4186
  "name": "X-Api-Key",
4226
4187
  "in": "header"
4227
4188
  },
4228
- "ConnectTokenAuth": {
4229
- "type": "apiKey",
4230
- "description": "Short-lived single-use connect token for agent registration only.",
4231
- "name": "X-Connect-Token",
4232
- "in": "header"
4233
- },
4234
4189
  "AgentBearerAuth": {
4235
4190
  "type": "http",
4236
- "description": "Agent-scoped bearer token returned by /agents/connect and accepted on agent-compatible API operations.",
4237
- "bearerFormat": "agent_token",
4191
+ "description": "Agent-scoped API key issued from Agent setup and accepted on agent-compatible API operations.",
4192
+ "bearerFormat": "agent_api_key",
4238
4193
  "scheme": "bearer"
4239
4194
  },
4240
4195
  "BearerAuth": {
@@ -4478,8 +4433,8 @@
4478
4433
  },
4479
4434
  "path": {
4480
4435
  "type": "string",
4481
- "description": "Path.",
4482
- "example": "example"
4436
+ "description": "Local filesystem path where this file should be written.",
4437
+ "example": ".agentmc/skills/skill.md"
4483
4438
  },
4484
4439
  "per_page": {
4485
4440
  "type": "integer",
@@ -4512,7 +4467,7 @@
4512
4467
  "active": true
4513
4468
  }
4514
4469
  ],
4515
- "path": "example",
4470
+ "path": ".agentmc/skills/skill.md",
4516
4471
  "per_page": 25,
4517
4472
  "total": 0
4518
4473
  }
@@ -4690,7 +4645,7 @@
4690
4645
  "active": true
4691
4646
  }
4692
4647
  ],
4693
- "path": "example",
4648
+ "path": ".agentmc/skills/skill.md",
4694
4649
  "per_page": 25,
4695
4650
  "total": 0
4696
4651
  }
@@ -4725,7 +4680,7 @@
4725
4680
  "active": true
4726
4681
  }
4727
4682
  ],
4728
- "path": "example",
4683
+ "path": ".agentmc/skills/skill.md",
4729
4684
  "per_page": 25,
4730
4685
  "total": 0
4731
4686
  }
@@ -4772,7 +4727,6 @@
4772
4727
  "capabilities",
4773
4728
  "meta",
4774
4729
  "last_seen_at",
4775
- "first_sync_at",
4776
4730
  "tasks_count",
4777
4731
  "created_at",
4778
4732
  "updated_at"
@@ -4805,7 +4759,6 @@
4805
4759
  ]
4806
4760
  },
4807
4761
  "last_seen_at": "2026-02-24T02:11:00Z",
4808
- "first_sync_at": "2026-02-24T02:01:00Z",
4809
4762
  "tasks_count": 3,
4810
4763
  "created_at": "2026-02-24T01:56:00Z",
4811
4764
  "updated_at": "2026-02-24T02:11:00Z"
@@ -4909,13 +4862,6 @@
4909
4862
  "description": "ISO-8601 timestamp for most recent heartbeat.",
4910
4863
  "example": "2026-02-22T17:21:00Z"
4911
4864
  },
4912
- "first_sync_at": {
4913
- "type": "string",
4914
- "format": "date-time",
4915
- "nullable": true,
4916
- "description": "ISO-8601 timestamp when this agent first completed initial sync.",
4917
- "example": "2026-02-22T17:21:00Z"
4918
- },
4919
4865
  "tasks_count": {
4920
4866
  "type": "integer",
4921
4867
  "minimum": 0,
@@ -4982,7 +4928,6 @@
4982
4928
  ]
4983
4929
  },
4984
4930
  "last_seen_at": "2026-02-24T02:11:00Z",
4985
- "first_sync_at": "2026-02-24T02:01:00Z",
4986
4931
  "tasks_count": 3,
4987
4932
  "created_at": "2026-02-24T01:56:00Z",
4988
4933
  "updated_at": "2026-02-24T02:11:00Z"
@@ -5013,7 +4958,7 @@
5013
4958
  "active": true
5014
4959
  }
5015
4960
  ],
5016
- "path": "example",
4961
+ "path": ".agentmc/skills/skill.md",
5017
4962
  "per_page": 25,
5018
4963
  "total": 0
5019
4964
  }
@@ -5050,7 +4995,6 @@
5050
4995
  ]
5051
4996
  },
5052
4997
  "last_seen_at": "2026-02-24T02:11:00Z",
5053
- "first_sync_at": "2026-02-24T02:01:00Z",
5054
4998
  "tasks_count": 3,
5055
4999
  "created_at": "2026-02-24T01:56:00Z",
5056
5000
  "updated_at": "2026-02-24T02:11:00Z"
@@ -5073,7 +5017,7 @@
5073
5017
  "active": true
5074
5018
  }
5075
5019
  ],
5076
- "path": "example",
5020
+ "path": ".agentmc/skills/skill.md",
5077
5021
  "per_page": 25,
5078
5022
  "total": 0
5079
5023
  }
@@ -5143,153 +5087,6 @@
5143
5087
  }
5144
5088
  }
5145
5089
  },
5146
- "AgentRegisterResponse": {
5147
- "type": "object",
5148
- "required": [
5149
- "agent_id",
5150
- "agent_token",
5151
- "agent_instructions_endpoint",
5152
- "agent_authenticated_instructions_endpoint",
5153
- "agent_instructions_version",
5154
- "openapi_url",
5155
- "workspace",
5156
- "server_time",
5157
- "first_sync_required"
5158
- ],
5159
- "properties": {
5160
- "agent_id": {
5161
- "type": "integer",
5162
- "minimum": 1,
5163
- "description": "Identifier for agent.",
5164
- "example": 42
5165
- },
5166
- "agent_token": {
5167
- "type": "string",
5168
- "description": "Bearer token to use in `Authorization: Bearer <token>` headers.",
5169
- "example": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
5170
- },
5171
- "agent_instructions_endpoint": {
5172
- "type": "string",
5173
- "format": "uri",
5174
- "description": "Endpoint for agent instructions updates.",
5175
- "example": "https://agentmc.example.com/resource"
5176
- },
5177
- "agent_authenticated_instructions_endpoint": {
5178
- "type": "string",
5179
- "format": "uri",
5180
- "description": "Authenticated endpoint for agent instructions updates.",
5181
- "example": "https://agentmc.example.com/resource"
5182
- },
5183
- "agent_instructions_version": {
5184
- "type": "string",
5185
- "description": "Agent instructions version.",
5186
- "example": "example"
5187
- },
5188
- "openapi_url": {
5189
- "type": "string",
5190
- "description": "Canonical OpenAPI specification URL.",
5191
- "example": "https://agentmc.example.com/api/openapi.json"
5192
- },
5193
- "workspace": {
5194
- "$ref": "#/components/schemas/TeamSummary",
5195
- "description": "Workspace.",
5196
- "example": {
5197
- "id": 42,
5198
- "name": "Example Name"
5199
- }
5200
- },
5201
- "server_time": {
5202
- "type": "string",
5203
- "format": "date-time",
5204
- "description": "Current server timestamp.",
5205
- "example": "2026-02-22T17:21:00Z"
5206
- },
5207
- "first_sync_required": {
5208
- "type": "boolean",
5209
- "description": "Boolean flag for first sync required.",
5210
- "example": true
5211
- }
5212
- },
5213
- "description": "Connect/registration response with agent credentials, authenticated agent instructions endpoint, and OpenAPI URL.",
5214
- "example": {
5215
- "agent_id": 42,
5216
- "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5217
- "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
5218
- "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
5219
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
5220
- "openapi_url": "https://agentmc.example.com/api/openapi.json",
5221
- "workspace": {
5222
- "id": 7,
5223
- "name": "AgentMC Demo Workspace"
5224
- },
5225
- "server_time": "2026-02-22T17:20:53Z",
5226
- "first_sync_required": true
5227
- }
5228
- },
5229
- "AgentInstructionsResponse": {
5230
- "type": "object",
5231
- "required": [
5232
- "agent_instructions",
5233
- "agent_instructions_version",
5234
- "docs",
5235
- "schedules",
5236
- "config"
5237
- ],
5238
- "properties": {
5239
- "agent_instructions": {
5240
- "type": "string",
5241
- "description": "Agent instructions.",
5242
- "example": "example"
5243
- },
5244
- "agent_instructions_version": {
5245
- "type": "string",
5246
- "description": "Agent instructions version.",
5247
- "example": "example"
5248
- },
5249
- "docs": {
5250
- "type": "array",
5251
- "items": {
5252
- "type": "object",
5253
- "additionalProperties": true
5254
- },
5255
- "description": "Docs.",
5256
- "example": [
5257
- {
5258
- "key": "value"
5259
- }
5260
- ]
5261
- },
5262
- "schedules": {
5263
- "type": "array",
5264
- "items": {
5265
- "type": "object",
5266
- "additionalProperties": true
5267
- },
5268
- "description": "Schedules.",
5269
- "example": [
5270
- {
5271
- "key": "value"
5272
- }
5273
- ]
5274
- },
5275
- "config": {
5276
- "type": "object",
5277
- "additionalProperties": true,
5278
- "description": "Config.",
5279
- "example": {
5280
- "key": "value"
5281
- }
5282
- }
5283
- },
5284
- "description": "Connected agent instructions payload returned after successful bearer authentication.",
5285
- "example": {
5286
- "agent_instructions": "# Agent Instructions",
5287
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
5288
- "docs": [],
5289
- "schedules": [],
5290
- "config": {}
5291
- }
5292
- },
5293
5090
  "AgentHeartbeatResponse": {
5294
5091
  "type": "object",
5295
5092
  "required": [
@@ -6124,7 +5921,7 @@
6124
5921
  "active": true
6125
5922
  }
6126
5923
  ],
6127
- "path": "example",
5924
+ "path": ".agentmc/skills/skill.md",
6128
5925
  "per_page": 25,
6129
5926
  "total": 0
6130
5927
  }
@@ -6206,7 +6003,7 @@
6206
6003
  "active": true
6207
6004
  }
6208
6005
  ],
6209
- "path": "example",
6006
+ "path": ".agentmc/skills/skill.md",
6210
6007
  "per_page": 25,
6211
6008
  "total": 0
6212
6009
  }
@@ -6468,8 +6265,8 @@
6468
6265
  },
6469
6266
  "path": {
6470
6267
  "type": "string",
6471
- "description": "Path.",
6472
- "example": "example"
6268
+ "description": "Local filesystem path where this file should be written.",
6269
+ "example": ".agentmc/skills/skill.md"
6473
6270
  }
6474
6271
  },
6475
6272
  "description": "Connection.",
@@ -6480,7 +6277,7 @@
6480
6277
  "host": "ip-10-0-3-42",
6481
6278
  "port": 1,
6482
6279
  "scheme": "example",
6483
- "path": "example"
6280
+ "path": ".agentmc/skills/skill.md"
6484
6281
  }
6485
6282
  },
6486
6283
  "channel": {
@@ -6508,7 +6305,7 @@
6508
6305
  "host": "ip-10-0-3-42",
6509
6306
  "port": 1,
6510
6307
  "scheme": "example",
6511
- "path": "example"
6308
+ "path": ".agentmc/skills/skill.md"
6512
6309
  },
6513
6310
  "channel": "example",
6514
6311
  "event": "example",
@@ -8121,6 +7918,159 @@
8121
7918
  }
8122
7919
  }
8123
7920
  },
7921
+ "AgentInstructionFile": {
7922
+ "type": "object",
7923
+ "required": [
7924
+ "id",
7925
+ "path",
7926
+ "content",
7927
+ "sha256"
7928
+ ],
7929
+ "properties": {
7930
+ "id": {
7931
+ "type": "string",
7932
+ "description": "Unique identifier for this record.",
7933
+ "example": "example"
7934
+ },
7935
+ "path": {
7936
+ "type": "string",
7937
+ "description": "Local filesystem path where this file should be written.",
7938
+ "example": ".agentmc/skills/skill.md"
7939
+ },
7940
+ "content": {
7941
+ "type": "string",
7942
+ "description": "Content.",
7943
+ "example": "Example content."
7944
+ },
7945
+ "sha256": {
7946
+ "type": "string",
7947
+ "description": "SHA-256 checksum for file content.",
7948
+ "example": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
7949
+ }
7950
+ },
7951
+ "description": "Agent Instruction File schema.",
7952
+ "example": {
7953
+ "id": "example",
7954
+ "path": ".agentmc/skills/skill.md",
7955
+ "content": "Example content.",
7956
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
7957
+ }
7958
+ },
7959
+ "AgentInstructionsResponse": {
7960
+ "type": "object",
7961
+ "required": [
7962
+ "ok",
7963
+ "changed",
7964
+ "bundle_version",
7965
+ "generated_at",
7966
+ "defaults",
7967
+ "agent",
7968
+ "files"
7969
+ ],
7970
+ "properties": {
7971
+ "ok": {
7972
+ "type": "boolean",
7973
+ "description": "Boolean flag for ok.",
7974
+ "example": true
7975
+ },
7976
+ "changed": {
7977
+ "type": "boolean",
7978
+ "description": "True when the runtime should rewrite local managed files from this response.",
7979
+ "example": true
7980
+ },
7981
+ "bundle_version": {
7982
+ "type": "string",
7983
+ "description": "Current instruction bundle version.",
7984
+ "example": "bundle_2fa07fcadd6575cc"
7985
+ },
7986
+ "generated_at": {
7987
+ "type": "string",
7988
+ "format": "date-time",
7989
+ "description": "ISO-8601 generation timestamp.",
7990
+ "example": "2026-02-22T17:21:00Z"
7991
+ },
7992
+ "defaults": {
7993
+ "type": "object",
7994
+ "required": [
7995
+ "heartbeat_interval_seconds"
7996
+ ],
7997
+ "properties": {
7998
+ "heartbeat_interval_seconds": {
7999
+ "type": "integer",
8000
+ "minimum": 5,
8001
+ "description": "Heartbeat interval seconds.",
8002
+ "example": 5
8003
+ }
8004
+ },
8005
+ "description": "Defaults.",
8006
+ "example": {
8007
+ "heartbeat_interval_seconds": 5
8008
+ }
8009
+ },
8010
+ "agent": {
8011
+ "type": "object",
8012
+ "required": [
8013
+ "id",
8014
+ "name"
8015
+ ],
8016
+ "properties": {
8017
+ "id": {
8018
+ "type": "integer",
8019
+ "minimum": 1,
8020
+ "description": "Unique identifier for this record.",
8021
+ "example": 42
8022
+ },
8023
+ "name": {
8024
+ "type": "string",
8025
+ "description": "Human-readable name.",
8026
+ "example": "Example Name"
8027
+ }
8028
+ },
8029
+ "description": "Agent.",
8030
+ "example": {
8031
+ "id": 42,
8032
+ "name": "Example Name"
8033
+ }
8034
+ },
8035
+ "files": {
8036
+ "type": "array",
8037
+ "items": {
8038
+ "$ref": "#/components/schemas/AgentInstructionFile"
8039
+ },
8040
+ "description": "Managed instruction bundle files to write locally.",
8041
+ "example": [
8042
+ {
8043
+ "id": "example",
8044
+ "path": ".agentmc/skills/skill.md",
8045
+ "content": "Example content.",
8046
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
8047
+ }
8048
+ ]
8049
+ }
8050
+ },
8051
+ "example": {
8052
+ "ok": true,
8053
+ "changed": true,
8054
+ "bundle_version": "bundle_2fa07fcadd6575cc",
8055
+ "generated_at": "2026-02-25T14:10:00Z",
8056
+ "defaults": {
8057
+ "heartbeat_interval_seconds": 300
8058
+ },
8059
+ "agent": {
8060
+ "id": 42,
8061
+ "name": "Agent"
8062
+ },
8063
+ "files": [
8064
+ {
8065
+ "id": "skill.md",
8066
+ "path": ".agentmc/skills/skill.md",
8067
+ "content": "# AgentMC\n",
8068
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
8069
+ }
8070
+ ]
8071
+ },
8072
+ "description": "Agent Instructions Response response schema."
8073
+ },
8124
8074
  "AgentRealtimeRequestedSessionsResponse": {
8125
8075
  "type": "object",
8126
8076
  "required": [
@@ -8976,7 +8926,7 @@
8976
8926
  "active": true
8977
8927
  }
8978
8928
  ],
8979
- "path": "example",
8929
+ "path": ".agentmc/skills/skill.md",
8980
8930
  "per_page": 25,
8981
8931
  "total": 0
8982
8932
  }
@@ -9014,7 +8964,7 @@
9014
8964
  "active": true
9015
8965
  }
9016
8966
  ],
9017
- "path": "example",
8967
+ "path": ".agentmc/skills/skill.md",
9018
8968
  "per_page": 25,
9019
8969
  "total": 0
9020
8970
  }
@@ -9078,7 +9028,7 @@
9078
9028
  "active": true
9079
9029
  }
9080
9030
  ],
9081
- "path": "example",
9031
+ "path": ".agentmc/skills/skill.md",
9082
9032
  "per_page": 25,
9083
9033
  "total": 0
9084
9034
  }
@@ -9122,7 +9072,7 @@
9122
9072
  "active": true
9123
9073
  }
9124
9074
  ],
9125
- "path": "example",
9075
+ "path": ".agentmc/skills/skill.md",
9126
9076
  "per_page": 25,
9127
9077
  "total": 0
9128
9078
  }
@@ -9189,7 +9139,7 @@
9189
9139
  "active": true
9190
9140
  }
9191
9141
  ],
9192
- "path": "example",
9142
+ "path": ".agentmc/skills/skill.md",
9193
9143
  "per_page": 25,
9194
9144
  "total": 0
9195
9145
  }
@@ -9236,7 +9186,7 @@
9236
9186
  "active": true
9237
9187
  }
9238
9188
  ],
9239
- "path": "example",
9189
+ "path": ".agentmc/skills/skill.md",
9240
9190
  "per_page": 25,
9241
9191
  "total": 0
9242
9192
  }
@@ -9296,7 +9246,7 @@
9296
9246
  "active": true
9297
9247
  }
9298
9248
  ],
9299
- "path": "example",
9249
+ "path": ".agentmc/skills/skill.md",
9300
9250
  "per_page": 25,
9301
9251
  "total": 0
9302
9252
  }
@@ -9336,7 +9286,7 @@
9336
9286
  "active": true
9337
9287
  }
9338
9288
  ],
9339
- "path": "example",
9289
+ "path": ".agentmc/skills/skill.md",
9340
9290
  "per_page": 25,
9341
9291
  "total": 0
9342
9292
  }
@@ -9415,7 +9365,7 @@
9415
9365
  "active": true
9416
9366
  }
9417
9367
  ],
9418
- "path": "example",
9368
+ "path": ".agentmc/skills/skill.md",
9419
9369
  "per_page": 25,
9420
9370
  "total": 0
9421
9371
  }
@@ -9474,7 +9424,7 @@
9474
9424
  "active": true
9475
9425
  }
9476
9426
  ],
9477
- "path": "example",
9427
+ "path": ".agentmc/skills/skill.md",
9478
9428
  "per_page": 25,
9479
9429
  "total": 0
9480
9430
  }
@@ -9546,7 +9496,7 @@
9546
9496
  "active": true
9547
9497
  }
9548
9498
  ],
9549
- "path": "example",
9499
+ "path": ".agentmc/skills/skill.md",
9550
9500
  "per_page": 25,
9551
9501
  "total": 0
9552
9502
  }
@@ -9598,7 +9548,7 @@
9598
9548
  "active": true
9599
9549
  }
9600
9550
  ],
9601
- "path": "example",
9551
+ "path": ".agentmc/skills/skill.md",
9602
9552
  "per_page": 25,
9603
9553
  "total": 0
9604
9554
  }
@@ -9676,7 +9626,7 @@
9676
9626
  "active": true
9677
9627
  }
9678
9628
  ],
9679
- "path": "example",
9629
+ "path": ".agentmc/skills/skill.md",
9680
9630
  "per_page": 25,
9681
9631
  "total": 0
9682
9632
  }
@@ -9734,7 +9684,7 @@
9734
9684
  "active": true
9735
9685
  }
9736
9686
  ],
9737
- "path": "example",
9687
+ "path": ".agentmc/skills/skill.md",
9738
9688
  "per_page": 25,
9739
9689
  "total": 0
9740
9690
  }
@@ -9817,391 +9767,11 @@
9817
9767
  }
9818
9768
  }
9819
9769
  },
9820
- "RegisterAgentApiRequest": {
9770
+ "StoreAgentHeartbeatApiRequest": {
9821
9771
  "type": "object",
9822
9772
  "properties": {
9823
- "host": {
9824
- "type": "string",
9825
- "maxLength": 255,
9826
- "description": "Runtime host identifier (hostname or machine name).",
9827
- "example": "ip-10-0-3-42"
9828
- },
9829
- "runtime_version": {
9830
- "type": "string",
9831
- "maxLength": 255,
9832
- "description": "Required runtime/client version string for diagnostics.",
9833
- "example": "2026.02.1"
9834
- },
9835
- "capabilities": {
9836
- "nullable": true,
9837
- "type": "array",
9838
- "items": {
9839
- "type": "string",
9840
- "maxLength": 120
9841
- },
9842
- "description": "Required (nullable) capability tags supported by this runtime.",
9843
- "example": [
9844
- "tasks",
9845
- "calendar",
9846
- "realtime"
9847
- ]
9848
- },
9849
- "agents_md": {
9850
- "type": "string",
9851
- "minLength": 1,
9852
- "maxLength": 262144,
9853
- "description": "Required current local AGENTS.md content captured by the runtime before first sync.",
9854
- "example": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n"
9855
- },
9856
- "models": {
9857
- "nullable": true,
9858
- "oneOf": [
9859
- {
9860
- "type": "array",
9861
- "items": {
9862
- "oneOf": [
9863
- {
9864
- "type": "string",
9865
- "description": "Full model ID in provider/model format.",
9866
- "example": "openai/gpt-5-codex"
9867
- },
9868
- {
9869
- "type": "object",
9870
- "required": [
9871
- "model_id"
9872
- ],
9873
- "properties": {
9874
- "model_id": {
9875
- "type": "string",
9876
- "description": "Full model ID in provider/model format.",
9877
- "example": "openai/gpt-5-codex"
9878
- },
9879
- "provider": {
9880
- "type": "string",
9881
- "description": "Model provider slug.",
9882
- "example": "openai"
9883
- },
9884
- "name": {
9885
- "type": "string",
9886
- "description": "Optional display name.",
9887
- "example": "GPT-5 Codex"
9888
- }
9889
- }
9890
- }
9891
- ]
9892
- }
9893
- },
9894
- {
9895
- "type": "object",
9896
- "additionalProperties": true,
9897
- "description": "Structured model snapshot (for example status/list output). AgentMC extracts model IDs recursively."
9898
- }
9899
- ],
9900
- "description": "Optional runtime LLM inventory. Send an array of model refs/objects or a structured runtime snapshot object.",
9901
- "example": [
9902
- {
9903
- "model_id": "openai/gpt-5-codex",
9904
- "provider": "openai"
9905
- },
9906
- {
9907
- "model_id": "anthropic/claude-sonnet-4-20250514",
9908
- "provider": "anthropic"
9909
- }
9910
- ]
9911
- },
9912
- "identity": {
9913
- "nullable": true,
9914
- "description": "Optional full agent identity payload persisted in agent metadata.",
9915
- "example": {
9916
- "name": "Jarvis",
9917
- "creature": "robot",
9918
- "vibe": "calm",
9919
- "emoji": "🤖"
9920
- }
9921
- },
9922
- "metadata": {
9923
- "type": "object",
9924
- "additionalProperties": true,
9925
- "required": [
9926
- "hostname",
9927
- "ip",
9928
- "network",
9929
- "os",
9930
- "os_version",
9931
- "arch",
9932
- "cpu",
9933
- "cpu_cores",
9934
- "ram_gb",
9935
- "disk",
9936
- "uptime_seconds",
9937
- "runtime"
9938
- ],
9939
- "properties": {
9940
- "hostname": {
9941
- "type": "string",
9942
- "maxLength": 255,
9943
- "description": "Hostname.",
9944
- "example": "Example Name"
9945
- },
9946
- "ip": {
9947
- "type": "string",
9948
- "format": "ipv4",
9949
- "description": "Ip.",
9950
- "example": "example"
9951
- },
9952
- "network": {
9953
- "type": "object",
9954
- "required": [
9955
- "private_ip",
9956
- "public_ip"
9957
- ],
9958
- "properties": {
9959
- "private_ip": {
9960
- "type": "string",
9961
- "format": "ipv4",
9962
- "description": "Private ip.",
9963
- "example": "example"
9964
- },
9965
- "public_ip": {
9966
- "type": "string",
9967
- "format": "ipv4",
9968
- "description": "Public ip.",
9969
- "example": "example"
9970
- }
9971
- },
9972
- "description": "Network.",
9973
- "example": {
9974
- "private_ip": "example",
9975
- "public_ip": "example"
9976
- }
9977
- },
9978
- "os": {
9979
- "type": "string",
9980
- "maxLength": 120,
9981
- "description": "Os.",
9982
- "example": "example"
9983
- },
9984
- "os_version": {
9985
- "type": "string",
9986
- "maxLength": 120,
9987
- "description": "Os version.",
9988
- "example": "example"
9989
- },
9990
- "arch": {
9991
- "type": "string",
9992
- "maxLength": 120,
9993
- "description": "Arch.",
9994
- "example": "example"
9995
- },
9996
- "cpu": {
9997
- "oneOf": [
9998
- {
9999
- "type": "string"
10000
- },
10001
- {
10002
- "type": "object",
10003
- "additionalProperties": true
10004
- }
10005
- ],
10006
- "description": "Cpu.",
10007
- "example": "example"
10008
- },
10009
- "cpu_cores": {
10010
- "type": "integer",
10011
- "minimum": 1,
10012
- "maximum": 4096,
10013
- "description": "Cpu cores.",
10014
- "example": 8
10015
- },
10016
- "ram_gb": {
10017
- "type": "number",
10018
- "minimum": 0,
10019
- "description": "Ram gb.",
10020
- "example": 32
10021
- },
10022
- "disk": {
10023
- "type": "object",
10024
- "required": [
10025
- "total_bytes",
10026
- "free_bytes"
10027
- ],
10028
- "properties": {
10029
- "total_bytes": {
10030
- "type": "integer",
10031
- "minimum": 0,
10032
- "description": "Total bytes.",
10033
- "example": 0
10034
- },
10035
- "free_bytes": {
10036
- "type": "integer",
10037
- "minimum": 0,
10038
- "description": "Free bytes.",
10039
- "example": 0
10040
- }
10041
- },
10042
- "description": "Disk.",
10043
- "example": {
10044
- "total_bytes": 0,
10045
- "free_bytes": 0
10046
- }
10047
- },
10048
- "uptime_seconds": {
10049
- "type": "integer",
10050
- "minimum": 0,
10051
- "description": "Uptime seconds.",
10052
- "example": 86400
10053
- },
10054
- "runtime": {
10055
- "type": "object",
10056
- "required": [
10057
- "name",
10058
- "version"
10059
- ],
10060
- "properties": {
10061
- "name": {
10062
- "type": "string",
10063
- "maxLength": 120,
10064
- "description": "Human-readable name.",
10065
- "example": "Example Name"
10066
- },
10067
- "version": {
10068
- "type": "string",
10069
- "maxLength": 120,
10070
- "description": "Version.",
10071
- "example": "example"
10072
- }
10073
- },
10074
- "description": "Runtime.",
10075
- "example": {
10076
- "name": "Example Name",
10077
- "version": "example"
10078
- }
10079
- },
10080
- "identity": {
10081
- "description": "Optional identity payload persisted as host metadata.",
10082
- "oneOf": [
10083
- {
10084
- "type": "object",
10085
- "additionalProperties": true,
10086
- "properties": {
10087
- "name": {
10088
- "type": "string",
10089
- "maxLength": 255,
10090
- "example": "Jarvis",
10091
- "description": "Human-readable name."
10092
- }
10093
- }
10094
- },
10095
- {
10096
- "type": "string",
10097
- "description": "Raw IDENTITY.md content. AgentMC will parse a `Name:` line when present.",
10098
- "example": "Name: Jarvis"
10099
- }
10100
- ],
10101
- "example": {
10102
- "name": "Jarvis"
10103
- }
10104
- }
10105
- },
10106
- "description": "Required host telemetry snapshot for registration. Mirrors heartbeat host metadata and is saved as host metadata.",
10107
- "example": {
10108
- "hostname": "worker-01",
10109
- "ip": "10.0.2.15",
10110
- "network": {
10111
- "private_ip": "10.0.2.15",
10112
- "public_ip": "34.201.22.9"
10113
- },
10114
- "os": "Ubuntu",
10115
- "os_version": "22.04",
10116
- "arch": "x86_64",
10117
- "cpu": "Intel Xeon",
10118
- "cpu_cores": 8,
10119
- "ram_gb": 32,
10120
- "disk": {
10121
- "total_bytes": 512110190592,
10122
- "free_bytes": 321102110720
10123
- },
10124
- "uptime_seconds": 86400,
10125
- "runtime": {
10126
- "name": "codex",
10127
- "version": "2026.02.1"
10128
- },
10129
- "identity": {
10130
- "name": "Jarvis",
10131
- "creature": "robot",
10132
- "vibe": "calm"
10133
- }
10134
- }
10135
- }
10136
- },
10137
- "required": [
10138
- "host",
10139
- "runtime_version",
10140
- "capabilities",
10141
- "agents_md",
10142
- "metadata"
10143
- ],
10144
- "description": "One-time agent registration payload. Resolve this schema from OpenAPI at runtime instead of hardcoding fields.",
10145
- "example": {
10146
- "host": "ip-10-0-3-42",
10147
- "runtime_version": "2026.02.1",
10148
- "capabilities": [
10149
- "tasks",
10150
- "calendar",
10151
- "realtime"
10152
- ],
10153
- "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
10154
- "models": [
10155
- {
10156
- "model_id": "openai/gpt-5-codex",
10157
- "provider": "openai"
10158
- },
10159
- {
10160
- "model_id": "anthropic/claude-sonnet-4-20250514",
10161
- "provider": "anthropic"
10162
- }
10163
- ],
10164
- "identity": {
10165
- "name": "Jarvis",
10166
- "creature": "robot",
10167
- "vibe": "calm",
10168
- "emoji": "🤖"
10169
- },
10170
- "metadata": {
10171
- "hostname": "worker-01",
10172
- "ip": "10.0.2.15",
10173
- "network": {
10174
- "private_ip": "10.0.2.15",
10175
- "public_ip": "34.201.22.9"
10176
- },
10177
- "os": "Ubuntu",
10178
- "os_version": "22.04",
10179
- "arch": "x86_64",
10180
- "cpu": "Intel Xeon",
10181
- "cpu_cores": 8,
10182
- "ram_gb": 32,
10183
- "disk": {
10184
- "total_bytes": 512110190592,
10185
- "free_bytes": 321102110720
10186
- },
10187
- "uptime_seconds": 86400,
10188
- "runtime": {
10189
- "name": "codex",
10190
- "version": "2026.02.1"
10191
- },
10192
- "identity": {
10193
- "name": "Jarvis",
10194
- "creature": "robot",
10195
- "vibe": "calm"
10196
- }
10197
- }
10198
- }
10199
- },
10200
- "StoreAgentHeartbeatApiRequest": {
10201
- "type": "object",
10202
- "properties": {
10203
- "status": {
10204
- "nullable": true,
9773
+ "status": {
9774
+ "nullable": true,
10205
9775
  "type": "string",
10206
9776
  "enum": [
10207
9777
  "pending",
@@ -11817,67 +11387,6 @@
11817
11387
  }
11818
11388
  }
11819
11389
  },
11820
- "RegisterAgentApiRequest": {
11821
- "required": true,
11822
- "content": {
11823
- "application/json": {
11824
- "schema": {
11825
- "$ref": "#/components/schemas/RegisterAgentApiRequest"
11826
- },
11827
- "example": {
11828
- "host": "ip-10-0-3-42",
11829
- "runtime_version": "2026.02.1",
11830
- "capabilities": [
11831
- "tasks",
11832
- "calendar",
11833
- "realtime"
11834
- ],
11835
- "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
11836
- "models": [
11837
- {
11838
- "model_id": "openai/gpt-5-codex",
11839
- "provider": "openai"
11840
- },
11841
- {
11842
- "model_id": "anthropic/claude-sonnet-4-20250514",
11843
- "provider": "anthropic"
11844
- }
11845
- ],
11846
- "identity": {
11847
- "name": "Jarvis",
11848
- "creature": "robot",
11849
- "vibe": "calm"
11850
- },
11851
- "metadata": {
11852
- "hostname": "worker-01",
11853
- "ip": "10.0.2.15",
11854
- "network": {
11855
- "private_ip": "10.0.2.15",
11856
- "public_ip": "34.201.22.9"
11857
- },
11858
- "os": "Ubuntu",
11859
- "os_version": "22.04",
11860
- "arch": "x86_64",
11861
- "cpu": "Intel Xeon",
11862
- "cpu_cores": 8,
11863
- "ram_gb": 32,
11864
- "disk": {
11865
- "total_bytes": 512110190592,
11866
- "free_bytes": 321102110720
11867
- },
11868
- "uptime_seconds": 86400,
11869
- "runtime": {
11870
- "name": "codex",
11871
- "version": "2026.02.1"
11872
- },
11873
- "identity": {
11874
- "name": "Jarvis"
11875
- }
11876
- }
11877
- }
11878
- }
11879
- }
11880
- },
11881
11390
  "StoreAgentHeartbeatApiRequest": {
11882
11391
  "required": true,
11883
11392
  "content": {
@@ -12249,47 +11758,6 @@
12249
11758
  }
12250
11759
  },
12251
11760
  "responses": {
12252
- "AgentRegisterResponse": {
12253
- "description": "Agent registered and bearer token issued.",
12254
- "content": {
12255
- "application/json": {
12256
- "schema": {
12257
- "$ref": "#/components/schemas/AgentRegisterResponse"
12258
- },
12259
- "example": {
12260
- "agent_id": 42,
12261
- "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
12262
- "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
12263
- "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
12264
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
12265
- "openapi_url": "https://agentmc.example.com/api/openapi.json",
12266
- "workspace": {
12267
- "id": 7,
12268
- "name": "AgentMC Demo Workspace"
12269
- },
12270
- "server_time": "2026-02-22T17:20:53Z",
12271
- "first_sync_required": true
12272
- }
12273
- }
12274
- }
12275
- },
12276
- "AgentInstructionsResponse": {
12277
- "description": "Agent instructions returned.",
12278
- "content": {
12279
- "application/json": {
12280
- "schema": {
12281
- "$ref": "#/components/schemas/AgentInstructionsResponse"
12282
- },
12283
- "example": {
12284
- "agent_instructions": "# Agent Instructions",
12285
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
12286
- "docs": [],
12287
- "schedules": [],
12288
- "config": {}
12289
- }
12290
- }
12291
- }
12292
- },
12293
11761
  "AgentHeartbeatResponse": {
12294
11762
  "description": "Heartbeat accepted.",
12295
11763
  "content": {
@@ -12542,7 +12010,7 @@
12542
12010
  "active": true
12543
12011
  }
12544
12012
  ],
12545
- "path": "example",
12013
+ "path": ".agentmc/skills/skill.md",
12546
12014
  "per_page": 25,
12547
12015
  "total": 0
12548
12016
  }
@@ -12713,6 +12181,37 @@
12713
12181
  }
12714
12182
  }
12715
12183
  },
12184
+ "AgentInstructionsResponse": {
12185
+ "description": "Instruction bundle returned.",
12186
+ "content": {
12187
+ "application/json": {
12188
+ "schema": {
12189
+ "$ref": "#/components/schemas/AgentInstructionsResponse"
12190
+ },
12191
+ "example": {
12192
+ "ok": true,
12193
+ "changed": true,
12194
+ "bundle_version": "bundle_2fa07fcadd6575cc",
12195
+ "generated_at": "2026-02-25T14:10:00Z",
12196
+ "defaults": {
12197
+ "heartbeat_interval_seconds": 300
12198
+ },
12199
+ "agent": {
12200
+ "id": 42,
12201
+ "name": "Agent"
12202
+ },
12203
+ "files": [
12204
+ {
12205
+ "id": "skill.md",
12206
+ "path": ".agentmc/skills/skill.md",
12207
+ "content": "# AgentMC\n",
12208
+ "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
12209
+ }
12210
+ ]
12211
+ }
12212
+ }
12213
+ }
12214
+ },
12716
12215
  "HostDetailResponse": {
12717
12216
  "description": "Host returned.",
12718
12217
  "content": {