Planned Feature — Coming Soon
🚧 This feature is not yet released. The documentation below describes planned behavior and may change before launch.
Agents API
Create, configure, and manage agents programmatically.
Base URL: https://backend.flymy.ai/v1
Authentication: Include your API key in every request:
x-api-key: fly-***
Create Agent​
POST /agents
Request Body​
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Agent name |
goal | string | Yes | Goal prompt (supports Handlebars) |
tools | array | Yes | Tool IDs and/or agent-tool bindings |
model | string | No | Model ID (default: anthropic/default) |
input_schema | object | No | JSON Schema for inputs |
output_schema | object | No | JSON Schema for outputs |
instructions | object | No | {planning, tool_calling, formatting} |
drives | array | No | Drive IDs to bind |
mcp_servers | array | No | MCP server bindings [{id, tools}] |
visibility | string | No | private or public |
pricing | object | No | {per_run: number} |
context_compression | boolean | No | Default: true |
Example​
curl -X POST https://backend.flymy.ai/v1/agents \
-H "x-api-key: fly-***" \
-H "Content-Type: application/json" \
-d '{
"name": "Web Researcher",
"goal": "Research {{ topic }} and return a summary.",
"tools": ["web_search", "browse_website"],
"input_schema": {
"type": "object",
"properties": {
"topic": {"type": "string", "description": "Topic to research"}
},
"required": ["topic"]
}
}'
Response​
{
"id": "agent_abc123",
"name": "Web Researcher",
"status": "unpublished",
"revision_id": "rev_001",
"created_at": "2025-01-15T10:00:00Z",
"visibility": "private"
}
Get Agent​
GET /agents/{agent_id}
Response​
{
"id": "agent_abc123",
"name": "Web Researcher",
"goal": "Research {{ topic }} and return a summary.",
"tools": ["web_search", "browse_website"],
"model": "anthropic/default",
"input_schema": { "..." },
"output_schema": null,
"status": "published",
"published_revision_id": "rev_002",
"latest_revision_id": "rev_003",
"visibility": "private",
"created_at": "2025-01-15T10:00:00Z",
"updated_at": "2025-01-16T14:30:00Z"
}
List Agents​
GET /agents
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Max results |
offset | number | 0 | Pagination offset |
visibility | string | — | Filter by private or public |
Update Agent​
PATCH /agents/{agent_id}
Send only the fields you want to change. Creates a new draft revision.
curl -X PATCH https://backend.flymy.ai/v1/agents/agent_abc123 \
-H "x-api-key: fly-***" \
-H "Content-Type: application/json" \
-d '{
"goal": "Updated goal prompt.",
"tools": ["web_search", "browse_website", "code_interpreter"]
}'
Delete Agent​
DELETE /agents/{agent_id}
Publish Revision​
POST /agents/{agent_id}/publish
| Field | Type | Required | Description |
|---|---|---|---|
revision_id | string | No | Specific revision to publish (default: latest) |
curl -X POST https://backend.flymy.ai/v1/agents/agent_abc123/publish \
-H "x-api-key: fly-***" \
-H "Content-Type: application/json" \
-d '{"revision_id": "rev_003"}'
List Revisions​
GET /agents/{agent_id}/revisions
Response​
{
"revisions": [
{
"id": "rev_003",
"status": "draft",
"created_at": "2025-01-16T14:30:00Z"
},
{
"id": "rev_002",
"status": "published",
"created_at": "2025-01-15T12:00:00Z"
},
{
"id": "rev_001",
"status": "superseded",
"created_at": "2025-01-15T10:00:00Z"
}
]
}
Get Revision Diff​
GET /agents/{agent_id}/revisions/{revision_id}/diff
Response​
{
"changes": {
"goal": {
"old": "Research {{ topic }}.",
"new": "Thoroughly research {{ topic }} with verified sources."
},
"tools": {
"added": ["code_interpreter"],
"removed": []
}
}
}