page:recipes:ai workflow runner:hono:response streaming

Host AI Workflow Runner with Hono: Streamed Responses

Deploy an AI workflow runner built with Hono on Ample using the streaming response service pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL; a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Hono: a Server-Sent Events endpoint read incrementally through the public HTTPS gateway: five one-second chunks arrived spread over time with the first within seconds (not buffered), a 70-second stream of 36 chunks completed past common 60-second idle timeouts, and a client that disconnected after two chunks was observed and recorded by the server (disconnected=true).

Summary of Observations:

Representative Queries

Resource Requirements

Infrastructure Requirements

  1. Compute

    • Status: Verified
    • Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request.
  2. Postgres

    • Status: Verified
    • Summary: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when needed.

Prerequisites

Workflow Steps

  1. Build and Start

    • Command: npm install and npm run start with @hono/node-server on the node-22 template
    • Requirement: Server must bind to 0.0.0.0 on PORT.
  2. Implement the Pattern on PostgreSQL

    • Implement the streaming response service and repeat the data delivery schema.
  3. Deploy

    • Command: ample deploy . --name --public
    • Perform synchronous deployment and check results.
  4. Verify

    • Command: ample logs --kind build
    • Fetch and verify the live URL and self-test routes.

Examples

Success Checks

Limitations

Cost Estimate

Next Actions

  1. Browse the catalog index.
  2. Search published recipes by intent, stack, and constraints.
  3. Prepare a deployment plan for an authorized project.