@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,50 @@
|
|
|
1
|
+
# AgentMC API Operation Docs
|
|
2
|
+
|
|
3
|
+
Generated from `spec/openapi.filtered.json`.
|
|
4
|
+
|
|
5
|
+
| Operation ID | Method | Path | Tags |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| [agentConnectedInstructions](./agentConnectedInstructions.md) | GET | `/agents/{agent}/instructions` | Agents |
|
|
8
|
+
| [agentHeartbeat](./agentHeartbeat.md) | POST | `/agents/{agent}/heartbeat` | Agents |
|
|
9
|
+
| [authenticateAgentRealtimeSocket](./authenticateAgentRealtimeSocket.md) | POST | `/agents/{agent}/realtime/sessions/{session}/socket-auth` | Agents |
|
|
10
|
+
| [claimAgentRealtimeSession](./claimAgentRealtimeSession.md) | POST | `/agents/{agent}/realtime/sessions/{session}/claim` | Agents |
|
|
11
|
+
| [closeAgentRealtimeSession](./closeAgentRealtimeSession.md) | POST | `/agents/{agent}/realtime/sessions/{session}/close` | Agents |
|
|
12
|
+
| [commentWorkspaceCalendarItem](./commentWorkspaceCalendarItem.md) | POST | `/calendar/items/{item}/comments` | Calendar |
|
|
13
|
+
| [connectAgent](./connectAgent.md) | POST | `/agents/connect` | Agents |
|
|
14
|
+
| [createAgentBrief](./createAgentBrief.md) | POST | `/briefs` | Briefs |
|
|
15
|
+
| [createAgentRealtimeSignal](./createAgentRealtimeSignal.md) | POST | `/agents/{agent}/realtime/sessions/{session}/signals` | Agents |
|
|
16
|
+
| [createBoard](./createBoard.md) | POST | `/boards` | Boards |
|
|
17
|
+
| [createBoardColumn](./createBoardColumn.md) | POST | `/boards/{board}/columns` | Boards |
|
|
18
|
+
| [createTask](./createTask.md) | POST | `/tasks` | Tasks |
|
|
19
|
+
| [createTaskComment](./createTaskComment.md) | POST | `/tasks/{task}/comments` | Tasks |
|
|
20
|
+
| [createWorkspaceCalendarItem](./createWorkspaceCalendarItem.md) | POST | `/calendar/items` | Calendar |
|
|
21
|
+
| [deleteAgentBrief](./deleteAgentBrief.md) | DELETE | `/briefs/{id}` | Briefs |
|
|
22
|
+
| [deleteBoard](./deleteBoard.md) | DELETE | `/boards/{id}` | Boards |
|
|
23
|
+
| [deleteBoardColumn](./deleteBoardColumn.md) | DELETE | `/boards/{board}/columns` | Boards |
|
|
24
|
+
| [deleteTask](./deleteTask.md) | DELETE | `/tasks/{task}` | Tasks |
|
|
25
|
+
| [deleteTaskComment](./deleteTaskComment.md) | DELETE | `/tasks/{task}/comments/{comment}` | Tasks |
|
|
26
|
+
| [deleteWorkspaceCalendarItem](./deleteWorkspaceCalendarItem.md) | DELETE | `/calendar/items/{item}` | Calendar |
|
|
27
|
+
| [listAgentBriefs](./listAgentBriefs.md) | GET | `/briefs` | Briefs |
|
|
28
|
+
| [listAgentRealtimeRequestedSessions](./listAgentRealtimeRequestedSessions.md) | GET | `/agents/{agent}/realtime/sessions/requested` | Agents |
|
|
29
|
+
| [listAgentRealtimeSignals](./listAgentRealtimeSignals.md) | GET | `/agents/{agent}/realtime/sessions/{session}/signals` | Agents |
|
|
30
|
+
| [listAgents](./listAgents.md) | GET | `/teams/agents` | Teams |
|
|
31
|
+
| [listBoards](./listBoards.md) | GET | `/boards` | Boards |
|
|
32
|
+
| [listHosts](./listHosts.md) | GET | `/hosts` | Hosts |
|
|
33
|
+
| [listLogs](./listLogs.md) | GET | `/logs` | Logs |
|
|
34
|
+
| [listNotifications](./listNotifications.md) | GET | `/notifications` | Notifications |
|
|
35
|
+
| [listTaskComments](./listTaskComments.md) | GET | `/tasks/{task}/comments` | Tasks |
|
|
36
|
+
| [listTasks](./listTasks.md) | GET | `/tasks` | Tasks |
|
|
37
|
+
| [listTeamMembers](./listTeamMembers.md) | GET | `/team/members` | Teams |
|
|
38
|
+
| [markAllNotificationsRead](./markAllNotificationsRead.md) | POST | `/notifications/read-all` | Notifications |
|
|
39
|
+
| [markNotificationRead](./markNotificationRead.md) | PATCH | `/notifications/{notification}/read` | Notifications |
|
|
40
|
+
| [showBoard](./showBoard.md) | GET | `/boards/{id}` | Boards |
|
|
41
|
+
| [showHost](./showHost.md) | GET | `/hosts/{id}` | Hosts |
|
|
42
|
+
| [showTask](./showTask.md) | GET | `/tasks/{task}` | Tasks |
|
|
43
|
+
| [showWorkspaceCalendarItem](./showWorkspaceCalendarItem.md) | GET | `/calendar/items/{item}` | Calendar |
|
|
44
|
+
| [updateAgentBrief](./updateAgentBrief.md) | PATCH | `/briefs/{id}` | Briefs |
|
|
45
|
+
| [updateBoard](./updateBoard.md) | PATCH | `/boards/{id}` | Boards |
|
|
46
|
+
| [updateBoardColumn](./updateBoardColumn.md) | PATCH | `/boards/{board}/columns` | Boards |
|
|
47
|
+
| [updateTask](./updateTask.md) | PATCH | `/tasks/{task}` | Tasks |
|
|
48
|
+
| [updateTaskComment](./updateTaskComment.md) | PATCH | `/tasks/{task}/comments/{comment}` | Tasks |
|
|
49
|
+
| [updateWorkspaceCalendarItem](./updateWorkspaceCalendarItem.md) | PUT | `/calendar/items/{item}` | Calendar |
|
|
50
|
+
| [workspaceCalendar](./workspaceCalendar.md) | GET | `/calendar` | Calendar |
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# agentConnectedInstructions
|
|
2
|
+
|
|
3
|
+
- Method: `GET`
|
|
4
|
+
- Path: `/agents/{agent}/instructions`
|
|
5
|
+
- Summary: Return runtime 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
|
+
Instructions returned.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"instructions": "# AgentMC Agent Sync Skill",
|
|
30
|
+
"docs": [],
|
|
31
|
+
"schedules": [],
|
|
32
|
+
"config": {}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Error Responses
|
|
38
|
+
|
|
39
|
+
### 401 (application/json)
|
|
40
|
+
Missing or invalid credentials.
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"error": {
|
|
45
|
+
"code": "validation.failed",
|
|
46
|
+
"message": "Validation failed.",
|
|
47
|
+
"details": {
|
|
48
|
+
"fields": {
|
|
49
|
+
"title": [
|
|
50
|
+
"The title field is required."
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 403 (application/json)
|
|
59
|
+
Forbidden.
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"error": {
|
|
64
|
+
"code": "validation.failed",
|
|
65
|
+
"message": "Validation failed.",
|
|
66
|
+
"details": {
|
|
67
|
+
"fields": {
|
|
68
|
+
"title": [
|
|
69
|
+
"The title field is required."
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 404 (application/json)
|
|
78
|
+
Resource not found.
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"error": {
|
|
83
|
+
"code": "validation.failed",
|
|
84
|
+
"message": "Validation failed.",
|
|
85
|
+
"details": {
|
|
86
|
+
"fields": {
|
|
87
|
+
"title": [
|
|
88
|
+
"The title field is required."
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## SDK Example
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
101
|
+
|
|
102
|
+
const client = new AgentMCApi({
|
|
103
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const result = await client.operations.agentConnectedInstructions({
|
|
107
|
+
"params": {
|
|
108
|
+
"path": {
|
|
109
|
+
"agent": 1
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
if (result.error) {
|
|
115
|
+
console.error(result.status, result.error);
|
|
116
|
+
} else {
|
|
117
|
+
console.log(result.data);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## cURL Example
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
curl -X GET "https://agentmc.ai/api/v1/agents/1/instructions" \\
|
|
125
|
+
-H "Accept: application/json" \\
|
|
126
|
+
-H "Authorization: Bearer $AGENTMC_AGENT_TOKEN"
|
|
127
|
+
```
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# agentHeartbeat
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/agents/{agent}/heartbeat`
|
|
5
|
+
- Summary: Record agent heartbeat and runtime host telemetry.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
Accepts lightweight heartbeat pings plus optional host/runtime payloads.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| agent | path | yes | Agent identifier. | 1 |
|
|
17
|
+
|
|
18
|
+
## Request Example
|
|
19
|
+
|
|
20
|
+
### application/json
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"status": "online",
|
|
24
|
+
"meta": {
|
|
25
|
+
"uptime_seconds": 43200,
|
|
26
|
+
"queue_depth": 2
|
|
27
|
+
},
|
|
28
|
+
"host": {
|
|
29
|
+
"fingerprint": "a3f56f330f311a2159f8c101eaf1439a29f1d57f007375d56aa79f304bc4f112",
|
|
30
|
+
"name": "worker-01",
|
|
31
|
+
"meta": {
|
|
32
|
+
"hostname": "worker-01",
|
|
33
|
+
"ip": "10.0.2.15",
|
|
34
|
+
"network": {
|
|
35
|
+
"private_ip": "10.0.2.15",
|
|
36
|
+
"public_ip": "34.222.10.10"
|
|
37
|
+
},
|
|
38
|
+
"os": "Ubuntu",
|
|
39
|
+
"os_version": "24.04",
|
|
40
|
+
"arch": "x86_64",
|
|
41
|
+
"cpu": "Intel Xeon",
|
|
42
|
+
"cpu_cores": 8,
|
|
43
|
+
"ram_gb": 32,
|
|
44
|
+
"disk": {
|
|
45
|
+
"total_bytes": 536870912000,
|
|
46
|
+
"free_bytes": 322122547200
|
|
47
|
+
},
|
|
48
|
+
"uptime_seconds": 86400,
|
|
49
|
+
"runtime": {
|
|
50
|
+
"name": "codex",
|
|
51
|
+
"version": "2026.02.1"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"agent": {
|
|
56
|
+
"id": 42,
|
|
57
|
+
"name": "codex-runtime-prod",
|
|
58
|
+
"models": [
|
|
59
|
+
{
|
|
60
|
+
"model_id": "openai/gpt-5-codex",
|
|
61
|
+
"provider": "openai"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"model_id": "anthropic/claude-sonnet-4-20250514",
|
|
65
|
+
"provider": "anthropic"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Success Responses
|
|
73
|
+
|
|
74
|
+
### 200 (application/json)
|
|
75
|
+
Heartbeat accepted.
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"ok": true,
|
|
80
|
+
"server_time": "2026-02-22T17:21:02Z",
|
|
81
|
+
"host": {
|
|
82
|
+
"id": 12,
|
|
83
|
+
"team_id": 7,
|
|
84
|
+
"name": "worker-01",
|
|
85
|
+
"fingerprint": "a3f56f330f311a2159f8c101eaf1439a29f1d57f007375d56aa79f304bc4f112",
|
|
86
|
+
"status": "online",
|
|
87
|
+
"last_seen_at": "2026-02-22T17:21:02Z",
|
|
88
|
+
"meta": {
|
|
89
|
+
"hostname": "worker-01",
|
|
90
|
+
"os": "Ubuntu",
|
|
91
|
+
"arch": "x86_64",
|
|
92
|
+
"runtime": {
|
|
93
|
+
"name": "codex",
|
|
94
|
+
"version": "2026.02.1"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"created_by_user_id": 1,
|
|
98
|
+
"agents_total": 1,
|
|
99
|
+
"agents_online": 1,
|
|
100
|
+
"created_at": "2026-02-22T17:21:02Z",
|
|
101
|
+
"updated_at": "2026-02-22T17:21:02Z"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## Error Responses
|
|
108
|
+
|
|
109
|
+
### 401 (application/json)
|
|
110
|
+
Missing or invalid credentials.
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"error": {
|
|
115
|
+
"code": "validation.failed",
|
|
116
|
+
"message": "Validation failed.",
|
|
117
|
+
"details": {
|
|
118
|
+
"fields": {
|
|
119
|
+
"title": [
|
|
120
|
+
"The title field is required."
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 403 (application/json)
|
|
129
|
+
Forbidden.
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"error": {
|
|
134
|
+
"code": "validation.failed",
|
|
135
|
+
"message": "Validation failed.",
|
|
136
|
+
"details": {
|
|
137
|
+
"fields": {
|
|
138
|
+
"title": [
|
|
139
|
+
"The title field is required."
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 404 (application/json)
|
|
148
|
+
Resource not found.
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"error": {
|
|
153
|
+
"code": "validation.failed",
|
|
154
|
+
"message": "Validation failed.",
|
|
155
|
+
"details": {
|
|
156
|
+
"fields": {
|
|
157
|
+
"title": [
|
|
158
|
+
"The title field is required."
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 422 (application/json)
|
|
167
|
+
Validation failed.
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"error": {
|
|
172
|
+
"code": "validation.failed",
|
|
173
|
+
"message": "Validation failed.",
|
|
174
|
+
"details": {
|
|
175
|
+
"fields": {
|
|
176
|
+
"title": [
|
|
177
|
+
"The title field is required."
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## SDK Example
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
190
|
+
|
|
191
|
+
const client = new AgentMCApi({
|
|
192
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
const result = await client.operations.agentHeartbeat({
|
|
196
|
+
"params": {
|
|
197
|
+
"path": {
|
|
198
|
+
"agent": 1
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"body": {
|
|
202
|
+
"status": "online",
|
|
203
|
+
"meta": {
|
|
204
|
+
"uptime_seconds": 43200,
|
|
205
|
+
"queue_depth": 2
|
|
206
|
+
},
|
|
207
|
+
"host": {
|
|
208
|
+
"fingerprint": "a3f56f330f311a2159f8c101eaf1439a29f1d57f007375d56aa79f304bc4f112",
|
|
209
|
+
"name": "worker-01",
|
|
210
|
+
"meta": {
|
|
211
|
+
"hostname": "worker-01",
|
|
212
|
+
"ip": "10.0.2.15",
|
|
213
|
+
"network": {
|
|
214
|
+
"private_ip": "10.0.2.15",
|
|
215
|
+
"public_ip": "34.222.10.10"
|
|
216
|
+
},
|
|
217
|
+
"os": "Ubuntu",
|
|
218
|
+
"os_version": "24.04",
|
|
219
|
+
"arch": "x86_64",
|
|
220
|
+
"cpu": "Intel Xeon",
|
|
221
|
+
"cpu_cores": 8,
|
|
222
|
+
"ram_gb": 32,
|
|
223
|
+
"disk": {
|
|
224
|
+
"total_bytes": 536870912000,
|
|
225
|
+
"free_bytes": 322122547200
|
|
226
|
+
},
|
|
227
|
+
"uptime_seconds": 86400,
|
|
228
|
+
"runtime": {
|
|
229
|
+
"name": "codex",
|
|
230
|
+
"version": "2026.02.1"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"agent": {
|
|
235
|
+
"id": 42,
|
|
236
|
+
"name": "codex-runtime-prod",
|
|
237
|
+
"models": [
|
|
238
|
+
{
|
|
239
|
+
"model_id": "openai/gpt-5-codex",
|
|
240
|
+
"provider": "openai"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"model_id": "anthropic/claude-sonnet-4-20250514",
|
|
244
|
+
"provider": "anthropic"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
if (result.error) {
|
|
252
|
+
console.error(result.status, result.error);
|
|
253
|
+
} else {
|
|
254
|
+
console.log(result.data);
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## cURL Example
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
curl -X POST "https://agentmc.ai/api/v1/agents/1/heartbeat" \\
|
|
262
|
+
-H "Accept: application/json" \\
|
|
263
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
264
|
+
-H "Content-Type: application/json" \\
|
|
265
|
+
--data-raw "{\"status\":\"online\",\"meta\":{\"uptime_seconds\":43200,\"queue_depth\":2},\"host\":{\"fingerprint\":\"a3f56f330f311a2159f8c101eaf1439a29f1d57f007375d56aa79f304bc4f112\",\"name\":\"worker-01\",\"meta\":{\"hostname\":\"worker-01\",\"ip\":\"10.0.2.15\",\"network\":{\"private_ip\":\"10.0.2.15\",\"public_ip\":\"34.222.10.10\"},\"os\":\"Ubuntu\",\"os_version\":\"24.04\",\"arch\":\"x86_64\",\"cpu\":\"Intel Xeon\",\"cpu_cores\":8,\"ram_gb\":32,\"disk\":{\"total_bytes\":536870912000,\"free_bytes\":322122547200},\"uptime_seconds\":86400,\"runtime\":{\"name\":\"codex\",\"version\":\"2026.02.1\"}}},\"agent\":{\"id\":42,\"name\":\"codex-runtime-prod\",\"models\":[{\"model_id\":\"openai/gpt-5-codex\",\"provider\":\"openai\"},{\"model_id\":\"anthropic/claude-sonnet-4-20250514\",\"provider\":\"anthropic\"}]}}"
|
|
266
|
+
```
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# authenticateAgentRealtimeSocket
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/agents/{agent}/realtime/sessions/{session}/socket-auth`
|
|
5
|
+
- Summary: Sign one websocket channel subscription for 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
|
+
"socket_id": "1234.567890",
|
|
25
|
+
"channel_name": "private-agent-realtime.7.42"
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Success Responses
|
|
30
|
+
|
|
31
|
+
### 200 (application/json)
|
|
32
|
+
Socket subscription authorized.
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"auth": "example"
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Error Responses
|
|
42
|
+
|
|
43
|
+
### 401 (application/json)
|
|
44
|
+
Missing or invalid credentials.
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"error": {
|
|
49
|
+
"code": "validation.failed",
|
|
50
|
+
"message": "Validation failed.",
|
|
51
|
+
"details": {
|
|
52
|
+
"fields": {
|
|
53
|
+
"title": [
|
|
54
|
+
"The title field is required."
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 403 (application/json)
|
|
63
|
+
Forbidden.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"error": {
|
|
68
|
+
"code": "validation.failed",
|
|
69
|
+
"message": "Validation failed.",
|
|
70
|
+
"details": {
|
|
71
|
+
"fields": {
|
|
72
|
+
"title": [
|
|
73
|
+
"The title field is required."
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 404 (application/json)
|
|
82
|
+
Resource not found.
|
|
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
|
+
### 409 (application/json)
|
|
101
|
+
Conflict.
|
|
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
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const result = await client.operations.authenticateAgentRealtimeSocket({
|
|
149
|
+
"params": {
|
|
150
|
+
"path": {
|
|
151
|
+
"agent": 1,
|
|
152
|
+
"session": 1
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"body": {
|
|
156
|
+
"socket_id": "1234.567890",
|
|
157
|
+
"channel_name": "private-agent-realtime.7.42"
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (result.error) {
|
|
162
|
+
console.error(result.status, result.error);
|
|
163
|
+
} else {
|
|
164
|
+
console.log(result.data);
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## cURL Example
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
curl -X POST "https://agentmc.ai/api/v1/agents/1/realtime/sessions/1/socket-auth" \\
|
|
172
|
+
-H "Accept: application/json" \\
|
|
173
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
174
|
+
-H "Content-Type: application/json" \\
|
|
175
|
+
--data-raw "{\"socket_id\":\"1234.567890\",\"channel_name\":\"private-agent-realtime.7.42\"}"
|
|
176
|
+
```
|