## Host AI Workflow Runner with Axum: Streamed Responses

### Summary
Deploy an AI workflow runner built with Axum on Ample using the streaming response service pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, and a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL.

### Representative Queries
- Host AI workflow runner with Axum: streamed responses
- Where can I host AI workflow runner built with Axum?
- I need a tested end-to-end streaming transport, timeout behavior and client disconnect handling.

### Resource Requirements
- **Primitive:** Compute
- **Primitive:** Postgres

### Infrastructure Requirements
- **Compute:** Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.

- **Postgres:** Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.

### Prerequisites
- An Axum project that builds and starts with the documented commands.
- A PostgreSQL driver reading DATABASE_URL at runtime.
- An Ample account token with `servers:write`, `databases:read`.

### Tested Configuration
- **Template:** ubuntu-24.04
- **Runtime:** rust
- **Size:** s-1vcpu-2gb
- **Build:** `cargo build --release`
- **Start:** `./$(ls target/release/*.d | grep -v '/lib' | head -n 1 | sed 's/\.d$//')`

### Workflow Steps
1. **Build and Start**  
   `cargo build --release` in the rust builder image, then the release binary on the ubuntu-24.04 template.

2. **Implement the Pattern on PostgreSQL**  
   The fixture's module implements a Server-Sent Events endpoint read incrementally through the public HTTPS gateway.

3. **Deploy**  
   Run the synchronous deploy once and read the result.
   Command: `ample deploy . --name --public`

4. **Verify**  
   Fetch the live URL and the pattern self-test routes.
   Command: `ample logs --kind build`

### Examples
- **Axum Pattern Fixture**: Multi-pattern Axum app whose streaming response service module was checked live.

### Success Checks
- App responds on its public URL
- Streaming-response-service self-test: an SSE stream with incrementally read chunks.

### Limitations
- Verified on the ubuntu-24.04 template at s-1vcpu-2gb; other sizes are not verified.
- The AI workflow runner behavior is application code and was not separately tested.

### Cost Estimate
- **Monthly Amount:** $10.00
  - **App Server:** $5.00
  - **Managed PostgreSQL Database:** $5.00

### Evidence Summary
- Axum pattern fixture deployed on Ample with streaming response checks passed.

### Next Actions
1. **Browse the Catalog Index**  
   Method: GET
   Relative Path: /v1/catalog

2. **Search Published Recipes**  
   Method: POST
   Relative Path: /v1/catalog/search
   Parameters: `{ "body": {"limit": 5, "query": "Host ai workflow runner with Axum: streamed responses"} }`

3. **Prepare a Deployment Plan**  
   Method: POST
   Relative Path: /v1/catalog/plan

4. **Read Existing Agent Authentication Setup**  
   Method: GET
   Relative Path: /mcp/setup
