Skip to content

Getting started

Felix is one pnpm workspace: packages for the model API, the tool loop and sessions, and three apps — the HTTP API, the web app and the felix terminal client. This page runs each of them locally. For the ideas behind them, read Concepts.

  • Node.js 26.4 or later and the pnpm version declared in the repository’s package.json.
  • For real model calls: a Cloudflare account with Workers AI. The terminal client calls the Workers AI REST API with an account ID and API token; the local API uses the Workers AI binding. To use Anthropic instead, select it explicitly and supply your own key.
  1. Install

    pnpm install --frozen-lockfile
  2. Run the demo

    pnpm demo

    The demo runs a synthetic model through the real tool loop. It needs no credentials and makes no provider requests.

  3. Verify

    pnpm verify

    Type checks, tests, production builds and browser tests, all against synthetic models.

  1. Configure the API

    Copy apps/api/.dev.vars.example to apps/api/.dev.vars.workers-ai and set:

    Variable What it does
    FELIX_API_TOKEN The token clients send to read and write hosted threads.
    FELIX_PROVIDER workers-ai (default), anthropic, openai, google, vertex, bedrock or mistral.
    FELIX_MODEL The model ID, for example @cf/zai-org/glm-5.3.
    FELIX_ANTHROPIC_API_KEY Only when FELIX_PROVIDER is anthropic.
    FELIX_OPENAI_API_KEY Only when FELIX_PROVIDER is openai.
    FELIX_GEMINI_API_KEY Only when FELIX_PROVIDER is google.
    FELIX_MISTRAL_API_KEY Only when FELIX_PROVIDER is mistral.
    FELIX_VERTEX_API_KEY For vertex: a Google Cloud API key, or instead FELIX_GCP_SERVICE_ACCOUNT (a service account key’s JSON). FELIX_GCP_PROJECT defaults to the key’s project, FELIX_GCP_LOCATION to global.
    FELIX_AWS_REGION For bedrock, with FELIX_BEDROCK_API_KEY or the FELIX_AWS_ACCESS_KEY_ID and FELIX_AWS_SECRET_ACCESS_KEY pair.
  2. Start the API

    pnpm dev:worker:ai

    pnpm dev:worker starts the same API without a model provider, for credential-free work.

  3. Start the web app in a second terminal

    pnpm dev:web

    The development server forwards /api to the local API. Provider keys stay on the server; the API token you enter in the web app’s connection settings stays in that tab’s memory.

The coding client reads, searches, edits and writes files in a workspace and runs commands there (run_command). Pass --read-only to offer only the read and search tools. In the full-screen client (pnpm cli), each write or command says what it will do and waits for y or n; add --yes to run them without asking. pnpm chat at a terminal asks the same at its prompt; a one-shot prompt, --print, --json or piped input runs them without asking, and says so once on stderr at the first one unless you passed --yes.

export CLOUDFLARE_ACCOUNT_ID=…
export CLOUDFLARE_API_TOKEN=…
pnpm chat --model @cf/zai-org/glm-5.3 --workspace /path/to/project

Without a prompt it starts an interactive session; with one it answers once and exits. Sessions are saved under the workspace’s .felix directory. --instructions FILE loads an instruction file from the workspace in place of the discovered ones; instruction files never grant tools.

pnpm cli starts the full-screen felix client, and pnpm cli --demo runs it offline.