@agentmc/api 0.2.7 → 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.
@@ -22,6 +22,7 @@ Generated from `spec/openapi.filtered.json`.
22
22
  | [deleteCalendarItem](./deleteCalendarItem.md) | DELETE | `/calendar/items/{item}` | Calendar |
23
23
  | [deleteTask](./deleteTask.md) | DELETE | `/tasks/{task}` | Tasks |
24
24
  | [deleteTaskComment](./deleteTaskComment.md) | DELETE | `/tasks/{task}/comments/{comment}` | Tasks |
25
+ | [getAgentInstructions](./getAgentInstructions.md) | GET | `/agents/instructions` | Agents |
25
26
  | [listAgentBriefs](./listAgentBriefs.md) | GET | `/briefs` | Briefs |
26
27
  | [listAgentRealtimeRequestedSessions](./listAgentRealtimeRequestedSessions.md) | GET | `/agents/{agent}/realtime/sessions/requested` | Agents |
27
28
  | [listAgentRealtimeSignals](./listAgentRealtimeSignals.md) | GET | `/agents/{agent}/realtime/sessions/{session}/signals` | Agents |
@@ -0,0 +1,142 @@
1
+ # getAgentInstructions
2
+
3
+ - Method: `GET`
4
+ - Path: `/agents/instructions`
5
+ - Summary: Fetch the AgentMC instruction bundle for the authenticated agent.
6
+ - Auth: AgentBearerAuth
7
+
8
+ ## Description
9
+
10
+ Returns managed runtime files and bundle metadata. Send current_bundle_version to fetch files only when the bundle has changed.
11
+
12
+ ## Parameters
13
+
14
+ | Name | In | Required | Description | Example |
15
+ | --- | --- | --- | --- | --- |
16
+ | current_bundle_version | query | no | Last applied instruction bundle version from local runtime state. | "bundle_2fa07fcadd6575cc" |
17
+
18
+ ## Request Example
19
+
20
+ None.
21
+
22
+ ## Success Responses
23
+
24
+ ### 200 (application/json)
25
+ Instruction bundle returned.
26
+
27
+ ```json
28
+ {
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
+ ]
48
+ }
49
+ ```
50
+
51
+
52
+ ## Error Responses
53
+
54
+ ### 401 (application/json)
55
+ Missing or invalid credentials.
56
+
57
+ ```json
58
+ {
59
+ "error": {
60
+ "code": "validation.failed",
61
+ "message": "Validation failed.",
62
+ "details": {
63
+ "fields": {
64
+ "title": [
65
+ "The title field is required."
66
+ ]
67
+ }
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ### 403 (application/json)
74
+ Forbidden.
75
+
76
+ ```json
77
+ {
78
+ "error": {
79
+ "code": "validation.failed",
80
+ "message": "Validation failed.",
81
+ "details": {
82
+ "fields": {
83
+ "title": [
84
+ "The title field is required."
85
+ ]
86
+ }
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ ### 422 (application/json)
93
+ Validation failed.
94
+
95
+ ```json
96
+ {
97
+ "error": {
98
+ "code": "validation.failed",
99
+ "message": "Validation failed.",
100
+ "details": {
101
+ "fields": {
102
+ "title": [
103
+ "The title field is required."
104
+ ]
105
+ }
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+
112
+ ## SDK Example
113
+
114
+ ```ts
115
+ import { AgentMCApi } from "@agentmc/api";
116
+
117
+ const client = new AgentMCApi({
118
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
119
+ });
120
+
121
+ const result = await client.operations.getAgentInstructions({
122
+ "params": {
123
+ "query": {
124
+ "current_bundle_version": "bundle_2fa07fcadd6575cc"
125
+ }
126
+ }
127
+ });
128
+
129
+ if (result.error) {
130
+ console.error(result.status, result.error);
131
+ } else {
132
+ console.log(result.data);
133
+ }
134
+ ```
135
+
136
+ ## cURL Example
137
+
138
+ ```bash
139
+ curl -X GET "https://agentmc.ai/api/v1/agents/instructions?current_bundle_version=bundle_2fa07fcadd6575cc" \\
140
+ -H "Accept: application/json" \\
141
+ -H "Authorization: Bearer $AGENTMC_AGENT_TOKEN"
142
+ ```
@@ -2594,6 +2594,118 @@
2594
2594
  }
2595
2595
  ]
2596
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
+ },
2597
2709
  {
2598
2710
  "operationId": "listAgentBriefs",
2599
2711
  "method": "get",
@@ -2727,7 +2839,7 @@
2727
2839
  "active": true
2728
2840
  }
2729
2841
  ],
2730
- "path": "example",
2842
+ "path": ".agentmc/skills/skill.md",
2731
2843
  "per_page": 25,
2732
2844
  "total": 0
2733
2845
  }
@@ -3212,7 +3324,7 @@
3212
3324
  "active": true
3213
3325
  }
3214
3326
  ],
3215
- "path": "example",
3327
+ "path": ".agentmc/skills/skill.md",
3216
3328
  "per_page": 25,
3217
3329
  "total": 0
3218
3330
  }
@@ -3340,7 +3452,7 @@
3340
3452
  "active": true
3341
3453
  }
3342
3454
  ],
3343
- "path": "example",
3455
+ "path": ".agentmc/skills/skill.md",
3344
3456
  "per_page": 25,
3345
3457
  "total": 0
3346
3458
  }
@@ -3531,7 +3643,7 @@
3531
3643
  "active": true
3532
3644
  }
3533
3645
  ],
3534
- "path": "example",
3646
+ "path": ".agentmc/skills/skill.md",
3535
3647
  "per_page": 25,
3536
3648
  "total": 0
3537
3649
  }
@@ -3673,7 +3785,7 @@
3673
3785
  "active": true
3674
3786
  }
3675
3787
  ],
3676
- "path": "example",
3788
+ "path": ".agentmc/skills/skill.md",
3677
3789
  "per_page": 25,
3678
3790
  "total": 0
3679
3791
  }
@@ -3789,7 +3901,7 @@
3789
3901
  "active": true
3790
3902
  }
3791
3903
  ],
3792
- "path": "example",
3904
+ "path": ".agentmc/skills/skill.md",
3793
3905
  "per_page": 25,
3794
3906
  "total": 0
3795
3907
  }
@@ -3930,7 +4042,7 @@
3930
4042
  "active": true
3931
4043
  }
3932
4044
  ],
3933
- "path": "example",
4045
+ "path": ".agentmc/skills/skill.md",
3934
4046
  "per_page": 25,
3935
4047
  "total": 0
3936
4048
  }
@@ -4079,7 +4191,7 @@
4079
4191
  "active": true
4080
4192
  }
4081
4193
  ],
4082
- "path": "example",
4194
+ "path": ".agentmc/skills/skill.md",
4083
4195
  "per_page": 25,
4084
4196
  "total": 0
4085
4197
  }
@@ -4267,7 +4379,7 @@
4267
4379
  "active": true
4268
4380
  }
4269
4381
  ],
4270
- "path": "example",
4382
+ "path": ".agentmc/skills/skill.md",
4271
4383
  "per_page": 25,
4272
4384
  "total": 0
4273
4385
  }
@@ -4385,7 +4497,7 @@
4385
4497
  "active": true
4386
4498
  }
4387
4499
  ],
4388
- "path": "example",
4500
+ "path": ".agentmc/skills/skill.md",
4389
4501
  "per_page": 25,
4390
4502
  "total": 0
4391
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
  }
@@ -78,7 +78,7 @@ Agents returned.
78
78
  "active": true
79
79
  }
80
80
  ],
81
- "path": "example",
81
+ "path": ".agentmc/skills/skill.md",
82
82
  "per_page": 25,
83
83
  "total": 0
84
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
  }
@@ -54,7 +54,7 @@ Users returned.
54
54
  "active": true
55
55
  }
56
56
  ],
57
- "path": "example",
57
+ "path": ".agentmc/skills/skill.md",
58
58
  "per_page": 25,
59
59
  "total": 0
60
60
  }
@@ -0,0 +1,19 @@
1
+ import { AgentMCApi } from "@agentmc/api";
2
+
3
+ const client = new AgentMCApi({
4
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
5
+ });
6
+
7
+ const result = await client.operations.getAgentInstructions({
8
+ "params": {
9
+ "query": {
10
+ "current_bundle_version": "bundle_2fa07fcadd6575cc"
11
+ }
12
+ }
13
+ });
14
+
15
+ if (result.error) {
16
+ console.error(result.status, result.error);
17
+ } else {
18
+ console.log(result.data);
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentmc/api",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "AgentMC API SDK, docs, and CLI for AI agents",
5
5
  "type": "module",
6
6
  "license": "MIT",