@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.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/bin/agentmc-api.mjs +8 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.js +6617 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/generated/operations.d.ts +5039 -0
  8. package/dist/generated/operations.js +6366 -0
  9. package/dist/generated/operations.js.map +1 -0
  10. package/dist/index.d.ts +10618 -0
  11. package/dist/index.js +6517 -0
  12. package/dist/index.js.map +1 -0
  13. package/docs/operations/README.md +50 -0
  14. package/docs/operations/agentConnectedInstructions.md +127 -0
  15. package/docs/operations/agentHeartbeat.md +266 -0
  16. package/docs/operations/authenticateAgentRealtimeSocket.md +176 -0
  17. package/docs/operations/claimAgentRealtimeSession.md +168 -0
  18. package/docs/operations/closeAgentRealtimeSession.md +201 -0
  19. package/docs/operations/commentWorkspaceCalendarItem.md +163 -0
  20. package/docs/operations/connectAgent.md +199 -0
  21. package/docs/operations/createAgentBrief.md +215 -0
  22. package/docs/operations/createAgentRealtimeSignal.md +224 -0
  23. package/docs/operations/createBoard.md +160 -0
  24. package/docs/operations/createBoardColumn.md +163 -0
  25. package/docs/operations/createTask.md +195 -0
  26. package/docs/operations/createTaskComment.md +176 -0
  27. package/docs/operations/createWorkspaceCalendarItem.md +234 -0
  28. package/docs/operations/deleteAgentBrief.md +145 -0
  29. package/docs/operations/deleteBoard.md +126 -0
  30. package/docs/operations/deleteBoardColumn.md +155 -0
  31. package/docs/operations/deleteTask.md +126 -0
  32. package/docs/operations/deleteTaskComment.md +128 -0
  33. package/docs/operations/deleteWorkspaceCalendarItem.md +126 -0
  34. package/docs/operations/index.json +6358 -0
  35. package/docs/operations/listAgentBriefs.md +207 -0
  36. package/docs/operations/listAgentRealtimeRequestedSessions.md +166 -0
  37. package/docs/operations/listAgentRealtimeSignals.md +185 -0
  38. package/docs/operations/listAgents.md +162 -0
  39. package/docs/operations/listBoards.md +142 -0
  40. package/docs/operations/listHosts.md +156 -0
  41. package/docs/operations/listLogs.md +140 -0
  42. package/docs/operations/listNotifications.md +179 -0
  43. package/docs/operations/listTaskComments.md +170 -0
  44. package/docs/operations/listTasks.md +158 -0
  45. package/docs/operations/listTeamMembers.md +137 -0
  46. package/docs/operations/markAllNotificationsRead.md +107 -0
  47. package/docs/operations/markNotificationRead.md +160 -0
  48. package/docs/operations/showBoard.md +134 -0
  49. package/docs/operations/showHost.md +172 -0
  50. package/docs/operations/showTask.md +140 -0
  51. package/docs/operations/showWorkspaceCalendarItem.md +165 -0
  52. package/docs/operations/updateAgentBrief.md +257 -0
  53. package/docs/operations/updateBoard.md +169 -0
  54. package/docs/operations/updateBoardColumn.md +165 -0
  55. package/docs/operations/updateTask.md +175 -0
  56. package/docs/operations/updateTaskComment.md +174 -0
  57. package/docs/operations/updateWorkspaceCalendarItem.md +204 -0
  58. package/docs/operations/workspaceCalendar.md +185 -0
  59. package/examples/http/agentConnectedInstructions.ts +19 -0
  60. package/examples/http/agentHeartbeat.ts +67 -0
  61. package/examples/http/authenticateAgentRealtimeSocket.ts +24 -0
  62. package/examples/http/claimAgentRealtimeSession.ts +21 -0
  63. package/examples/http/closeAgentRealtimeSession.ts +28 -0
  64. package/examples/http/commentWorkspaceCalendarItem.ts +24 -0
  65. package/examples/http/connectAgent.ts +47 -0
  66. package/examples/http/createAgentBrief.ts +34 -0
  67. package/examples/http/createAgentRealtimeSignal.ts +33 -0
  68. package/examples/http/createBoard.ts +19 -0
  69. package/examples/http/createBoardColumn.ts +23 -0
  70. package/examples/http/createTask.ts +24 -0
  71. package/examples/http/createTaskComment.ts +24 -0
  72. package/examples/http/createWorkspaceCalendarItem.ts +31 -0
  73. package/examples/http/deleteAgentBrief.ts +19 -0
  74. package/examples/http/deleteBoard.ts +19 -0
  75. package/examples/http/deleteBoardColumn.ts +22 -0
  76. package/examples/http/deleteTask.ts +19 -0
  77. package/examples/http/deleteTaskComment.ts +20 -0
  78. package/examples/http/deleteWorkspaceCalendarItem.ts +19 -0
  79. package/examples/http/listAgentBriefs.ts +22 -0
  80. package/examples/http/listAgentRealtimeRequestedSessions.ts +22 -0
  81. package/examples/http/listAgentRealtimeSignals.ts +25 -0
  82. package/examples/http/listAgents.ts +20 -0
  83. package/examples/http/listBoards.ts +21 -0
  84. package/examples/http/listHosts.ts +21 -0
  85. package/examples/http/listLogs.ts +19 -0
  86. package/examples/http/listNotifications.ts +20 -0
  87. package/examples/http/listTaskComments.ts +22 -0
  88. package/examples/http/listTasks.ts +26 -0
  89. package/examples/http/listTeamMembers.ts +20 -0
  90. package/examples/http/markAllNotificationsRead.ts +15 -0
  91. package/examples/http/markNotificationRead.ts +20 -0
  92. package/examples/http/showBoard.ts +19 -0
  93. package/examples/http/showHost.ts +22 -0
  94. package/examples/http/showTask.ts +19 -0
  95. package/examples/http/showWorkspaceCalendarItem.ts +19 -0
  96. package/examples/http/updateAgentBrief.ts +47 -0
  97. package/examples/http/updateBoard.ts +25 -0
  98. package/examples/http/updateBoardColumn.ts +24 -0
  99. package/examples/http/updateTask.ts +25 -0
  100. package/examples/http/updateTaskComment.ts +23 -0
  101. package/examples/http/updateWorkspaceCalendarItem.ts +27 -0
  102. package/examples/http/workspaceCalendar.ts +27 -0
  103. package/package.json +64 -0
  104. package/spec/openapi.filtered.json +12925 -0
@@ -0,0 +1,207 @@
1
+ # listAgentBriefs
2
+
3
+ - Method: `GET`
4
+ - Path: `/briefs`
5
+ - Summary: List brief parents for the current workspace.
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
+ | search | query | no | Case-insensitive text search query. | "operations" |
17
+ | external_key | query | no | Stable external key used for upsert/idempotent writes. | "daily-operations" |
18
+ | agent_id | query | no | Identifier for agent. | 42 |
19
+ | per_page | query | no | Page size for paginated responses. | 25 |
20
+
21
+ ## Request Example
22
+
23
+ None.
24
+
25
+ ## Success Responses
26
+
27
+ ### 200 (application/json)
28
+ Brief list returned.
29
+
30
+ ```json
31
+ {
32
+ "data": [
33
+ {
34
+ "id": 42,
35
+ "team_id": 42,
36
+ "agent_id": 42,
37
+ "external_key": "daily-operations",
38
+ "external_id": "ops-brief-2026-02-22",
39
+ "name": "Example Name",
40
+ "timezone": "America/Los_Angeles",
41
+ "summary": "Morning operations handoff digest.",
42
+ "include_sections": [
43
+ {
44
+ "key": "value"
45
+ }
46
+ ],
47
+ "headline": "3 overdue tasks | 4 upcoming events",
48
+ "content_markdown": "## Highlights\n- Elevated API error rate",
49
+ "content_json": {
50
+ "key": "value"
51
+ },
52
+ "source_meta": {
53
+ "key": "value"
54
+ },
55
+ "received_at": "2026-02-22T17:21:00Z",
56
+ "generated_at": "2026-02-22T17:21:00Z",
57
+ "read_by_user_id": 42,
58
+ "latest_entry_id": 42,
59
+ "entries_count": 0,
60
+ "latest_entry": {
61
+ "id": 42,
62
+ "agent_id": 42,
63
+ "external_id": "ops-brief-2026-02-22",
64
+ "name": "Example Name",
65
+ "timezone": "America/Los_Angeles",
66
+ "summary": "Morning operations handoff digest.",
67
+ "include_sections": [
68
+ {
69
+ "key": "value"
70
+ }
71
+ ],
72
+ "headline": "3 overdue tasks | 4 upcoming events",
73
+ "content_markdown": "## Highlights\n- Elevated API error rate",
74
+ "content_json": {
75
+ "key": "value"
76
+ },
77
+ "source_meta": {
78
+ "key": "value"
79
+ },
80
+ "received_at": "2026-02-22T17:21:00Z",
81
+ "generated_at": "2026-02-22T17:21:00Z",
82
+ "created_at": "2026-02-22T17:21:00Z",
83
+ "updated_at": "2026-02-22T17:21:00Z"
84
+ },
85
+ "created_at": "2026-02-22T17:21:00Z",
86
+ "updated_at": "2026-02-22T17:21:00Z"
87
+ }
88
+ ],
89
+ "links": {
90
+ "first": "example",
91
+ "last": "example",
92
+ "prev": "example",
93
+ "next": "example"
94
+ },
95
+ "meta": {
96
+ "current_page": 1,
97
+ "from": 1,
98
+ "last_page": 1,
99
+ "links": [
100
+ {
101
+ "url": "https://agentmc.example.com/docs/incident-123",
102
+ "label": "example",
103
+ "active": true
104
+ }
105
+ ],
106
+ "path": "example",
107
+ "per_page": 25,
108
+ "total": 0
109
+ }
110
+ }
111
+ ```
112
+
113
+
114
+ ## Error Responses
115
+
116
+ ### 401 (application/json)
117
+ Missing or invalid credentials.
118
+
119
+ ```json
120
+ {
121
+ "error": {
122
+ "code": "validation.failed",
123
+ "message": "Validation failed.",
124
+ "details": {
125
+ "fields": {
126
+ "title": [
127
+ "The title field is required."
128
+ ]
129
+ }
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ ### 403 (application/json)
136
+ Forbidden.
137
+
138
+ ```json
139
+ {
140
+ "error": {
141
+ "code": "validation.failed",
142
+ "message": "Validation failed.",
143
+ "details": {
144
+ "fields": {
145
+ "title": [
146
+ "The title field is required."
147
+ ]
148
+ }
149
+ }
150
+ }
151
+ }
152
+ ```
153
+
154
+ ### 422 (application/json)
155
+ Validation failed.
156
+
157
+ ```json
158
+ {
159
+ "error": {
160
+ "code": "validation.failed",
161
+ "message": "Validation failed.",
162
+ "details": {
163
+ "fields": {
164
+ "title": [
165
+ "The title field is required."
166
+ ]
167
+ }
168
+ }
169
+ }
170
+ }
171
+ ```
172
+
173
+
174
+ ## SDK Example
175
+
176
+ ```ts
177
+ import { AgentMCApi } from "@agentmc/api";
178
+
179
+ const client = new AgentMCApi({
180
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
181
+ });
182
+
183
+ const result = await client.operations.listAgentBriefs({
184
+ "params": {
185
+ "query": {
186
+ "search": "operations",
187
+ "external_key": "daily-operations",
188
+ "agent_id": 42,
189
+ "per_page": 25
190
+ }
191
+ }
192
+ });
193
+
194
+ if (result.error) {
195
+ console.error(result.status, result.error);
196
+ } else {
197
+ console.log(result.data);
198
+ }
199
+ ```
200
+
201
+ ## cURL Example
202
+
203
+ ```bash
204
+ curl -X GET "https://agentmc.ai/api/v1/briefs?search=operations&external_key=daily-operations&agent_id=42&per_page=25" \\
205
+ -H "Accept: application/json" \\
206
+ -H "X-Api-Key: $AGENTMC_API_KEY"
207
+ ```
@@ -0,0 +1,166 @@
1
+ # listAgentRealtimeRequestedSessions
2
+
3
+ - Method: `GET`
4
+ - Path: `/agents/{agent}/realtime/sessions/requested`
5
+ - Summary: List requested realtime browser sessions for an agent.
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
+ | limit | query | no | Maximum number of records to return. | 20 |
18
+
19
+ ## Request Example
20
+
21
+ None.
22
+
23
+ ## Success Responses
24
+
25
+ ### 200 (application/json)
26
+ Requested realtime sessions returned.
27
+
28
+ ```json
29
+ {
30
+ "data": [
31
+ {
32
+ "id": 42,
33
+ "team_id": 42,
34
+ "agent_id": 42,
35
+ "requested_by_user_id": 42,
36
+ "status": "requested",
37
+ "claimed_at": "2026-02-22T17:21:00Z",
38
+ "opened_at": "2026-02-22T17:21:00Z",
39
+ "closed_at": "2026-02-22T17:21:00Z",
40
+ "expires_at": "2026-02-22T17:21:00Z",
41
+ "last_browser_heartbeat_at": "2026-02-22T17:21:00Z",
42
+ "last_agent_heartbeat_at": "2026-02-22T17:21:00Z",
43
+ "meta": {
44
+ "key": "value"
45
+ },
46
+ "created_at": "2026-02-22T17:21:00Z",
47
+ "updated_at": "2026-02-22T17:21:00Z"
48
+ }
49
+ ]
50
+ }
51
+ ```
52
+
53
+
54
+ ## Error Responses
55
+
56
+ ### 401 (application/json)
57
+ Missing or invalid credentials.
58
+
59
+ ```json
60
+ {
61
+ "error": {
62
+ "code": "validation.failed",
63
+ "message": "Validation failed.",
64
+ "details": {
65
+ "fields": {
66
+ "title": [
67
+ "The title field is required."
68
+ ]
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ### 403 (application/json)
76
+ Forbidden.
77
+
78
+ ```json
79
+ {
80
+ "error": {
81
+ "code": "validation.failed",
82
+ "message": "Validation failed.",
83
+ "details": {
84
+ "fields": {
85
+ "title": [
86
+ "The title field is required."
87
+ ]
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### 404 (application/json)
95
+ Resource not found.
96
+
97
+ ```json
98
+ {
99
+ "error": {
100
+ "code": "validation.failed",
101
+ "message": "Validation failed.",
102
+ "details": {
103
+ "fields": {
104
+ "title": [
105
+ "The title field is required."
106
+ ]
107
+ }
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ### 422 (application/json)
114
+ Validation failed.
115
+
116
+ ```json
117
+ {
118
+ "error": {
119
+ "code": "validation.failed",
120
+ "message": "Validation failed.",
121
+ "details": {
122
+ "fields": {
123
+ "title": [
124
+ "The title field is required."
125
+ ]
126
+ }
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+
133
+ ## SDK Example
134
+
135
+ ```ts
136
+ import { AgentMCApi } from "@agentmc/api";
137
+
138
+ const client = new AgentMCApi({
139
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
140
+ });
141
+
142
+ const result = await client.operations.listAgentRealtimeRequestedSessions({
143
+ "params": {
144
+ "path": {
145
+ "agent": 1
146
+ },
147
+ "query": {
148
+ "limit": 20
149
+ }
150
+ }
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 GET "https://agentmc.ai/api/v1/agents/1/realtime/sessions/requested?limit=20" \\
164
+ -H "Accept: application/json" \\
165
+ -H "X-Api-Key: $AGENTMC_API_KEY"
166
+ ```
@@ -0,0 +1,185 @@
1
+ # listAgentRealtimeSignals
2
+
3
+ - Method: `GET`
4
+ - Path: `/agents/{agent}/realtime/sessions/{session}/signals`
5
+ - Summary: Read realtime events 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
+ | after_id | query | no | Return only records with id greater than this value. | 120 |
19
+ | limit | query | no | Maximum number of records to return. | 20 |
20
+ | exclude_sender | query | no | Allowed values: agent, browser, system. | "agent" |
21
+
22
+ ## Request Example
23
+
24
+ None.
25
+
26
+ ## Success Responses
27
+
28
+ ### 200 (application/json)
29
+ Realtime signaling events returned.
30
+
31
+ ```json
32
+ {
33
+ "data": [
34
+ {
35
+ "id": 42,
36
+ "team_id": 42,
37
+ "agent_id": 42,
38
+ "session_id": 42,
39
+ "sender": "agent",
40
+ "type": "example",
41
+ "payload": {
42
+ "key": "value"
43
+ },
44
+ "created_at": "2026-02-22T17:21:00Z",
45
+ "updated_at": "2026-02-22T17:21:00Z"
46
+ }
47
+ ],
48
+ "session": {
49
+ "id": 42,
50
+ "team_id": 42,
51
+ "agent_id": 42,
52
+ "requested_by_user_id": 42,
53
+ "status": "requested",
54
+ "claimed_at": "2026-02-22T17:21:00Z",
55
+ "opened_at": "2026-02-22T17:21:00Z",
56
+ "closed_at": "2026-02-22T17:21:00Z",
57
+ "expires_at": "2026-02-22T17:21:00Z",
58
+ "last_browser_heartbeat_at": "2026-02-22T17:21:00Z",
59
+ "last_agent_heartbeat_at": "2026-02-22T17:21:00Z",
60
+ "meta": {
61
+ "key": "value"
62
+ },
63
+ "created_at": "2026-02-22T17:21:00Z",
64
+ "updated_at": "2026-02-22T17:21:00Z"
65
+ }
66
+ }
67
+ ```
68
+
69
+
70
+ ## Error Responses
71
+
72
+ ### 401 (application/json)
73
+ Missing or invalid credentials.
74
+
75
+ ```json
76
+ {
77
+ "error": {
78
+ "code": "validation.failed",
79
+ "message": "Validation failed.",
80
+ "details": {
81
+ "fields": {
82
+ "title": [
83
+ "The title field is required."
84
+ ]
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ ### 403 (application/json)
92
+ Forbidden.
93
+
94
+ ```json
95
+ {
96
+ "error": {
97
+ "code": "validation.failed",
98
+ "message": "Validation failed.",
99
+ "details": {
100
+ "fields": {
101
+ "title": [
102
+ "The title field is required."
103
+ ]
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ### 404 (application/json)
111
+ Resource not found.
112
+
113
+ ```json
114
+ {
115
+ "error": {
116
+ "code": "validation.failed",
117
+ "message": "Validation failed.",
118
+ "details": {
119
+ "fields": {
120
+ "title": [
121
+ "The title field is required."
122
+ ]
123
+ }
124
+ }
125
+ }
126
+ }
127
+ ```
128
+
129
+ ### 422 (application/json)
130
+ Validation failed.
131
+
132
+ ```json
133
+ {
134
+ "error": {
135
+ "code": "validation.failed",
136
+ "message": "Validation failed.",
137
+ "details": {
138
+ "fields": {
139
+ "title": [
140
+ "The title field is required."
141
+ ]
142
+ }
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+
149
+ ## SDK Example
150
+
151
+ ```ts
152
+ import { AgentMCApi } from "@agentmc/api";
153
+
154
+ const client = new AgentMCApi({
155
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
156
+ });
157
+
158
+ const result = await client.operations.listAgentRealtimeSignals({
159
+ "params": {
160
+ "path": {
161
+ "agent": 1,
162
+ "session": 1
163
+ },
164
+ "query": {
165
+ "after_id": 120,
166
+ "limit": 20,
167
+ "exclude_sender": "agent"
168
+ }
169
+ }
170
+ });
171
+
172
+ if (result.error) {
173
+ console.error(result.status, result.error);
174
+ } else {
175
+ console.log(result.data);
176
+ }
177
+ ```
178
+
179
+ ## cURL Example
180
+
181
+ ```bash
182
+ curl -X GET "https://agentmc.ai/api/v1/agents/1/realtime/sessions/1/signals?after_id=120&limit=20&exclude_sender=agent" \\
183
+ -H "Accept: application/json" \\
184
+ -H "X-Api-Key: $AGENTMC_API_KEY"
185
+ ```
@@ -0,0 +1,162 @@
1
+ # listAgents
2
+
3
+ - Method: `GET`
4
+ - Path: `/teams/agents`
5
+ - Summary: List agents for the current workspace team.
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
+ | per_page | query | no | Page size for paginated responses. | 25 |
17
+ | search | query | no | Case-insensitive text search query. | "operations" |
18
+
19
+ ## Request Example
20
+
21
+ None.
22
+
23
+ ## Success Responses
24
+
25
+ ### 200 (application/json)
26
+ Agents returned.
27
+
28
+ ```json
29
+ {
30
+ "data": [
31
+ {
32
+ "id": 42,
33
+ "workspace_id": 7,
34
+ "host_id": 11,
35
+ "host": {
36
+ "id": 11,
37
+ "name": "worker-01"
38
+ },
39
+ "name": "codex-runtime-prod",
40
+ "type": "generic",
41
+ "status": "online",
42
+ "runtime_host": "worker-01",
43
+ "runtime_version": "2026.02.1",
44
+ "capabilities": [
45
+ "tasks",
46
+ "calendar",
47
+ "realtime"
48
+ ],
49
+ "meta": {
50
+ "runtime": "codex",
51
+ "models": [
52
+ {
53
+ "model_id": "openai/gpt-5-codex",
54
+ "provider": "openai"
55
+ }
56
+ ]
57
+ },
58
+ "last_seen_at": "2026-02-24T02:11:00Z",
59
+ "first_sync_at": "2026-02-24T02:01:00Z",
60
+ "tasks_count": 3,
61
+ "created_at": "2026-02-24T01:56:00Z",
62
+ "updated_at": "2026-02-24T02:11:00Z"
63
+ }
64
+ ],
65
+ "links": {
66
+ "first": "example",
67
+ "last": "example",
68
+ "prev": "example",
69
+ "next": "example"
70
+ },
71
+ "meta": {
72
+ "current_page": 1,
73
+ "from": 1,
74
+ "last_page": 1,
75
+ "links": [
76
+ {
77
+ "url": "https://agentmc.example.com/docs/incident-123",
78
+ "label": "example",
79
+ "active": true
80
+ }
81
+ ],
82
+ "path": "example",
83
+ "per_page": 25,
84
+ "total": 0
85
+ }
86
+ }
87
+ ```
88
+
89
+
90
+ ## Error Responses
91
+
92
+ ### 401 (application/json)
93
+ Missing or invalid credentials.
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
+ ### 403 (application/json)
112
+ Forbidden.
113
+
114
+ ```json
115
+ {
116
+ "error": {
117
+ "code": "validation.failed",
118
+ "message": "Validation failed.",
119
+ "details": {
120
+ "fields": {
121
+ "title": [
122
+ "The title field is required."
123
+ ]
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+
131
+ ## SDK Example
132
+
133
+ ```ts
134
+ import { AgentMCApi } from "@agentmc/api";
135
+
136
+ const client = new AgentMCApi({
137
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
138
+ });
139
+
140
+ const result = await client.operations.listAgents({
141
+ "params": {
142
+ "query": {
143
+ "per_page": 25,
144
+ "search": "operations"
145
+ }
146
+ }
147
+ });
148
+
149
+ if (result.error) {
150
+ console.error(result.status, result.error);
151
+ } else {
152
+ console.log(result.data);
153
+ }
154
+ ```
155
+
156
+ ## cURL Example
157
+
158
+ ```bash
159
+ curl -X GET "https://agentmc.ai/api/v1/teams/agents?per_page=25&search=operations" \\
160
+ -H "Accept: application/json" \\
161
+ -H "X-Api-Key: $AGENTMC_API_KEY"
162
+ ```