How to Connect Fly.io to an AI Agent
Auth setup
1. Install flyctl: curl -L https://fly.io/install.sh | sh. 2. fly auth login. 3. fly tokens create for API token. 4. Use Authorization: Bearer {token}.
Key facts
| Base URL | https://api.machines.dev/v1/ |
| API version | v1 (Machines API) |
| Auth | API token authentication. Generate via flyctl CLI (fly tokens create) or dashboard. Pass as Bearer token. |
| Request body | application/json |
| Pagination | No pagination โ returns all machines for an app. |
| Rate limit | Not officially documented. Generous limits for Machine operations. |
| Error format | JSON: {"error":"...","status":"..."} |
Key endpoints
| Method | Path | Description |
GET | /apps/{app}/machines | List Machines in an app |
POST | /apps/{app}/machines | Create a new Machine |
POST | /apps/{app}/machines/{id}/start | Start a Machine |
POST | /apps/{app}/machines/{id}/stop | Stop a Machine |
Quickstart
GET /v1/apps/my-app/machines
Authorization: Bearer {fly_token}
Response: [{"id":"...","name":"...","state":"started","region":"nrt",...}]
Agent pitfalls & tips
- Machines API is the primary API โ Fly Apps v1 API is deprecated.
- Use region 'nrt' (Narita/Tokyo) for JP workloads.
- Machines are per-request VMs โ they can start/stop in <300ms.
- Use fly-replay header for request routing to specific regions.
- Check machine.state: created, started, stopped, destroyed.
Source: curated by KanseiLink from official documentation (docs) and registry checks. Last reviewed: 2026-04-07. Specs change โ verify against the official docs before production use.
Frequently Asked Questions
What is Fly.io's AEO score?
โผ
Fly.io has an AEO score of 0.70 and is rated A (Functional agent integration). AEO (Agent Engine Optimization) measures how well a SaaS service works with AI agents. Scores range from 0.00 to 1.00, with grades from AAA (best) to D (not agent-ready).
Is Fly.io AI-agent-ready?
โผ
Fly.io is currently connectable for AI agent use. API access is available but no dedicated MCP server has been published yet. For detailed connection guides, auth setup, and known pitfalls, use the KanseiLink MCP tool.
How does Fly.io compare to other Developer Tools services?
โผ
In the Developer Tools category, Fly.io is rated A. KanseiLink evaluates services based on MCP availability, API quality, documentation, auth-guide clarity, and integration recipe availability (methodology published). Visit the full rankings at kansei-link.com to see how Fly.io compares.
How can I integrate Fly.io with an AI agent?
โผ
The fastest way to integrate Fly.io with an AI agent is through KanseiLink MCP. Install it with: npx @kansei-link/mcp-server โ then use the search_services and get_service_detail tools to get the current auth setup, endpoints, rate limits, and agent-specific tips. This data is kept fresh from registry checks, curated official-doc guides, and agent reports.
How do I authenticate with Fly.io?
โผ
API token authentication. Generate via flyctl CLI (fly tokens create) or dashboard. Pass as Bearer token. Setup: 1. Install flyctl: curl -L https://fly.io/install.sh | sh. 2. fly auth login. 3. fly tokens create for API token. 4. Use Authorization: Bearer {token}.
What are Fly.io's API rate limits?
โผ
Not officially documented. Generous limits for Machine operations.