solid_agent 0.0.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +68 -0
- data/LICENSE +21 -0
- data/README.md +321 -0
- data/Rakefile +32 -0
- data/docs/agent-md-spec.md +803 -0
- data/docs/parser-design.md +1369 -0
- data/docs/registry-api.md +882 -0
- data/examples/README.md +60 -0
- data/examples/manifests/changelog_writer.agent.md +81 -0
- data/examples/manifests/usage.rb +96 -0
- data/examples/memory_handoff/app/agents/researcher_agent.rb +36 -0
- data/examples/memory_handoff/app/agents/writer_agent.rb +41 -0
- data/examples/memory_handoff/usage.rb +45 -0
- data/examples/persistent_conversation/app/agents/support_agent.rb +59 -0
- data/examples/persistent_conversation/app/controllers/support_conversations_controller.rb +24 -0
- data/examples/persistent_conversation/app/views/agents/support/instructions.md.erb +8 -0
- data/examples/persistent_conversation/usage.rb +51 -0
- data/examples/reasoning/app/agents/analysis_agent.rb +52 -0
- data/examples/reasoning/usage.rb +52 -0
- data/examples/run_tracking/app/agents/report_agent.rb +30 -0
- data/examples/run_tracking/app/controllers/agent_runs_controller.rb +43 -0
- data/examples/run_tracking/app/jobs/document_analysis_job.rb +17 -0
- data/examples/run_tracking/app/services/document_analysis_run.rb +68 -0
- data/examples/run_tracking/usage.rb +85 -0
- data/examples/tool_streaming/app/agents/browser_agent.rb +65 -0
- data/examples/tool_streaming/app/channels/tool_status_channel.rb +24 -0
- data/examples/tool_streaming/app/views/browser_agent/tools/fetch_url.json.erb +15 -0
- data/examples/tool_streaming/usage.rb +47 -0
- data/lib/generators/solid_agent/agent/agent_generator.rb +95 -0
- data/lib/generators/solid_agent/agent/templates/action.text.erb +10 -0
- data/lib/generators/solid_agent/agent/templates/agent.rb.erb +93 -0
- data/lib/generators/solid_agent/context/context_generator.rb +124 -0
- data/lib/generators/solid_agent/context/templates/context_model.rb.erb +134 -0
- data/lib/generators/solid_agent/context/templates/create_context.rb.erb +32 -0
- data/lib/generators/solid_agent/context/templates/create_generations.rb.erb +46 -0
- data/lib/generators/solid_agent/context/templates/create_messages.rb.erb +37 -0
- data/lib/generators/solid_agent/context/templates/generation_model.rb.erb +51 -0
- data/lib/generators/solid_agent/context/templates/message_model.rb.erb +47 -0
- data/lib/generators/solid_agent/install/install_generator.rb +92 -0
- data/lib/generators/solid_agent/install/templates/agent_context.rb.erb +171 -0
- data/lib/generators/solid_agent/install/templates/agent_generation.rb.erb +76 -0
- data/lib/generators/solid_agent/install/templates/agent_memory.rb.erb +51 -0
- data/lib/generators/solid_agent/install/templates/agent_memory_entry.rb.erb +12 -0
- data/lib/generators/solid_agent/install/templates/agent_message.rb.erb +76 -0
- data/lib/generators/solid_agent/install/templates/agent_run.rb.erb +122 -0
- data/lib/generators/solid_agent/install/templates/create_agent_contexts.rb.erb +32 -0
- data/lib/generators/solid_agent/install/templates/create_agent_generations.rb.erb +51 -0
- data/lib/generators/solid_agent/install/templates/create_agent_memories.rb.erb +35 -0
- data/lib/generators/solid_agent/install/templates/create_agent_messages.rb.erb +38 -0
- data/lib/generators/solid_agent/install/templates/create_agent_runs.rb.erb +46 -0
- data/lib/generators/solid_agent/install/templates/initializer.rb.erb +51 -0
- data/lib/generators/solid_agent/manifest/manifest_generator.rb +209 -0
- data/lib/generators/solid_agent/manifest/templates/agent.md.erb +39 -0
- data/lib/generators/solid_agent/manifest/templates/prompt.erb +13 -0
- data/lib/generators/solid_agent/reasons/reasons_generator.rb +83 -0
- data/lib/generators/solid_agent/reasons/templates/add_reasoning_columns.rb.erb +12 -0
- data/lib/generators/solid_agent/tool/templates/tool.json.erb +19 -0
- data/lib/generators/solid_agent/tool/tool_generator.rb +117 -0
- data/lib/solid_agent/agent_manifest/agent_builder.rb +323 -0
- data/lib/solid_agent/agent_manifest/errors.rb +26 -0
- data/lib/solid_agent/agent_manifest/exporter_registry.rb +117 -0
- data/lib/solid_agent/agent_manifest/exporters/agent_md_exporter.rb +115 -0
- data/lib/solid_agent/agent_manifest/exporters/base_exporter.rb +152 -0
- data/lib/solid_agent/agent_manifest/exporters/crewai_exporter.rb +125 -0
- data/lib/solid_agent/agent_manifest/exporters/dotprompt_exporter.rb +92 -0
- data/lib/solid_agent/agent_manifest/input_schema.rb +154 -0
- data/lib/solid_agent/agent_manifest/manifest.rb +306 -0
- data/lib/solid_agent/agent_manifest/parser_registry.rb +185 -0
- data/lib/solid_agent/agent_manifest/parsers/agent_md_parser.rb +87 -0
- data/lib/solid_agent/agent_manifest/parsers/base_parser.rb +223 -0
- data/lib/solid_agent/agent_manifest/parsers/crewai_parser.rb +201 -0
- data/lib/solid_agent/agent_manifest/parsers/dotprompt_parser.rb +122 -0
- data/lib/solid_agent/agent_manifest/parsers/github_prompt_parser.rb +143 -0
- data/lib/solid_agent/agent_manifest/picoschema.rb +254 -0
- data/lib/solid_agent/agent_manifest/registry/auth.rb +103 -0
- data/lib/solid_agent/agent_manifest/registry/client.rb +384 -0
- data/lib/solid_agent/agent_manifest/resource.rb +103 -0
- data/lib/solid_agent/agent_manifest/tool.rb +160 -0
- data/lib/solid_agent/agent_manifest/validator.rb +368 -0
- data/lib/solid_agent/agent_manifest.rb +381 -0
- data/lib/solid_agent/engine.rb +16 -0
- data/lib/solid_agent/has_context.rb +670 -0
- data/lib/solid_agent/has_memory.rb +136 -0
- data/lib/solid_agent/has_reasons.rb +230 -0
- data/lib/solid_agent/has_tools.rb +257 -0
- data/lib/solid_agent/model_naming.rb +42 -0
- data/lib/solid_agent/model_pricing.rb +93 -0
- data/lib/solid_agent/reasonable/reason.rb +205 -0
- data/lib/solid_agent/reasonable.rb +181 -0
- data/lib/solid_agent/records/agent.rb +520 -0
- data/lib/solid_agent/records/agent_run.rb +520 -0
- data/lib/solid_agent/records/agent_template.rb +142 -0
- data/lib/solid_agent/records/agent_version.rb +141 -0
- data/lib/solid_agent/records/ownable.rb +130 -0
- data/lib/solid_agent/records.rb +152 -0
- data/lib/solid_agent/run_fingerprint.rb +51 -0
- data/lib/solid_agent/streams_tool_updates.rb +178 -0
- data/lib/solid_agent/tool_cache.rb +91 -0
- data/lib/solid_agent/version.rb +5 -0
- data/lib/solid_agent.rb +95 -0
- data/sig/solid_agent.rbs +4 -0
- metadata +174 -14
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
# ActiveAgents Registry API
|
|
2
|
+
|
|
3
|
+
**Base URL:** `https://api.activeagents.ai/v1`
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The ActiveAgents Registry is a package repository for shareable AI agents. It follows patterns from npm, RubyGems, and PyPI while adding AI-specific features like model compatibility tracking, sandboxed testing, and framework interoperability.
|
|
8
|
+
|
|
9
|
+
## Authentication
|
|
10
|
+
|
|
11
|
+
```http
|
|
12
|
+
Authorization: Bearer <api_token>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Tokens are obtained via:
|
|
16
|
+
- `activeagent login` CLI command
|
|
17
|
+
- OAuth flow on activeagents.ai
|
|
18
|
+
- API token generation in dashboard
|
|
19
|
+
|
|
20
|
+
## Core Resources
|
|
21
|
+
|
|
22
|
+
### Agents (Packages)
|
|
23
|
+
|
|
24
|
+
An agent package contains:
|
|
25
|
+
- `agent.md` - Main definition file
|
|
26
|
+
- Tools, prompts, tests, examples
|
|
27
|
+
- Metadata (versions, dependencies, compatibility)
|
|
28
|
+
|
|
29
|
+
### Organizations
|
|
30
|
+
|
|
31
|
+
Scoped namespaces for agents (e.g., `@activeagents/research-assistant`)
|
|
32
|
+
|
|
33
|
+
### Users
|
|
34
|
+
|
|
35
|
+
Individual accounts that can publish and star agents
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## API Endpoints
|
|
40
|
+
|
|
41
|
+
### Search & Discovery
|
|
42
|
+
|
|
43
|
+
#### Search Agents
|
|
44
|
+
|
|
45
|
+
```http
|
|
46
|
+
GET /agents
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Query Parameters:**
|
|
50
|
+
|
|
51
|
+
| Parameter | Type | Description |
|
|
52
|
+
|-----------|------|-------------|
|
|
53
|
+
| `q` | string | Full-text search query |
|
|
54
|
+
| `tags` | string | Comma-separated tags |
|
|
55
|
+
| `framework` | string | Filter by framework compatibility |
|
|
56
|
+
| `model` | string | Filter by model compatibility |
|
|
57
|
+
| `author` | string | Filter by author/org |
|
|
58
|
+
| `sort` | string | `downloads`, `stars`, `updated`, `created` |
|
|
59
|
+
| `order` | string | `asc`, `desc` |
|
|
60
|
+
| `page` | integer | Page number (default: 1) |
|
|
61
|
+
| `per_page` | integer | Results per page (default: 20, max: 100) |
|
|
62
|
+
|
|
63
|
+
**Example:**
|
|
64
|
+
|
|
65
|
+
```http
|
|
66
|
+
GET /agents?q=research&tags=web,rag&framework=activeagent&sort=downloads
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Response:**
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"data": [
|
|
74
|
+
{
|
|
75
|
+
"name": "@activeagents/research-assistant",
|
|
76
|
+
"version": "1.2.0",
|
|
77
|
+
"description": "An agent that researches topics and synthesizes findings",
|
|
78
|
+
"author": {
|
|
79
|
+
"name": "ActiveAgents",
|
|
80
|
+
"username": "activeagents"
|
|
81
|
+
},
|
|
82
|
+
"downloads": {
|
|
83
|
+
"total": 15420,
|
|
84
|
+
"weekly": 342
|
|
85
|
+
},
|
|
86
|
+
"stars": 89,
|
|
87
|
+
"license": "MIT",
|
|
88
|
+
"tags": ["research", "web", "summarization", "rag"],
|
|
89
|
+
"compatibility": {
|
|
90
|
+
"frameworks": ["activeagent", "crewai", "langchain"],
|
|
91
|
+
"models": ["anthropic/*", "openai/*"]
|
|
92
|
+
},
|
|
93
|
+
"updated_at": "2025-01-20T14:22:00Z"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"meta": {
|
|
97
|
+
"total": 156,
|
|
98
|
+
"page": 1,
|
|
99
|
+
"per_page": 20,
|
|
100
|
+
"total_pages": 8
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Get Agent Details
|
|
106
|
+
|
|
107
|
+
```http
|
|
108
|
+
GET /agents/:scope/:name
|
|
109
|
+
GET /agents/:name
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Example:**
|
|
113
|
+
|
|
114
|
+
```http
|
|
115
|
+
GET /agents/@activeagents/research-assistant
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Response:**
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"name": "@activeagents/research-assistant",
|
|
123
|
+
"version": "1.2.0",
|
|
124
|
+
"description": "An agent that researches topics and synthesizes findings",
|
|
125
|
+
"readme": "# Research Assistant\n\nA powerful agent for...",
|
|
126
|
+
"author": {
|
|
127
|
+
"name": "ActiveAgents",
|
|
128
|
+
"username": "activeagents",
|
|
129
|
+
"avatar_url": "https://cdn.activeagents.ai/avatars/activeagents.png"
|
|
130
|
+
},
|
|
131
|
+
"repository": {
|
|
132
|
+
"type": "git",
|
|
133
|
+
"url": "https://github.com/activeagents/research-assistant"
|
|
134
|
+
},
|
|
135
|
+
"license": "MIT",
|
|
136
|
+
"tags": ["research", "web", "summarization", "rag"],
|
|
137
|
+
"keywords": ["ai", "research", "web-scraping"],
|
|
138
|
+
|
|
139
|
+
"downloads": {
|
|
140
|
+
"total": 15420,
|
|
141
|
+
"weekly": 342,
|
|
142
|
+
"daily": 48
|
|
143
|
+
},
|
|
144
|
+
"stars": 89,
|
|
145
|
+
"forks": 12,
|
|
146
|
+
|
|
147
|
+
"compatibility": {
|
|
148
|
+
"frameworks": {
|
|
149
|
+
"activeagent": ">=0.5.0",
|
|
150
|
+
"crewai": ">=0.30.0",
|
|
151
|
+
"langchain": ">=0.1.0"
|
|
152
|
+
},
|
|
153
|
+
"models": {
|
|
154
|
+
"anthropic": ["claude-sonnet-4-20250514", "claude-3-5-haiku-*"],
|
|
155
|
+
"openai": ["gpt-4o", "gpt-4o-mini"],
|
|
156
|
+
"google": ["gemini-2.0-*"]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
"dependencies": {
|
|
161
|
+
"@activeagents/web-tools": "^1.0.0",
|
|
162
|
+
"@activeagents/summarization": "^2.1.0"
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
"versions": {
|
|
166
|
+
"latest": "1.2.0",
|
|
167
|
+
"stable": "1.2.0",
|
|
168
|
+
"beta": "1.3.0-beta.1"
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
"files": {
|
|
172
|
+
"agent.md": {
|
|
173
|
+
"size": 4521,
|
|
174
|
+
"checksum": "sha256:abc123..."
|
|
175
|
+
},
|
|
176
|
+
"tools/search.tool.json": {
|
|
177
|
+
"size": 892,
|
|
178
|
+
"checksum": "sha256:def456..."
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
"maintainers": [
|
|
183
|
+
{
|
|
184
|
+
"username": "activeagents",
|
|
185
|
+
"role": "owner"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
|
|
189
|
+
"created_at": "2025-01-15T10:30:00Z",
|
|
190
|
+
"updated_at": "2025-01-20T14:22:00Z"
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### Get Agent Version
|
|
195
|
+
|
|
196
|
+
```http
|
|
197
|
+
GET /agents/:scope/:name/versions/:version
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Example:**
|
|
201
|
+
|
|
202
|
+
```http
|
|
203
|
+
GET /agents/@activeagents/research-assistant/versions/1.2.0
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Response:**
|
|
207
|
+
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"name": "@activeagents/research-assistant",
|
|
211
|
+
"version": "1.2.0",
|
|
212
|
+
"description": "An agent that researches topics and synthesizes findings",
|
|
213
|
+
|
|
214
|
+
"manifest": {
|
|
215
|
+
"name": "research-assistant",
|
|
216
|
+
"model": "anthropic/claude-sonnet-4-20250514",
|
|
217
|
+
"tools": ["web_search", "navigate", "summarize"],
|
|
218
|
+
"input": {
|
|
219
|
+
"schema": {
|
|
220
|
+
"query": "string, the research question",
|
|
221
|
+
"depth?": "string(shallow, moderate, deep)"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
"changelog": "## 1.2.0\n\n- Added deep research mode\n- Improved source citation",
|
|
227
|
+
|
|
228
|
+
"files": [
|
|
229
|
+
{
|
|
230
|
+
"path": "agent.md",
|
|
231
|
+
"size": 4521,
|
|
232
|
+
"checksum": "sha256:abc123...",
|
|
233
|
+
"download_url": "https://cdn.activeagents.ai/packages/@activeagents/research-assistant/1.2.0/agent.md"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"path": "tools/search.tool.json",
|
|
237
|
+
"size": 892,
|
|
238
|
+
"checksum": "sha256:def456...",
|
|
239
|
+
"download_url": "https://cdn.activeagents.ai/packages/@activeagents/research-assistant/1.2.0/tools/search.tool.json"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
|
|
243
|
+
"dependencies": {
|
|
244
|
+
"@activeagents/web-tools": "^1.0.0"
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
"published_at": "2025-01-20T14:22:00Z",
|
|
248
|
+
"published_by": {
|
|
249
|
+
"username": "activeagents"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
#### List Versions
|
|
255
|
+
|
|
256
|
+
```http
|
|
257
|
+
GET /agents/:scope/:name/versions
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Response:**
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"data": [
|
|
265
|
+
{
|
|
266
|
+
"version": "1.2.0",
|
|
267
|
+
"tag": "latest",
|
|
268
|
+
"published_at": "2025-01-20T14:22:00Z",
|
|
269
|
+
"downloads": 342
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"version": "1.3.0-beta.1",
|
|
273
|
+
"tag": "beta",
|
|
274
|
+
"published_at": "2025-01-22T09:15:00Z",
|
|
275
|
+
"downloads": 28
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"version": "1.1.0",
|
|
279
|
+
"published_at": "2025-01-10T11:30:00Z",
|
|
280
|
+
"downloads": 8420
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Download & Installation
|
|
287
|
+
|
|
288
|
+
#### Download Package
|
|
289
|
+
|
|
290
|
+
```http
|
|
291
|
+
GET /agents/:scope/:name/-/:name-:version.tgz
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Returns the packaged agent as a tarball.
|
|
295
|
+
|
|
296
|
+
**Example:**
|
|
297
|
+
|
|
298
|
+
```http
|
|
299
|
+
GET /agents/@activeagents/research-assistant/-/research-assistant-1.2.0.tgz
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
#### Download Single File
|
|
303
|
+
|
|
304
|
+
```http
|
|
305
|
+
GET /agents/:scope/:name/files/:path
|
|
306
|
+
GET /agents/:scope/:name/versions/:version/files/:path
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Example:**
|
|
310
|
+
|
|
311
|
+
```http
|
|
312
|
+
GET /agents/@activeagents/research-assistant/files/agent.md
|
|
313
|
+
GET /agents/@activeagents/research-assistant/versions/1.2.0/files/tools/search.tool.json
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Publishing
|
|
317
|
+
|
|
318
|
+
#### Publish New Version
|
|
319
|
+
|
|
320
|
+
```http
|
|
321
|
+
PUT /agents/:scope/:name
|
|
322
|
+
Authorization: Bearer <token>
|
|
323
|
+
Content-Type: application/gzip
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Request Body:** gzipped tarball of the agent package
|
|
327
|
+
|
|
328
|
+
**Headers:**
|
|
329
|
+
|
|
330
|
+
| Header | Description |
|
|
331
|
+
|--------|-------------|
|
|
332
|
+
| `x-agent-tag` | Distribution tag (`latest`, `beta`, etc.) |
|
|
333
|
+
| `x-agent-access` | Access level (`public`, `restricted`) |
|
|
334
|
+
|
|
335
|
+
**Response:**
|
|
336
|
+
|
|
337
|
+
```json
|
|
338
|
+
{
|
|
339
|
+
"name": "@activeagents/research-assistant",
|
|
340
|
+
"version": "1.2.0",
|
|
341
|
+
"tag": "latest",
|
|
342
|
+
"published_at": "2025-01-20T14:22:00Z",
|
|
343
|
+
"files": [
|
|
344
|
+
"agent.md",
|
|
345
|
+
"tools/search.tool.json"
|
|
346
|
+
],
|
|
347
|
+
"size": 12480,
|
|
348
|
+
"checksum": "sha256:abc123..."
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
#### Deprecate Version
|
|
353
|
+
|
|
354
|
+
```http
|
|
355
|
+
POST /agents/:scope/:name/versions/:version/deprecate
|
|
356
|
+
Authorization: Bearer <token>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Request Body:**
|
|
360
|
+
|
|
361
|
+
```json
|
|
362
|
+
{
|
|
363
|
+
"message": "This version has a critical bug. Please upgrade to 1.2.1"
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
#### Unpublish Version
|
|
368
|
+
|
|
369
|
+
```http
|
|
370
|
+
DELETE /agents/:scope/:name/versions/:version
|
|
371
|
+
Authorization: Bearer <token>
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Only allowed within 72 hours of publishing and if no dependents.
|
|
375
|
+
|
|
376
|
+
### User Actions
|
|
377
|
+
|
|
378
|
+
#### Star Agent
|
|
379
|
+
|
|
380
|
+
```http
|
|
381
|
+
PUT /agents/:scope/:name/star
|
|
382
|
+
Authorization: Bearer <token>
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
#### Unstar Agent
|
|
386
|
+
|
|
387
|
+
```http
|
|
388
|
+
DELETE /agents/:scope/:name/star
|
|
389
|
+
Authorization: Bearer <token>
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
#### Fork Agent
|
|
393
|
+
|
|
394
|
+
```http
|
|
395
|
+
POST /agents/:scope/:name/fork
|
|
396
|
+
Authorization: Bearer <token>
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Request Body:**
|
|
400
|
+
|
|
401
|
+
```json
|
|
402
|
+
{
|
|
403
|
+
"name": "my-research-assistant",
|
|
404
|
+
"scope": "@myorg"
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Response:**
|
|
409
|
+
|
|
410
|
+
```json
|
|
411
|
+
{
|
|
412
|
+
"name": "@myorg/my-research-assistant",
|
|
413
|
+
"forked_from": "@activeagents/research-assistant",
|
|
414
|
+
"version": "1.0.0",
|
|
415
|
+
"created_at": "2025-01-20T15:00:00Z"
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Testing & Playground
|
|
420
|
+
|
|
421
|
+
#### Run Agent in Sandbox
|
|
422
|
+
|
|
423
|
+
```http
|
|
424
|
+
POST /agents/:scope/:name/run
|
|
425
|
+
Authorization: Bearer <token>
|
|
426
|
+
Content-Type: application/json
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**Request Body:**
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"version": "1.2.0",
|
|
434
|
+
"input": {
|
|
435
|
+
"query": "What are the benefits of meditation?",
|
|
436
|
+
"depth": "shallow"
|
|
437
|
+
},
|
|
438
|
+
"options": {
|
|
439
|
+
"model_override": "anthropic/claude-3-5-haiku-latest",
|
|
440
|
+
"timeout": 30000,
|
|
441
|
+
"trace": true
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
**Response:**
|
|
447
|
+
|
|
448
|
+
```json
|
|
449
|
+
{
|
|
450
|
+
"run_id": "run_abc123",
|
|
451
|
+
"status": "completed",
|
|
452
|
+
"output": {
|
|
453
|
+
"summary": "Meditation offers numerous benefits...",
|
|
454
|
+
"sources": [
|
|
455
|
+
{
|
|
456
|
+
"url": "https://example.com/meditation-study",
|
|
457
|
+
"title": "Scientific Study on Meditation",
|
|
458
|
+
"relevance": 0.92
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"confidence": 0.85
|
|
462
|
+
},
|
|
463
|
+
"trace": {
|
|
464
|
+
"tools_called": [
|
|
465
|
+
{
|
|
466
|
+
"name": "web_search",
|
|
467
|
+
"input": {"query": "meditation benefits scientific studies"},
|
|
468
|
+
"output": {"results": [...]},
|
|
469
|
+
"duration_ms": 1250
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"model_calls": [
|
|
473
|
+
{
|
|
474
|
+
"model": "anthropic/claude-3-5-haiku-latest",
|
|
475
|
+
"input_tokens": 1420,
|
|
476
|
+
"output_tokens": 890,
|
|
477
|
+
"duration_ms": 2100
|
|
478
|
+
}
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
"usage": {
|
|
482
|
+
"total_tokens": 2310,
|
|
483
|
+
"estimated_cost": 0.0023,
|
|
484
|
+
"duration_ms": 4500
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
#### Get Run Status
|
|
490
|
+
|
|
491
|
+
```http
|
|
492
|
+
GET /runs/:run_id
|
|
493
|
+
Authorization: Bearer <token>
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
For long-running agents, poll this endpoint or use webhooks.
|
|
497
|
+
|
|
498
|
+
#### Stream Run Output
|
|
499
|
+
|
|
500
|
+
```http
|
|
501
|
+
GET /runs/:run_id/stream
|
|
502
|
+
Authorization: Bearer <token>
|
|
503
|
+
Accept: text/event-stream
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
Returns Server-Sent Events for real-time streaming:
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
event: tool_start
|
|
510
|
+
data: {"tool": "web_search", "input": {"query": "meditation benefits"}}
|
|
511
|
+
|
|
512
|
+
event: tool_complete
|
|
513
|
+
data: {"tool": "web_search", "duration_ms": 1250}
|
|
514
|
+
|
|
515
|
+
event: chunk
|
|
516
|
+
data: {"content": "Meditation offers"}
|
|
517
|
+
|
|
518
|
+
event: chunk
|
|
519
|
+
data: {"content": " numerous benefits..."}
|
|
520
|
+
|
|
521
|
+
event: complete
|
|
522
|
+
data: {"run_id": "run_abc123", "status": "completed"}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### Organizations
|
|
526
|
+
|
|
527
|
+
#### Create Organization
|
|
528
|
+
|
|
529
|
+
```http
|
|
530
|
+
POST /orgs
|
|
531
|
+
Authorization: Bearer <token>
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
**Request Body:**
|
|
535
|
+
|
|
536
|
+
```json
|
|
537
|
+
{
|
|
538
|
+
"name": "myorg",
|
|
539
|
+
"display_name": "My Organization",
|
|
540
|
+
"email": "contact@myorg.com"
|
|
541
|
+
}
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
#### List Organization Agents
|
|
545
|
+
|
|
546
|
+
```http
|
|
547
|
+
GET /orgs/:org/agents
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
#### Add Organization Member
|
|
551
|
+
|
|
552
|
+
```http
|
|
553
|
+
PUT /orgs/:org/members/:username
|
|
554
|
+
Authorization: Bearer <token>
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
**Request Body:**
|
|
558
|
+
|
|
559
|
+
```json
|
|
560
|
+
{
|
|
561
|
+
"role": "developer"
|
|
562
|
+
}
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
Roles: `owner`, `admin`, `developer`, `readonly`
|
|
566
|
+
|
|
567
|
+
### Webhooks
|
|
568
|
+
|
|
569
|
+
#### Register Webhook
|
|
570
|
+
|
|
571
|
+
```http
|
|
572
|
+
POST /agents/:scope/:name/hooks
|
|
573
|
+
Authorization: Bearer <token>
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
**Request Body:**
|
|
577
|
+
|
|
578
|
+
```json
|
|
579
|
+
{
|
|
580
|
+
"url": "https://myapp.com/webhooks/activeagents",
|
|
581
|
+
"events": ["publish", "star", "fork", "run"],
|
|
582
|
+
"secret": "my-webhook-secret"
|
|
583
|
+
}
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
#### Webhook Events
|
|
587
|
+
|
|
588
|
+
| Event | Description |
|
|
589
|
+
|-------|-------------|
|
|
590
|
+
| `publish` | New version published |
|
|
591
|
+
| `deprecate` | Version deprecated |
|
|
592
|
+
| `star` | Agent starred |
|
|
593
|
+
| `unstar` | Agent unstarred |
|
|
594
|
+
| `fork` | Agent forked |
|
|
595
|
+
| `run` | Agent run in sandbox |
|
|
596
|
+
| `download` | Agent downloaded |
|
|
597
|
+
|
|
598
|
+
**Webhook Payload:**
|
|
599
|
+
|
|
600
|
+
```json
|
|
601
|
+
{
|
|
602
|
+
"event": "publish",
|
|
603
|
+
"timestamp": "2025-01-20T14:22:00Z",
|
|
604
|
+
"agent": {
|
|
605
|
+
"name": "@activeagents/research-assistant",
|
|
606
|
+
"version": "1.2.0"
|
|
607
|
+
},
|
|
608
|
+
"actor": {
|
|
609
|
+
"username": "activeagents"
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
## Rate Limits
|
|
617
|
+
|
|
618
|
+
| Endpoint Type | Authenticated | Anonymous |
|
|
619
|
+
|---------------|---------------|-----------|
|
|
620
|
+
| Search/Read | 1000/hour | 100/hour |
|
|
621
|
+
| Download | 500/hour | 50/hour |
|
|
622
|
+
| Publish | 100/hour | N/A |
|
|
623
|
+
| Run (Sandbox) | 50/hour | 5/hour |
|
|
624
|
+
|
|
625
|
+
Rate limit headers:
|
|
626
|
+
|
|
627
|
+
```http
|
|
628
|
+
X-RateLimit-Limit: 1000
|
|
629
|
+
X-RateLimit-Remaining: 999
|
|
630
|
+
X-RateLimit-Reset: 1705764000
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
---
|
|
634
|
+
|
|
635
|
+
## Error Responses
|
|
636
|
+
|
|
637
|
+
```json
|
|
638
|
+
{
|
|
639
|
+
"error": {
|
|
640
|
+
"code": "NOT_FOUND",
|
|
641
|
+
"message": "Agent not found: @activeagents/nonexistent",
|
|
642
|
+
"details": {
|
|
643
|
+
"name": "@activeagents/nonexistent"
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
### Error Codes
|
|
650
|
+
|
|
651
|
+
| Code | HTTP Status | Description |
|
|
652
|
+
|------|-------------|-------------|
|
|
653
|
+
| `NOT_FOUND` | 404 | Resource not found |
|
|
654
|
+
| `UNAUTHORIZED` | 401 | Missing or invalid auth |
|
|
655
|
+
| `FORBIDDEN` | 403 | Permission denied |
|
|
656
|
+
| `CONFLICT` | 409 | Version already exists |
|
|
657
|
+
| `VALIDATION_ERROR` | 422 | Invalid input |
|
|
658
|
+
| `RATE_LIMITED` | 429 | Too many requests |
|
|
659
|
+
| `INTERNAL_ERROR` | 500 | Server error |
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
## SDK Usage
|
|
664
|
+
|
|
665
|
+
### Ruby (activeagent gem)
|
|
666
|
+
|
|
667
|
+
```ruby
|
|
668
|
+
require 'activeagent/registry'
|
|
669
|
+
|
|
670
|
+
# Configure client
|
|
671
|
+
ActiveAgent::Registry.configure do |config|
|
|
672
|
+
config.api_token = ENV['ACTIVEAGENT_TOKEN']
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
# Search agents
|
|
676
|
+
agents = ActiveAgent::Registry.search(
|
|
677
|
+
q: 'research',
|
|
678
|
+
tags: ['web', 'rag'],
|
|
679
|
+
framework: 'activeagent'
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
# Get agent details
|
|
683
|
+
agent = ActiveAgent::Registry.get('@activeagents/research-assistant')
|
|
684
|
+
puts agent.version # => "1.2.0"
|
|
685
|
+
puts agent.model # => "anthropic/claude-sonnet-4-20250514"
|
|
686
|
+
|
|
687
|
+
# Download and install
|
|
688
|
+
ActiveAgent::Registry.install('@activeagents/research-assistant')
|
|
689
|
+
# Installs to: vendor/agents/@activeagents/research-assistant/
|
|
690
|
+
|
|
691
|
+
# Load and use
|
|
692
|
+
agent_class = ActiveAgent::Registry.load('@activeagents/research-assistant')
|
|
693
|
+
agent = agent_class.new(params: { query: 'What is AI?' })
|
|
694
|
+
result = agent.research.generate_now
|
|
695
|
+
|
|
696
|
+
# Publish
|
|
697
|
+
ActiveAgent::Registry.publish(
|
|
698
|
+
path: './my-agent',
|
|
699
|
+
tag: 'latest'
|
|
700
|
+
)
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### JavaScript/TypeScript
|
|
704
|
+
|
|
705
|
+
```typescript
|
|
706
|
+
import { AgentRegistry } from '@activeagents/sdk';
|
|
707
|
+
|
|
708
|
+
const registry = new AgentRegistry({
|
|
709
|
+
token: process.env.ACTIVEAGENT_TOKEN
|
|
710
|
+
});
|
|
711
|
+
|
|
712
|
+
// Search
|
|
713
|
+
const agents = await registry.search({
|
|
714
|
+
q: 'research',
|
|
715
|
+
tags: ['web', 'rag']
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
// Download manifest
|
|
719
|
+
const manifest = await registry.getManifest('@activeagents/research-assistant');
|
|
720
|
+
|
|
721
|
+
// Run in sandbox
|
|
722
|
+
const result = await registry.run('@activeagents/research-assistant', {
|
|
723
|
+
input: { query: 'What is AI?' }
|
|
724
|
+
});
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
### Python
|
|
728
|
+
|
|
729
|
+
```python
|
|
730
|
+
from activeagents import Registry
|
|
731
|
+
|
|
732
|
+
registry = Registry(token=os.environ['ACTIVEAGENT_TOKEN'])
|
|
733
|
+
|
|
734
|
+
# Search
|
|
735
|
+
agents = registry.search(q='research', tags=['web', 'rag'])
|
|
736
|
+
|
|
737
|
+
# Download and convert to CrewAI
|
|
738
|
+
manifest = registry.get('@activeagents/research-assistant')
|
|
739
|
+
crewai_yaml = registry.export(manifest, format='crewai')
|
|
740
|
+
|
|
741
|
+
# Run in sandbox
|
|
742
|
+
result = registry.run(
|
|
743
|
+
'@activeagents/research-assistant',
|
|
744
|
+
input={'query': 'What is AI?'}
|
|
745
|
+
)
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
---
|
|
749
|
+
|
|
750
|
+
## CLI Reference
|
|
751
|
+
|
|
752
|
+
```bash
|
|
753
|
+
# Authentication
|
|
754
|
+
activeagent login # OAuth login flow
|
|
755
|
+
activeagent logout
|
|
756
|
+
activeagent whoami
|
|
757
|
+
|
|
758
|
+
# Search & Discovery
|
|
759
|
+
activeagent search research # Search for agents
|
|
760
|
+
activeagent search --tags web,rag # Filter by tags
|
|
761
|
+
activeagent info @activeagents/research-assistant # Get details
|
|
762
|
+
|
|
763
|
+
# Installation
|
|
764
|
+
activeagent add @activeagents/research-assistant
|
|
765
|
+
activeagent add @activeagents/research-assistant@1.2.0
|
|
766
|
+
activeagent add @activeagents/research-assistant --save # Add to agent.json
|
|
767
|
+
activeagent remove @activeagents/research-assistant
|
|
768
|
+
|
|
769
|
+
# Publishing
|
|
770
|
+
activeagent init my-agent # Create new agent
|
|
771
|
+
activeagent validate # Validate before publish
|
|
772
|
+
activeagent publish # Publish to registry
|
|
773
|
+
activeagent publish --tag beta # Publish with tag
|
|
774
|
+
activeagent deprecate 1.1.0 --message "Upgrade to 1.2.0"
|
|
775
|
+
activeagent unpublish 1.0.0 # Remove version (within 72h)
|
|
776
|
+
|
|
777
|
+
# Testing
|
|
778
|
+
activeagent test # Run local tests
|
|
779
|
+
activeagent run @activeagents/research-assistant # Run in sandbox
|
|
780
|
+
activeagent run . --input '{"query": "test"}' # Run local agent
|
|
781
|
+
|
|
782
|
+
# Organizations
|
|
783
|
+
activeagent org create myorg
|
|
784
|
+
activeagent org add-member myorg janedoe --role developer
|
|
785
|
+
activeagent org list-members myorg
|
|
786
|
+
|
|
787
|
+
# Utilities
|
|
788
|
+
activeagent convert agent.prompt --to agent.md # Convert formats
|
|
789
|
+
activeagent export . --format crewai # Export to CrewAI
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
---
|
|
793
|
+
|
|
794
|
+
## Web Interface Features
|
|
795
|
+
|
|
796
|
+
### Agent Page (activeagents.ai/agents/@activeagents/research-assistant)
|
|
797
|
+
|
|
798
|
+
- **Overview** - Description, README, quick stats
|
|
799
|
+
- **Playground** - Interactive testing with real-time output
|
|
800
|
+
- **Versions** - Version history with changelogs
|
|
801
|
+
- **Dependencies** - Dependency graph
|
|
802
|
+
- **Dependents** - Who uses this agent
|
|
803
|
+
- **Files** - Browse package contents
|
|
804
|
+
- **Settings** - Maintainer settings (if owner)
|
|
805
|
+
|
|
806
|
+
### Playground Features
|
|
807
|
+
|
|
808
|
+
- **Input Editor** - JSON/Form input with schema validation
|
|
809
|
+
- **Model Selector** - Test with different models
|
|
810
|
+
- **Streaming Output** - Real-time response streaming
|
|
811
|
+
- **Tool Trace** - Visual tool execution timeline
|
|
812
|
+
- **Cost Estimator** - Token usage and cost tracking
|
|
813
|
+
- **Share** - Generate shareable playground links
|
|
814
|
+
- **Fork to Sandbox** - One-click fork to edit
|
|
815
|
+
|
|
816
|
+
### Dashboard
|
|
817
|
+
|
|
818
|
+
- **My Agents** - Published agents with stats
|
|
819
|
+
- **Starred** - Bookmarked agents
|
|
820
|
+
- **Recent Runs** - Playground history
|
|
821
|
+
- **Usage** - API usage and billing
|
|
822
|
+
- **Teams** - Organization management
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
## Pricing Tiers
|
|
827
|
+
|
|
828
|
+
### Free Tier
|
|
829
|
+
- Unlimited public agents
|
|
830
|
+
- 100 sandbox runs/month
|
|
831
|
+
- 10 MB storage per agent
|
|
832
|
+
- Community support
|
|
833
|
+
|
|
834
|
+
### Pro ($29/month)
|
|
835
|
+
- Private agents
|
|
836
|
+
- 1,000 sandbox runs/month
|
|
837
|
+
- 100 MB storage per agent
|
|
838
|
+
- Priority support
|
|
839
|
+
- Custom domains
|
|
840
|
+
|
|
841
|
+
### Team ($99/month)
|
|
842
|
+
- Everything in Pro
|
|
843
|
+
- 5,000 sandbox runs/month
|
|
844
|
+
- Organization management
|
|
845
|
+
- SSO/SAML
|
|
846
|
+
- Audit logs
|
|
847
|
+
- SLA
|
|
848
|
+
|
|
849
|
+
### Enterprise (Custom)
|
|
850
|
+
- Unlimited runs
|
|
851
|
+
- Self-hosted option
|
|
852
|
+
- Custom integrations
|
|
853
|
+
- Dedicated support
|
|
854
|
+
- Custom contracts
|
|
855
|
+
|
|
856
|
+
---
|
|
857
|
+
|
|
858
|
+
## Future Roadmap
|
|
859
|
+
|
|
860
|
+
### Phase 1 (Current)
|
|
861
|
+
- Basic registry CRUD
|
|
862
|
+
- Package publishing
|
|
863
|
+
- Search and discovery
|
|
864
|
+
- CLI tools
|
|
865
|
+
|
|
866
|
+
### Phase 2
|
|
867
|
+
- Sandbox execution environment
|
|
868
|
+
- Interactive playground
|
|
869
|
+
- Model compatibility matrix
|
|
870
|
+
- Usage analytics
|
|
871
|
+
|
|
872
|
+
### Phase 3
|
|
873
|
+
- Agent marketplace (paid agents)
|
|
874
|
+
- Revenue sharing for authors
|
|
875
|
+
- Enterprise self-hosted
|
|
876
|
+
- CI/CD integrations
|
|
877
|
+
|
|
878
|
+
### Phase 4
|
|
879
|
+
- Agent composition (agents using agents)
|
|
880
|
+
- Automated testing infrastructure
|
|
881
|
+
- Performance benchmarks
|
|
882
|
+
- Security scanning
|