@agentmc/api 0.2.5 → 0.2.7

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.
@@ -1,128 +0,0 @@
1
- # agentInstructions
2
-
3
- - Method: `GET`
4
- - Path: `/agents/{agent}/agent-instructions`
5
- - Summary: Return agent instructions for a connected agent using bearer auth.
6
- - Auth: AgentBearerAuth
7
-
8
- ## Description
9
-
10
- No additional description.
11
-
12
- ## Parameters
13
-
14
- | Name | In | Required | Description | Example |
15
- | --- | --- | --- | --- | --- |
16
- | agent | path | yes | Agent identifier. | 1 |
17
-
18
- ## Request Example
19
-
20
- None.
21
-
22
- ## Success Responses
23
-
24
- ### 200 (application/json)
25
- Agent instructions returned.
26
-
27
- ```json
28
- {
29
- "agent_instructions": "# Agent Instructions",
30
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
31
- "docs": [],
32
- "schedules": [],
33
- "config": {}
34
- }
35
- ```
36
-
37
-
38
- ## Error Responses
39
-
40
- ### 401 (application/json)
41
- Missing or invalid credentials.
42
-
43
- ```json
44
- {
45
- "error": {
46
- "code": "validation.failed",
47
- "message": "Validation failed.",
48
- "details": {
49
- "fields": {
50
- "title": [
51
- "The title field is required."
52
- ]
53
- }
54
- }
55
- }
56
- }
57
- ```
58
-
59
- ### 403 (application/json)
60
- Forbidden.
61
-
62
- ```json
63
- {
64
- "error": {
65
- "code": "validation.failed",
66
- "message": "Validation failed.",
67
- "details": {
68
- "fields": {
69
- "title": [
70
- "The title field is required."
71
- ]
72
- }
73
- }
74
- }
75
- }
76
- ```
77
-
78
- ### 404 (application/json)
79
- Resource not found.
80
-
81
- ```json
82
- {
83
- "error": {
84
- "code": "validation.failed",
85
- "message": "Validation failed.",
86
- "details": {
87
- "fields": {
88
- "title": [
89
- "The title field is required."
90
- ]
91
- }
92
- }
93
- }
94
- }
95
- ```
96
-
97
-
98
- ## SDK Example
99
-
100
- ```ts
101
- import { AgentMCApi } from "@agentmc/api";
102
-
103
- const client = new AgentMCApi({
104
- agentToken: process.env.AGENTMC_AGENT_TOKEN
105
- });
106
-
107
- const result = await client.operations.agentInstructions({
108
- "params": {
109
- "path": {
110
- "agent": 1
111
- }
112
- }
113
- });
114
-
115
- if (result.error) {
116
- console.error(result.status, result.error);
117
- } else {
118
- console.log(result.data);
119
- }
120
- ```
121
-
122
- ## cURL Example
123
-
124
- ```bash
125
- curl -X GET "https://agentmc.ai/api/v1/agents/1/agent-instructions" \\
126
- -H "Accept: application/json" \\
127
- -H "Authorization: Bearer $AGENTMC_AGENT_TOKEN"
128
- ```
@@ -1,234 +0,0 @@
1
- # connectAgent
2
-
3
- - Method: `POST`
4
- - Path: `/agents/connect`
5
- - Summary: Connect and register one agent using a short-lived connect token.
6
- - Auth: ConnectTokenAuth
7
-
8
- ## Description
9
-
10
- No additional description.
11
-
12
- ## Parameters
13
-
14
- None.
15
-
16
- ## Request Example
17
-
18
- ### application/json
19
- ```json
20
- {
21
- "host": "ip-10-0-3-42",
22
- "runtime_version": "2026.02.1",
23
- "capabilities": [
24
- "tasks",
25
- "calendar",
26
- "realtime"
27
- ],
28
- "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
29
- "models": [
30
- {
31
- "model_id": "openai/gpt-5-codex",
32
- "provider": "openai"
33
- },
34
- {
35
- "model_id": "anthropic/claude-sonnet-4-20250514",
36
- "provider": "anthropic"
37
- }
38
- ],
39
- "identity": {
40
- "name": "Jarvis",
41
- "creature": "robot",
42
- "vibe": "calm"
43
- },
44
- "metadata": {
45
- "hostname": "worker-01",
46
- "ip": "10.0.2.15",
47
- "network": {
48
- "private_ip": "10.0.2.15",
49
- "public_ip": "34.201.22.9"
50
- },
51
- "os": "Ubuntu",
52
- "os_version": "22.04",
53
- "arch": "x86_64",
54
- "cpu": "Intel Xeon",
55
- "cpu_cores": 8,
56
- "ram_gb": 32,
57
- "disk": {
58
- "total_bytes": 512110190592,
59
- "free_bytes": 321102110720
60
- },
61
- "uptime_seconds": 86400,
62
- "runtime": {
63
- "name": "codex",
64
- "version": "2026.02.1"
65
- },
66
- "identity": {
67
- "name": "Jarvis"
68
- }
69
- }
70
- }
71
- ```
72
-
73
- ## Success Responses
74
-
75
- ### 201 (application/json)
76
- Agent connected and bearer token issued.
77
-
78
- ```json
79
- {
80
- "agent_id": 42,
81
- "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
82
- "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
83
- "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
84
- "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
85
- "openapi_url": "https://agentmc.example.com/api/openapi.json",
86
- "workspace": {
87
- "id": 7,
88
- "name": "AgentMC Demo Workspace"
89
- },
90
- "server_time": "2026-02-22T17:20:53Z",
91
- "first_sync_required": true
92
- }
93
- ```
94
-
95
-
96
- ## Error Responses
97
-
98
- ### 401 (application/json)
99
- Missing or invalid credentials.
100
-
101
- ```json
102
- {
103
- "error": {
104
- "code": "validation.failed",
105
- "message": "Validation failed.",
106
- "details": {
107
- "fields": {
108
- "title": [
109
- "The title field is required."
110
- ]
111
- }
112
- }
113
- }
114
- }
115
- ```
116
-
117
- ### 403 (application/json)
118
- Forbidden.
119
-
120
- ```json
121
- {
122
- "error": {
123
- "code": "validation.failed",
124
- "message": "Validation failed.",
125
- "details": {
126
- "fields": {
127
- "title": [
128
- "The title field is required."
129
- ]
130
- }
131
- }
132
- }
133
- }
134
- ```
135
-
136
- ### 422 (application/json)
137
- Validation failed.
138
-
139
- ```json
140
- {
141
- "error": {
142
- "code": "validation.failed",
143
- "message": "Validation failed.",
144
- "details": {
145
- "fields": {
146
- "title": [
147
- "The title field is required."
148
- ]
149
- }
150
- }
151
- }
152
- }
153
- ```
154
-
155
-
156
- ## SDK Example
157
-
158
- ```ts
159
- import { AgentMCApi } from "@agentmc/api";
160
-
161
- const client = new AgentMCApi({
162
- connectToken: process.env.AGENTMC_CONNECT_TOKEN
163
- });
164
-
165
- const result = await client.operations.connectAgent({
166
- "body": {
167
- "host": "ip-10-0-3-42",
168
- "runtime_version": "2026.02.1",
169
- "capabilities": [
170
- "tasks",
171
- "calendar",
172
- "realtime"
173
- ],
174
- "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
175
- "models": [
176
- {
177
- "model_id": "openai/gpt-5-codex",
178
- "provider": "openai"
179
- },
180
- {
181
- "model_id": "anthropic/claude-sonnet-4-20250514",
182
- "provider": "anthropic"
183
- }
184
- ],
185
- "identity": {
186
- "name": "Jarvis",
187
- "creature": "robot",
188
- "vibe": "calm"
189
- },
190
- "metadata": {
191
- "hostname": "worker-01",
192
- "ip": "10.0.2.15",
193
- "network": {
194
- "private_ip": "10.0.2.15",
195
- "public_ip": "34.201.22.9"
196
- },
197
- "os": "Ubuntu",
198
- "os_version": "22.04",
199
- "arch": "x86_64",
200
- "cpu": "Intel Xeon",
201
- "cpu_cores": 8,
202
- "ram_gb": 32,
203
- "disk": {
204
- "total_bytes": 512110190592,
205
- "free_bytes": 321102110720
206
- },
207
- "uptime_seconds": 86400,
208
- "runtime": {
209
- "name": "codex",
210
- "version": "2026.02.1"
211
- },
212
- "identity": {
213
- "name": "Jarvis"
214
- }
215
- }
216
- }
217
- });
218
-
219
- if (result.error) {
220
- console.error(result.status, result.error);
221
- } else {
222
- console.log(result.data);
223
- }
224
- ```
225
-
226
- ## cURL Example
227
-
228
- ```bash
229
- curl -X POST "https://agentmc.ai/api/v1/agents/connect" \\
230
- -H "Accept: application/json" \\
231
- -H "X-Connect-Token: $AGENTMC_CONNECT_TOKEN" \\
232
- -H "Content-Type: application/json" \\
233
- --data-raw "{\"host\":\"ip-10-0-3-42\",\"runtime_version\":\"2026.02.1\",\"capabilities\":[\"tasks\",\"calendar\",\"realtime\"],\"agents_md\":\"# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n\",\"models\":[{\"model_id\":\"openai/gpt-5-codex\",\"provider\":\"openai\"},{\"model_id\":\"anthropic/claude-sonnet-4-20250514\",\"provider\":\"anthropic\"}],\"identity\":{\"name\":\"Jarvis\",\"creature\":\"robot\",\"vibe\":\"calm\"},\"metadata\":{\"hostname\":\"worker-01\",\"ip\":\"10.0.2.15\",\"network\":{\"private_ip\":\"10.0.2.15\",\"public_ip\":\"34.201.22.9\"},\"os\":\"Ubuntu\",\"os_version\":\"22.04\",\"arch\":\"x86_64\",\"cpu\":\"Intel Xeon\",\"cpu_cores\":8,\"ram_gb\":32,\"disk\":{\"total_bytes\":512110190592,\"free_bytes\":321102110720},\"uptime_seconds\":86400,\"runtime\":{\"name\":\"codex\",\"version\":\"2026.02.1\"},\"identity\":{\"name\":\"Jarvis\"}}}"
234
- ```
@@ -1,19 +0,0 @@
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.agentInstructions({
8
- "params": {
9
- "path": {
10
- "agent": 1
11
- }
12
- }
13
- });
14
-
15
- if (result.error) {
16
- console.error(result.status, result.error);
17
- } else {
18
- console.log(result.data);
19
- }
@@ -1,65 +0,0 @@
1
- import { AgentMCApi } from "@agentmc/api";
2
-
3
- const client = new AgentMCApi({
4
- connectToken: process.env.AGENTMC_CONNECT_TOKEN
5
- });
6
-
7
- const result = await client.operations.connectAgent({
8
- "body": {
9
- "host": "ip-10-0-3-42",
10
- "runtime_version": "2026.02.1",
11
- "capabilities": [
12
- "tasks",
13
- "calendar",
14
- "realtime"
15
- ],
16
- "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
17
- "models": [
18
- {
19
- "model_id": "openai/gpt-5-codex",
20
- "provider": "openai"
21
- },
22
- {
23
- "model_id": "anthropic/claude-sonnet-4-20250514",
24
- "provider": "anthropic"
25
- }
26
- ],
27
- "identity": {
28
- "name": "Jarvis",
29
- "creature": "robot",
30
- "vibe": "calm"
31
- },
32
- "metadata": {
33
- "hostname": "worker-01",
34
- "ip": "10.0.2.15",
35
- "network": {
36
- "private_ip": "10.0.2.15",
37
- "public_ip": "34.201.22.9"
38
- },
39
- "os": "Ubuntu",
40
- "os_version": "22.04",
41
- "arch": "x86_64",
42
- "cpu": "Intel Xeon",
43
- "cpu_cores": 8,
44
- "ram_gb": 32,
45
- "disk": {
46
- "total_bytes": 512110190592,
47
- "free_bytes": 321102110720
48
- },
49
- "uptime_seconds": 86400,
50
- "runtime": {
51
- "name": "codex",
52
- "version": "2026.02.1"
53
- },
54
- "identity": {
55
- "name": "Jarvis"
56
- }
57
- }
58
- }
59
- });
60
-
61
- if (result.error) {
62
- console.error(result.status, result.error);
63
- } else {
64
- console.log(result.data);
65
- }