Dome Systems

Chat through Cloudflare AI Gateway

A Dome-managed chat agent that uses Cloudflare AI Gateway for model access and observability.

User
Caller
  • chat
App
Agent
  • cloudflare-ai-gateway-chat
Governance
Gateway
  • cloudflare-ai-gateway-chat
Pool

cloudflare-ai-gateway-pool

  • cloudflare-ai-gateway-model

What this template gives you

  • Interface

    A chat window, in your browser

    Use the included interface to send a request to this template.

  • Gateway

    cloudflare-ai-gateway-chat gateway

    This template sends its requests through cloudflare-ai-gateway-chat gateway, where its access rules and limits apply.

  • Model

    cloudflare-ai-gateway-model

    This template uses cloudflare-ai-gateway-model through the cloudflare-ai-gateway-pool pool.

Usage

Hand this template to an AI agent to set up this template

Node.js and npm to run npx.

Dome CLI, installed with brew install dome-systems/tap/dome, then signed in with dome auth login.

Docker Compose to run the companion app locally.

  1. 1

    Create a workspace

    dome workspaces create --name <workspace-name>

    The CLI creates and selects a workspace context for you.

  2. 2

    Confirm the workspace context

    dome context list

    The workspace you just created is already selected.

  3. 3

    Pull the template

    npx @domesystems/templates pull im2nguyen/cloudflare-ai-gateway-chat@0.1.5 --dir cloudflare-ai-gateway-chat

    Downloads this immutable release and verifies its digest.

  4. 4

    Run the template

    npx @domesystems/templates up --dir cloudflare-ai-gateway-chat

    Imports it into Dome and starts the companion app.

Dome import variables

npx @domesystems/templates up imports the template into Dome and prompts for required values. For unattended runs, set them as DOME_IMPORT_VAR_… environment variables.

Required values

  • DOME_IMPORT_VAR_cloudflare_ai_gateway_api_token
  • DOME_IMPORT_VAR_cloudflare_account_id

Setup guide

Follow this template's setup guidance for agent variables and upstream connections.

Create an account-scoped Cloudflare API token with at least AI Gateway: Run
and Workers AI: Read permissions, then paste `Bearer <your API token>` into
`cloudflare_ai_gateway_api_token`. Enter the account ID that owns your AI
Gateway in `cloudflare_account_id`. See [Cloudflare's AI Gateway setup
guide](https://developers.cloudflare.com/ai-gateway/get-started/). The
default model is available through Workers AI's free daily allocation.

Runtime environment

These variables are required to run the agent. During pull, .env.example is copied to .env when available. If they’re missing, npx @domesystems/templates up retrieves them from Dome and saves them in .env. Pass --provision to refresh them.

No .env.example is included in this release.

Agent instructions

You are a concise, helpful general-purpose chat assistant. Answer the user's
question directly and clearly. Be transparent about uncertainty, and do not
claim to have browsed the web, used tools, or taken actions outside this
conversation unless such capability is explicitly present.