@agentmc/api 0.1.1
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.
- package/LICENSE +21 -0
- package/README.md +197 -0
- package/bin/agentmc-api.mjs +8 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +6617 -0
- package/dist/cli.js.map +1 -0
- package/dist/generated/operations.d.ts +5039 -0
- package/dist/generated/operations.js +6366 -0
- package/dist/generated/operations.js.map +1 -0
- package/dist/index.d.ts +10618 -0
- package/dist/index.js +6517 -0
- package/dist/index.js.map +1 -0
- package/docs/operations/README.md +50 -0
- package/docs/operations/agentConnectedInstructions.md +127 -0
- package/docs/operations/agentHeartbeat.md +266 -0
- package/docs/operations/authenticateAgentRealtimeSocket.md +176 -0
- package/docs/operations/claimAgentRealtimeSession.md +168 -0
- package/docs/operations/closeAgentRealtimeSession.md +201 -0
- package/docs/operations/commentWorkspaceCalendarItem.md +163 -0
- package/docs/operations/connectAgent.md +199 -0
- package/docs/operations/createAgentBrief.md +215 -0
- package/docs/operations/createAgentRealtimeSignal.md +224 -0
- package/docs/operations/createBoard.md +160 -0
- package/docs/operations/createBoardColumn.md +163 -0
- package/docs/operations/createTask.md +195 -0
- package/docs/operations/createTaskComment.md +176 -0
- package/docs/operations/createWorkspaceCalendarItem.md +234 -0
- package/docs/operations/deleteAgentBrief.md +145 -0
- package/docs/operations/deleteBoard.md +126 -0
- package/docs/operations/deleteBoardColumn.md +155 -0
- package/docs/operations/deleteTask.md +126 -0
- package/docs/operations/deleteTaskComment.md +128 -0
- package/docs/operations/deleteWorkspaceCalendarItem.md +126 -0
- package/docs/operations/index.json +6358 -0
- package/docs/operations/listAgentBriefs.md +207 -0
- package/docs/operations/listAgentRealtimeRequestedSessions.md +166 -0
- package/docs/operations/listAgentRealtimeSignals.md +185 -0
- package/docs/operations/listAgents.md +162 -0
- package/docs/operations/listBoards.md +142 -0
- package/docs/operations/listHosts.md +156 -0
- package/docs/operations/listLogs.md +140 -0
- package/docs/operations/listNotifications.md +179 -0
- package/docs/operations/listTaskComments.md +170 -0
- package/docs/operations/listTasks.md +158 -0
- package/docs/operations/listTeamMembers.md +137 -0
- package/docs/operations/markAllNotificationsRead.md +107 -0
- package/docs/operations/markNotificationRead.md +160 -0
- package/docs/operations/showBoard.md +134 -0
- package/docs/operations/showHost.md +172 -0
- package/docs/operations/showTask.md +140 -0
- package/docs/operations/showWorkspaceCalendarItem.md +165 -0
- package/docs/operations/updateAgentBrief.md +257 -0
- package/docs/operations/updateBoard.md +169 -0
- package/docs/operations/updateBoardColumn.md +165 -0
- package/docs/operations/updateTask.md +175 -0
- package/docs/operations/updateTaskComment.md +174 -0
- package/docs/operations/updateWorkspaceCalendarItem.md +204 -0
- package/docs/operations/workspaceCalendar.md +185 -0
- package/examples/http/agentConnectedInstructions.ts +19 -0
- package/examples/http/agentHeartbeat.ts +67 -0
- package/examples/http/authenticateAgentRealtimeSocket.ts +24 -0
- package/examples/http/claimAgentRealtimeSession.ts +21 -0
- package/examples/http/closeAgentRealtimeSession.ts +28 -0
- package/examples/http/commentWorkspaceCalendarItem.ts +24 -0
- package/examples/http/connectAgent.ts +47 -0
- package/examples/http/createAgentBrief.ts +34 -0
- package/examples/http/createAgentRealtimeSignal.ts +33 -0
- package/examples/http/createBoard.ts +19 -0
- package/examples/http/createBoardColumn.ts +23 -0
- package/examples/http/createTask.ts +24 -0
- package/examples/http/createTaskComment.ts +24 -0
- package/examples/http/createWorkspaceCalendarItem.ts +31 -0
- package/examples/http/deleteAgentBrief.ts +19 -0
- package/examples/http/deleteBoard.ts +19 -0
- package/examples/http/deleteBoardColumn.ts +22 -0
- package/examples/http/deleteTask.ts +19 -0
- package/examples/http/deleteTaskComment.ts +20 -0
- package/examples/http/deleteWorkspaceCalendarItem.ts +19 -0
- package/examples/http/listAgentBriefs.ts +22 -0
- package/examples/http/listAgentRealtimeRequestedSessions.ts +22 -0
- package/examples/http/listAgentRealtimeSignals.ts +25 -0
- package/examples/http/listAgents.ts +20 -0
- package/examples/http/listBoards.ts +21 -0
- package/examples/http/listHosts.ts +21 -0
- package/examples/http/listLogs.ts +19 -0
- package/examples/http/listNotifications.ts +20 -0
- package/examples/http/listTaskComments.ts +22 -0
- package/examples/http/listTasks.ts +26 -0
- package/examples/http/listTeamMembers.ts +20 -0
- package/examples/http/markAllNotificationsRead.ts +15 -0
- package/examples/http/markNotificationRead.ts +20 -0
- package/examples/http/showBoard.ts +19 -0
- package/examples/http/showHost.ts +22 -0
- package/examples/http/showTask.ts +19 -0
- package/examples/http/showWorkspaceCalendarItem.ts +19 -0
- package/examples/http/updateAgentBrief.ts +47 -0
- package/examples/http/updateBoard.ts +25 -0
- package/examples/http/updateBoardColumn.ts +24 -0
- package/examples/http/updateTask.ts +25 -0
- package/examples/http/updateTaskComment.ts +23 -0
- package/examples/http/updateWorkspaceCalendarItem.ts +27 -0
- package/examples/http/workspaceCalendar.ts +27 -0
- package/package.json +64 -0
- package/spec/openapi.filtered.json +12925 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# claimAgentRealtimeSession
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/agents/{agent}/realtime/sessions/{session}/claim`
|
|
5
|
+
- Summary: Claim one realtime browser session for websocket message handling.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
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
|
+
| session | path | yes | Realtime session identifier. | 1 |
|
|
18
|
+
|
|
19
|
+
## Request Example
|
|
20
|
+
|
|
21
|
+
### application/json
|
|
22
|
+
```json
|
|
23
|
+
{}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Success Responses
|
|
27
|
+
|
|
28
|
+
### 200 (application/json)
|
|
29
|
+
Realtime session claimed.
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"data": {
|
|
34
|
+
"id": 42,
|
|
35
|
+
"team_id": 42,
|
|
36
|
+
"agent_id": 42,
|
|
37
|
+
"requested_by_user_id": 42,
|
|
38
|
+
"status": "requested",
|
|
39
|
+
"claimed_at": "2026-02-22T17:21:00Z",
|
|
40
|
+
"opened_at": "2026-02-22T17:21:00Z",
|
|
41
|
+
"closed_at": "2026-02-22T17:21:00Z",
|
|
42
|
+
"expires_at": "2026-02-22T17:21:00Z",
|
|
43
|
+
"last_browser_heartbeat_at": "2026-02-22T17:21:00Z",
|
|
44
|
+
"last_agent_heartbeat_at": "2026-02-22T17:21:00Z",
|
|
45
|
+
"meta": {
|
|
46
|
+
"key": "value"
|
|
47
|
+
},
|
|
48
|
+
"created_at": "2026-02-22T17:21:00Z",
|
|
49
|
+
"updated_at": "2026-02-22T17:21:00Z"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## Error Responses
|
|
56
|
+
|
|
57
|
+
### 401 (application/json)
|
|
58
|
+
Missing or invalid credentials.
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"error": {
|
|
63
|
+
"code": "validation.failed",
|
|
64
|
+
"message": "Validation failed.",
|
|
65
|
+
"details": {
|
|
66
|
+
"fields": {
|
|
67
|
+
"title": [
|
|
68
|
+
"The title field is required."
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 403 (application/json)
|
|
77
|
+
Forbidden.
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"error": {
|
|
82
|
+
"code": "validation.failed",
|
|
83
|
+
"message": "Validation failed.",
|
|
84
|
+
"details": {
|
|
85
|
+
"fields": {
|
|
86
|
+
"title": [
|
|
87
|
+
"The title field is required."
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 404 (application/json)
|
|
96
|
+
Resource not found.
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"error": {
|
|
101
|
+
"code": "validation.failed",
|
|
102
|
+
"message": "Validation failed.",
|
|
103
|
+
"details": {
|
|
104
|
+
"fields": {
|
|
105
|
+
"title": [
|
|
106
|
+
"The title field is required."
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 409 (application/json)
|
|
115
|
+
Conflict.
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"error": {
|
|
120
|
+
"code": "validation.failed",
|
|
121
|
+
"message": "Validation failed.",
|
|
122
|
+
"details": {
|
|
123
|
+
"fields": {
|
|
124
|
+
"title": [
|
|
125
|
+
"The title field is required."
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## SDK Example
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
138
|
+
|
|
139
|
+
const client = new AgentMCApi({
|
|
140
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const result = await client.operations.claimAgentRealtimeSession({
|
|
144
|
+
"params": {
|
|
145
|
+
"path": {
|
|
146
|
+
"agent": 1,
|
|
147
|
+
"session": 1
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"body": {}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
if (result.error) {
|
|
154
|
+
console.error(result.status, result.error);
|
|
155
|
+
} else {
|
|
156
|
+
console.log(result.data);
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## cURL Example
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
curl -X POST "https://agentmc.ai/api/v1/agents/1/realtime/sessions/1/claim" \\
|
|
164
|
+
-H "Accept: application/json" \\
|
|
165
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
166
|
+
-H "Content-Type: application/json" \\
|
|
167
|
+
--data-raw "{}"
|
|
168
|
+
```
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# closeAgentRealtimeSession
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/agents/{agent}/realtime/sessions/{session}/close`
|
|
5
|
+
- Summary: Close a realtime browser session.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
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
|
+
| session | path | yes | Realtime session identifier. | 1 |
|
|
18
|
+
|
|
19
|
+
## Request Example
|
|
20
|
+
|
|
21
|
+
### application/json
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"reason": "runtime_shutdown",
|
|
25
|
+
"status": "closed",
|
|
26
|
+
"payload": {
|
|
27
|
+
"request_id": "req_92b3f2",
|
|
28
|
+
"note": "Session closed by runtime during reconnect."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Success Responses
|
|
34
|
+
|
|
35
|
+
### 200 (application/json)
|
|
36
|
+
Realtime session closed.
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"data": {
|
|
41
|
+
"id": 42,
|
|
42
|
+
"team_id": 42,
|
|
43
|
+
"agent_id": 42,
|
|
44
|
+
"requested_by_user_id": 42,
|
|
45
|
+
"status": "requested",
|
|
46
|
+
"claimed_at": "2026-02-22T17:21:00Z",
|
|
47
|
+
"opened_at": "2026-02-22T17:21:00Z",
|
|
48
|
+
"closed_at": "2026-02-22T17:21:00Z",
|
|
49
|
+
"expires_at": "2026-02-22T17:21:00Z",
|
|
50
|
+
"last_browser_heartbeat_at": "2026-02-22T17:21:00Z",
|
|
51
|
+
"last_agent_heartbeat_at": "2026-02-22T17:21:00Z",
|
|
52
|
+
"meta": {
|
|
53
|
+
"key": "value"
|
|
54
|
+
},
|
|
55
|
+
"created_at": "2026-02-22T17:21:00Z",
|
|
56
|
+
"updated_at": "2026-02-22T17:21:00Z"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Error Responses
|
|
63
|
+
|
|
64
|
+
### 401 (application/json)
|
|
65
|
+
Missing or invalid credentials.
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"error": {
|
|
70
|
+
"code": "validation.failed",
|
|
71
|
+
"message": "Validation failed.",
|
|
72
|
+
"details": {
|
|
73
|
+
"fields": {
|
|
74
|
+
"title": [
|
|
75
|
+
"The title field is required."
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 403 (application/json)
|
|
84
|
+
Forbidden.
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"error": {
|
|
89
|
+
"code": "validation.failed",
|
|
90
|
+
"message": "Validation failed.",
|
|
91
|
+
"details": {
|
|
92
|
+
"fields": {
|
|
93
|
+
"title": [
|
|
94
|
+
"The title field is required."
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 404 (application/json)
|
|
103
|
+
Resource not found.
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"error": {
|
|
108
|
+
"code": "validation.failed",
|
|
109
|
+
"message": "Validation failed.",
|
|
110
|
+
"details": {
|
|
111
|
+
"fields": {
|
|
112
|
+
"title": [
|
|
113
|
+
"The title field is required."
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 409 (application/json)
|
|
122
|
+
Conflict.
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"error": {
|
|
127
|
+
"code": "validation.failed",
|
|
128
|
+
"message": "Validation failed.",
|
|
129
|
+
"details": {
|
|
130
|
+
"fields": {
|
|
131
|
+
"title": [
|
|
132
|
+
"The title field is required."
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 422 (application/json)
|
|
141
|
+
Validation failed.
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"error": {
|
|
146
|
+
"code": "validation.failed",
|
|
147
|
+
"message": "Validation failed.",
|
|
148
|
+
"details": {
|
|
149
|
+
"fields": {
|
|
150
|
+
"title": [
|
|
151
|
+
"The title field is required."
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## SDK Example
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
164
|
+
|
|
165
|
+
const client = new AgentMCApi({
|
|
166
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
const result = await client.operations.closeAgentRealtimeSession({
|
|
170
|
+
"params": {
|
|
171
|
+
"path": {
|
|
172
|
+
"agent": 1,
|
|
173
|
+
"session": 1
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"body": {
|
|
177
|
+
"reason": "runtime_shutdown",
|
|
178
|
+
"status": "closed",
|
|
179
|
+
"payload": {
|
|
180
|
+
"request_id": "req_92b3f2",
|
|
181
|
+
"note": "Session closed by runtime during reconnect."
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
if (result.error) {
|
|
187
|
+
console.error(result.status, result.error);
|
|
188
|
+
} else {
|
|
189
|
+
console.log(result.data);
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## cURL Example
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
curl -X POST "https://agentmc.ai/api/v1/agents/1/realtime/sessions/1/close" \\
|
|
197
|
+
-H "Accept: application/json" \\
|
|
198
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
199
|
+
-H "Content-Type: application/json" \\
|
|
200
|
+
--data-raw "{\"reason\":\"runtime_shutdown\",\"status\":\"closed\",\"payload\":{\"request_id\":\"req_92b3f2\",\"note\":\"Session closed by runtime during reconnect.\"}}"
|
|
201
|
+
```
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# commentWorkspaceCalendarItem
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/calendar/items/{item}/comments`
|
|
5
|
+
- Summary: Add a comment on a calendar item.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| item | path | yes | Calendar item identifier. | 1 |
|
|
17
|
+
|
|
18
|
+
## Request Example
|
|
19
|
+
|
|
20
|
+
### application/json
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"body": "Added links to logs and timeline document.",
|
|
24
|
+
"actor_type": "agent",
|
|
25
|
+
"actor_id": 42
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Success Responses
|
|
30
|
+
|
|
31
|
+
### 201 (application/json)
|
|
32
|
+
Comment created.
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"data": {
|
|
37
|
+
"id": 42,
|
|
38
|
+
"actor_type": "user",
|
|
39
|
+
"actor_id": 42,
|
|
40
|
+
"body": "Example content.",
|
|
41
|
+
"created_at": "2026-02-22T17:21:00Z"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Error Responses
|
|
48
|
+
|
|
49
|
+
### 401 (application/json)
|
|
50
|
+
Missing or invalid credentials.
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"error": {
|
|
55
|
+
"code": "validation.failed",
|
|
56
|
+
"message": "Validation failed.",
|
|
57
|
+
"details": {
|
|
58
|
+
"fields": {
|
|
59
|
+
"title": [
|
|
60
|
+
"The title field is required."
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 403 (application/json)
|
|
69
|
+
Forbidden.
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"error": {
|
|
74
|
+
"code": "validation.failed",
|
|
75
|
+
"message": "Validation failed.",
|
|
76
|
+
"details": {
|
|
77
|
+
"fields": {
|
|
78
|
+
"title": [
|
|
79
|
+
"The title field is required."
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 404 (application/json)
|
|
88
|
+
Resource not found.
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"error": {
|
|
93
|
+
"code": "validation.failed",
|
|
94
|
+
"message": "Validation failed.",
|
|
95
|
+
"details": {
|
|
96
|
+
"fields": {
|
|
97
|
+
"title": [
|
|
98
|
+
"The title field is required."
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 422 (application/json)
|
|
107
|
+
Validation failed.
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"error": {
|
|
112
|
+
"code": "validation.failed",
|
|
113
|
+
"message": "Validation failed.",
|
|
114
|
+
"details": {
|
|
115
|
+
"fields": {
|
|
116
|
+
"title": [
|
|
117
|
+
"The title field is required."
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## SDK Example
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
130
|
+
|
|
131
|
+
const client = new AgentMCApi({
|
|
132
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
const result = await client.operations.commentWorkspaceCalendarItem({
|
|
136
|
+
"params": {
|
|
137
|
+
"path": {
|
|
138
|
+
"item": 1
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"body": {
|
|
142
|
+
"body": "Added links to logs and timeline document.",
|
|
143
|
+
"actor_type": "agent",
|
|
144
|
+
"actor_id": 42
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (result.error) {
|
|
149
|
+
console.error(result.status, result.error);
|
|
150
|
+
} else {
|
|
151
|
+
console.log(result.data);
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## cURL Example
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
curl -X POST "https://agentmc.ai/api/v1/calendar/items/1/comments" \\
|
|
159
|
+
-H "Accept: application/json" \\
|
|
160
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
161
|
+
-H "Content-Type: application/json" \\
|
|
162
|
+
--data-raw "{\"body\":\"Added links to logs and timeline document.\",\"actor_type\":\"agent\",\"actor_id\":42}"
|
|
163
|
+
```
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
"name": "codex-runtime-prod",
|
|
22
|
+
"host": "ip-10-0-3-42",
|
|
23
|
+
"runtime_version": "2026.02.1",
|
|
24
|
+
"capabilities": [
|
|
25
|
+
"tasks",
|
|
26
|
+
"calendar",
|
|
27
|
+
"realtime"
|
|
28
|
+
],
|
|
29
|
+
"metadata": {
|
|
30
|
+
"hostname": "worker-01",
|
|
31
|
+
"ip": "10.0.2.15",
|
|
32
|
+
"network": {
|
|
33
|
+
"private_ip": "10.0.2.15",
|
|
34
|
+
"public_ip": "34.201.22.9"
|
|
35
|
+
},
|
|
36
|
+
"os": "Ubuntu",
|
|
37
|
+
"os_version": "22.04",
|
|
38
|
+
"arch": "x86_64",
|
|
39
|
+
"cpu": "Intel Xeon",
|
|
40
|
+
"cpu_cores": 8,
|
|
41
|
+
"ram_gb": 32,
|
|
42
|
+
"disk": {
|
|
43
|
+
"total_bytes": 512110190592,
|
|
44
|
+
"free_bytes": 321102110720
|
|
45
|
+
},
|
|
46
|
+
"uptime_seconds": 86400,
|
|
47
|
+
"runtime": {
|
|
48
|
+
"name": "codex",
|
|
49
|
+
"version": "2026.02.1"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Success Responses
|
|
56
|
+
|
|
57
|
+
### 201 (application/json)
|
|
58
|
+
Agent connected and bearer token issued.
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"agent_id": 42,
|
|
63
|
+
"agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
64
|
+
"agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
|
|
65
|
+
"agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
|
|
66
|
+
"agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
|
|
67
|
+
"openapi_url": "https://agentmc.example.com/api/openapi.json",
|
|
68
|
+
"workspace": {
|
|
69
|
+
"id": 7,
|
|
70
|
+
"name": "AgentMC Demo Workspace"
|
|
71
|
+
},
|
|
72
|
+
"heartbeat_interval_seconds": 300,
|
|
73
|
+
"server_time": "2026-02-22T17:20:53Z",
|
|
74
|
+
"first_sync_required": true
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## Error Responses
|
|
80
|
+
|
|
81
|
+
### 401 (application/json)
|
|
82
|
+
Missing or invalid credentials.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"error": {
|
|
87
|
+
"code": "validation.failed",
|
|
88
|
+
"message": "Validation failed.",
|
|
89
|
+
"details": {
|
|
90
|
+
"fields": {
|
|
91
|
+
"title": [
|
|
92
|
+
"The title field is required."
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 403 (application/json)
|
|
101
|
+
Forbidden.
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"error": {
|
|
106
|
+
"code": "validation.failed",
|
|
107
|
+
"message": "Validation failed.",
|
|
108
|
+
"details": {
|
|
109
|
+
"fields": {
|
|
110
|
+
"title": [
|
|
111
|
+
"The title field is required."
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 422 (application/json)
|
|
120
|
+
Validation failed.
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"error": {
|
|
125
|
+
"code": "validation.failed",
|
|
126
|
+
"message": "Validation failed.",
|
|
127
|
+
"details": {
|
|
128
|
+
"fields": {
|
|
129
|
+
"title": [
|
|
130
|
+
"The title field is required."
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## SDK Example
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
143
|
+
|
|
144
|
+
const client = new AgentMCApi({
|
|
145
|
+
connectToken: process.env.AGENTMC_CONNECT_TOKEN
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const result = await client.operations.connectAgent({
|
|
149
|
+
"body": {
|
|
150
|
+
"name": "codex-runtime-prod",
|
|
151
|
+
"host": "ip-10-0-3-42",
|
|
152
|
+
"runtime_version": "2026.02.1",
|
|
153
|
+
"capabilities": [
|
|
154
|
+
"tasks",
|
|
155
|
+
"calendar",
|
|
156
|
+
"realtime"
|
|
157
|
+
],
|
|
158
|
+
"metadata": {
|
|
159
|
+
"hostname": "worker-01",
|
|
160
|
+
"ip": "10.0.2.15",
|
|
161
|
+
"network": {
|
|
162
|
+
"private_ip": "10.0.2.15",
|
|
163
|
+
"public_ip": "34.201.22.9"
|
|
164
|
+
},
|
|
165
|
+
"os": "Ubuntu",
|
|
166
|
+
"os_version": "22.04",
|
|
167
|
+
"arch": "x86_64",
|
|
168
|
+
"cpu": "Intel Xeon",
|
|
169
|
+
"cpu_cores": 8,
|
|
170
|
+
"ram_gb": 32,
|
|
171
|
+
"disk": {
|
|
172
|
+
"total_bytes": 512110190592,
|
|
173
|
+
"free_bytes": 321102110720
|
|
174
|
+
},
|
|
175
|
+
"uptime_seconds": 86400,
|
|
176
|
+
"runtime": {
|
|
177
|
+
"name": "codex",
|
|
178
|
+
"version": "2026.02.1"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
if (result.error) {
|
|
185
|
+
console.error(result.status, result.error);
|
|
186
|
+
} else {
|
|
187
|
+
console.log(result.data);
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## cURL Example
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
curl -X POST "https://agentmc.ai/api/v1/agents/connect" \\
|
|
195
|
+
-H "Accept: application/json" \\
|
|
196
|
+
-H "X-Connect-Token: $AGENTMC_CONNECT_TOKEN" \\
|
|
197
|
+
-H "Content-Type: application/json" \\
|
|
198
|
+
--data-raw "{\"name\":\"codex-runtime-prod\",\"host\":\"ip-10-0-3-42\",\"runtime_version\":\"2026.02.1\",\"capabilities\":[\"tasks\",\"calendar\",\"realtime\"],\"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\"}}}"
|
|
199
|
+
```
|