Skip to main content
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​

FieldTypeRequiredDescription
namestringYesAgent name
goalstringYesGoal prompt (supports Handlebars)
toolsarrayYesTool IDs and/or agent-tool bindings
modelstringNoModel ID (default: anthropic/default)
input_schemaobjectNoJSON Schema for inputs
output_schemaobjectNoJSON Schema for outputs
instructionsobjectNo{planning, tool_calling, formatting}
drivesarrayNoDrive IDs to bind
mcp_serversarrayNoMCP server bindings [{id, tools}]
visibilitystringNoprivate or public
pricingobjectNo{per_run: number}
context_compressionbooleanNoDefault: 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
ParameterTypeDefaultDescription
limitnumber20Max results
offsetnumber0Pagination offset
visibilitystring—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
FieldTypeRequiredDescription
revision_idstringNoSpecific 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": []
}
}
}