Skip to content

Management API

Where the deployment stores traces, each run on the Activity page has a Trace disclosure: the run, its model calls (with tokens) and its tool calls as a waterfall against the run’s own time, with failures marked. It reads GET /v1/traces?attr.felix.run_id=<run id>: every hosted thread run records its run id on its run span (never as a metric label). Traces span everyone’s runs, so only admins can read them; a member is told so.

A deployment has named agents, and a conversation picks one. Each agent has:

Field Effect
Name and description How people pick it, in the composer and with /agent in the terminal, and what the delegate tool tells the model about it. The id (lowercase letters, digits and hyphens) is fixed once saved: conversations name the agent by it.
Model and thinking level What its runs use when the message names none; absent, the deployment’s default. A message that names a model or level still gets it.
Instructions Up to 8000 characters added to the system prompt after Felix’s own, never in its place.
Tools The tools it may use, from those the deployment offers (MCP tools by mcp__server__tool); absent, all of them. An agent only narrows: a tool turned off for every agent stays off, and a client’s own tools (such as ask_user, or the terminal’s file tools) are the client’s.
Approval rules Approvals it adds. One applies only to a call no deployment rule decides, so an agent can never loosen or replace an approval, the built-in one on GitHub writes included. bypass mode skips them, as it skips the deployment’s. They need the approvals API.
Greeting and starters The headline and sentence an empty conversation shows, and up to 8 starter prompts.
Output styles Up to 16 ways of writing a conversation can pick (a name, a line people see, and a prompt added after the instructions), and the one it starts in.

Beside the agents, the document names the default agent and the server tools turned off for every agent. Memory, documents, approvals, connections and GitHub keep their own deployment settings.

Picking one. A conversation is given its agent when it is created (POST /v1/threads with { "agent": "reviewer" }) or before its first run (PUT /v1/threads/<id>/agent); after that it keeps it, and a change is refused with 409 agent_locked. A conversation that names none runs as the default agent. If its agent is removed, its next run uses the default agent and records the missing one in its run history (missingAgent), rather than failing. A request without a server thread names its agent in the run request (agent).

Delegation. With delegation on, the delegate tool lists the agents and can hand a task to one: the child runs with that agent’s model, thinking level and instructions, and the tools it may use among those a child may be given. A child is never given a tool that needs approval, so a tool the agent’s own rules gate is left out too. An agent there is not comes back to the model as a tool error naming the ones there are.

Changing them. The Agents page (which was the Agent page) lists the agents and, for admins, edits one, adds, duplicates and deletes them (not the default), chooses the default, and exports and imports the whole document as JSON. It also shows every server tool and whether it is on, the MCP servers, governance and knowledge. History lists the saved versions for admins; Load into the editor puts an older one in the editor, and Save changes restores it as a new version. Members see each agent’s name, description, model, thinking level, tools, greeting, starters and output style names, without its instructions, approval rules or style prompts.

Runs that start after a save use it, within 15 seconds on every server instance. Saving sends the whole document and the version it changes, so two admins cannot overwrite each other unseen: the second gets 409 stale_settings and reloads. Each save is in the audit log as agents_changed, with the ids added, removed and changed, never the instructions; the newest 100 versions are kept. If the agents cannot be read, runs do not start (503 settings_unavailable) rather than run without them. A deployment that had the earlier single agent settings keeps them as its default agent.

Route Who Does
GET /v1/agents Anyone signed in The agents, their version, admin, and what the deployment resolves to.
PUT /v1/agents Admins { defaultAgent, disabledTools, agents, version }: the whole document.
GET /v1/agents/history Admins Past versions, newest first.
PUT /v1/threads/<id>/agent The thread’s owner, or an admin { agent }, before the conversation’s first run.

Documents are the deployment’s own reference material: handbooks, specs, policies and notes the agent can search and cite. Every run has a search_documents tool that returns numbered excerpts with their file names; the agent cites them as [n], and excerpts are marked as data so instructions inside them are not followed. Admins add and remove documents; anyone signed in can list and search them. Uploads and removals are in the audit log.

The Documents page lists them with whether each is searchable yet, lets admins Add documents and Remove them (after asking), and has Try a search, which shows exactly the excerpts the agent would get. Members see the list and the search, without the add and remove controls.

Route Who Does
GET /v1/documents Anyone signed in The documents, 50 a page, with each one’s indexing status (queued, running, completed, error).
GET /v1/documents/search?q=&limit= Anyone signed in The excerpts search_documents would give, best first.
POST /v1/documents?name= Admins Add a document: the body is the file, at most 4 MiB; Markdown, text, HTML, CSV, JSON, PDF or DOCX. The same name replaces it.
DELETE /v1/documents/<id> Admins Remove one.

The documents live in a Cloudflare AI Search instance with built-in storage, which indexes each upload for hybrid keyword and semantic search. Bind an AI Search namespace to the API Worker as AI_SEARCH:

"ai_search_namespaces": [{ "binding": "AI_SEARCH", "namespace": "default" }]

The instance, felix-documents unless FELIX_DOCUMENTS_INSTANCE names another, is created on first use. /health reports documents: true when the binding is there.

Files are each person’s own images: the ones they attach to a message, and the ones tools read or make in their conversations (an image file a tool opens, an image generate_image makes). The Files page, in the sidebar wherever images are kept, shows them newest first as cards. A card opens the image with its type and size, where it came from, the conversations it was used in, Download, and Remove from Files. Removing one takes it out of the list only; it stays in its conversations. Nobody else sees a person’s Files, and an image is readable only by whoever uploaded it, the owners of the threads it was used in, and admins.

Route Who Does
GET /v1/files?cursor=&limit=&source= Anyone signed in Their Files, newest first, 48 a page by default, or only upload, tool or generated ones with source: each image’s reference, type, size, name, where it came from (upload, tool, generated) and the threads it was used in that they can still open.
DELETE /v1/files/<ref> Anyone signed in Take an image out of their Files. Uploading it again brings it back.
POST /v1/files/backfill?cursor= Admins Add images stored before Files to their threads’ owners’ Files, one page of threads a call; call again with the returned cursor until none comes back.
GET /v1/files/backfill?cursor= Admins Count stored images that still have no owner, 200 a page: { read, ungranted, cursor? }. Call again with the returned cursor until none comes back.

An upload keeps its file name when the client sends it in the x-felix-file-name header (URI-encoded). Files needs the IMAGES R2 binding; /health reports files: true when it is there. Images stored before Files have no owner, so only admins can read them until the backfill gives them their threads’ owners. A full walk of GET /v1/files/backfill that counts no ungranted images says none is left.

An image uploaded and never sent in a run is removed by a daily sweep a day after upload, and leaves Files with it. Images sent on a thread, read by a tool or generated stay as long as a thread uses them. FELIX_IMAGE_SWEEP=off stops the sweep.

The Eval page checks the agent’s answers. A dataset is a list of prompts (cases), each with checks on what the agent does with it. Running a dataset sends every case to this deployment’s agent, one after another, as a fresh conversation, and grades its checks; the results of every run are kept, so a change to the model, the standing instructions or the tools shows up as a step in the pass rate. Admins write datasets on the page (or import and export them as JSON), pick the agent in the header and a model, press Run, watch the cases finish, and open a case to see each check’s outcome, the reply, the tools called and the tokens used. Stop ends a run after the case in hand.

Check Passes when
contains { text, ignoreCase? } The final reply contains the text.
not_contains { text, ignoreCase? } The final reply does not contain the text.
matches { pattern } The final reply matches the regular expression (at most 200 characters, checked when the dataset is saved; a repeated group that itself repeats, such as (a+)+, is refused because it can run for minutes).
tool_called { tool } The run called the tool at least once.
tool_not_called { tool } The run never called the tool.
max_tool_calls { count } The run made at most count tool calls.
rubric { rubric } A model reads the prompt, the reply and the rubric (at most 1000 characters) and answers PASS or FAIL with one sentence why.

Every check but rubric is a rule: the same reply always gets the same result. A rubric check is graded by the deployment’s default model and is not deterministic; its result is marked graded: "model" and the page says “graded by the model”. The grader is told the prompt and reply are data, not instructions. A dataset has 1–100 cases, each a prompt of up to 8000 characters with 1–10 checks.

A run goes as one agent: the one picked (the default agent when none is), with that agent’s instructions, tools and approval rules, and its model unless the run names another. Each run says which agent it ran as.

A run keeps a copy of its dataset as it was when it started, so editing or deleting the dataset later does not change past results. Each case has three minutes; a case that fails or times out is recorded as an error and the run goes on. A case passes when all its checks pass.

Results hold the agent’s replies, so evals are for admins only: members get 403 forbidden and the page tells them so. Saving and deleting a dataset and starting a run are in the audit log, with ids, counts, the model and the agent but never prompts. A deployment keeps 100 datasets and its newest 200 runs.

Route Does
GET /v1/evals/datasets The datasets, by name, with their case counts.
POST /v1/evals/datasets { name, description?, cases: [{ id?, prompt, checks }] }: a new dataset (201). A refusal is 400 invalid_dataset with the reason as its message.
GET /v1/evals/datasets/<id> · PUT · DELETE Read, replace (the whole dataset) or delete one.
POST /v1/evals/runs { datasetId, model?, agent? }: start a run (202) as that agent (else the default agent), with that model or the agent’s own. An agent the deployment does not have is 400 unknown_agent.
GET /v1/evals/runs?datasetId=&cursor= Run summaries, newest first, 50 a page: status, model, agent, who started it, and the counts passed, failed and errored.
GET /v1/evals/runs/<id> One run with its dataset copy and each finished case’s result: status, every check’s outcome and detail, the reply (at most 2000 characters), tool calls, tokens and time.
POST /v1/evals/runs/<id>/stop Stop the run after the case in hand.

Datasets are kept in the thread Durable Object namespace (THREADS), or in Postgres tables with FELIX_STORES=postgres (see Stores in Postgres), and /health reports evals: true where they are available. Runs execute in the hosted-run namespace (RUNS); without it datasets can still be edited, but starting a run answers 503 evals_not_configured.

A workflow is a graph of steps an admin draws on the Workflows page: the workflow’s inputs on the left, steps wired output to input, each wire carrying a value and setting the order. It runs durably: a run carries on through restarts, waits days for a person if it has to, and is never started twice by a retry. Each run executes on the deployment’s Workflows binding.

Step Does
Agent turn One turn of an agent on a prompt. Each {{ name }} in the prompt is an input of the step; the reply is its text output. It runs on a conversation of its own, owned by whoever started the run, with that agent’s model, instructions, tools and approval rules. A tool call it makes that needs approval waits for one, as in any conversation.
Tool call One call of a deployment tool, through the same approval rules (GitHub writes always need one). Fixed arguments may hold {{ name }}; a parameter left unfixed is an input. The tool’s reply is its result output.
Approval gate Waits for a person to approve or reject, with an optional note: approved and denied are its two ways on, decision its output. It waits one minute to 30 days (a day by default); if nobody decides, the run fails, or takes the denied way if the step says so.
Branch Takes one way: a condition over its inputs to true or false, a text value to one of its cases (else default), or a boolean to true or false.
Wait Sleeps, through restarts and deploys, for the time it is set to (one second to 30 days), or until the time wired into its until input (an ISO time or epoch milliseconds, at most 30 days ahead). Its woke output is when it woke. The run view says when a waiting one wakes.
Wait for a signal Waits for the signal it names, one minute to 30 days (a day by default). An admin sends it from the run view, or another system with POST …/runs/<run>/signals/<name>; one sent before the step is reached is kept for it. What was sent is its payload output, and received its way on; if no signal comes, the run fails, or takes timed_out if the step says so. A signal name is unique in the workflow.
Run a workflow Starts a run of another saved workflow, as whoever started this run, and waits for it (one minute to 30 days, a day by default). Choosing the workflow brings in its inputs: those not fixed on the step are the step’s inputs. With One run per item it takes a list on items and starts a run for each element (at most 20), settling when every run has ended, at the first failure (stopping the rest), or at the first to complete (stopping the rest). Its output is what the run produced (outputs, with run its id), or one entry per item in results. If a run does not complete, this run fails, or takes the failed way if the step says so.

An agent or tool step’s conversation is linked from its step in the run view (Open conversation), as soon as the step starts. It is not listed among conversations or found by search: GET /v1/threads and GET /v1/thread-search leave step conversations out unless asked with ?include=workflow. Its owner and admins open it like any other conversation.

Every step also has the input when: wired from a branch’s or an approval’s way (or the inputs’ start), the step runs only if that way was taken. A step whose input came from a step that did not run is skipped. A failed step fails the run; the steps not reached are skipped.

Templates fill {{ name }} with the value wired into that input (text as it is, anything else as JSON) and {{ name.field.0 }} with a part of it; \{{ writes a literal {{. A value from another step is marked as data in an agent’s prompt, so the agent does not take it as instructions. Nothing in a template is evaluated. A filled prompt or argument set is at most 32,000 characters.

Conditions compare and combine the branch’s inputs: ==, !=, contains (text or a list), matches "pattern" (a regular expression of at most 200 characters; one that repeats a repeating group, or refers back to a group, is refused), and, or, not and parentheses, over names, strings, numbers, true, false and null. For example label == "bug" and not (review.labels contains "wontfix"). Nothing else is accepted.

Anyone signed in reads the workflows; admins create, change and delete them. Each save is a new version and names the version it replaces; a save over a version someone has since replaced is refused (409 stale_workflow), and the page shows what differs before you keep yours or take theirs. A workflow with problems (a cycle, a step nothing leads to, an unwired input, a type that cannot meet) can be saved but not run. Admins run any workflow; members run one whose definition lets them, always as themselves, and see only their own runs. A run keeps the version it started on, its inputs and each step’s state, timings, attempts, inputs and outputs; an output over 16 KiB is kept in storage and the run shows a preview. A run can be paused, resumed and stopped by an admin or by whoever started it. Pausing a run that waits on an approval leaves the approval open: it can be decided while the run is paused, and the run takes the decision when it resumes. Stopping a run closes its open approvals.

Runs that start runs. A run started by a Run a workflow step appears among its own workflow’s runs, names the run and step that started it (Started from in the run view), and counts toward that workflow’s limit of live runs. Selecting the step lists the runs it started, each linked. Stopping a run stops the runs it started first, all the way down; a run whose wait ran out stops those still going. Runs nest at most three deep, so a workflow that runs itself stops there with an error. A member’s run may only start workflows open to members. GET /v1/workflows/<id>/runs/<run>/tree answers the run and every run under it.

Sending a signal. In the run view, a waiting signal step shows its signal’s name and when it stops waiting. Admins (and the API token) also get a payload box (optional JSON, at most 64 KiB) and Send signal; the run view reads the run again once it is sent. Members see the step but no control: only admins may send a signal. A signal is refused when the run has ended (409 run_ended), when no signal step in the run has that name (404 no_such_signal), or when the step is no longer waiting, having had its signal or run out of time (409 signal_taken); the run view says which. Another system can send one without a token by signing the request as a trigger is signed (felix-timestamp and felix-signature over <timestamp>.<body> with FELIX_SIGNING_SECRET; see the REST API); without the secret set, a signed request answers 503 signed_signals_not_configured. Each signed request is accepted once across the deployment: sent again, to this run or another, it answers 409 signal_replayed, so a retry needs a fresh timestamp and signature.

A workflow whose steps are only approvals and branches runs on a deployment with no model configured; one with agent turns or tool calls needs a configured model, and starting it otherwise answers 503 model_not_configured.

Saving and deleting a workflow, starting, pausing, resuming and stopping a run, every decision on an approval step and every signal sent are in the audit log (workflow_saved, workflow_deleted, workflow_run_started, workflow_run_paused, workflow_run_resumed, workflow_run_stopped, workflow_approval_decided, workflow_signal_sent), with ids and counts but never prompts, outputs or signal payloads. Approval steps also appear in GET /v1/approvals, where their decision is made.

Limit
Workflows per deployment 200
Steps per workflow 50 (200 wires, 32 inputs)
Definition 128 KiB
A run’s inputs 64 KiB
A step’s output 1 MiB
Runs kept per workflow the newest 200 (a live run is never dropped)
Runs going at once per workflow 20
Versions kept per workflow the newest 50
An agent or tool step 10 to 600 seconds (300 by default), 0 to 3 retries of failures worth retrying
Route Does
GET /v1/workflows The workflows, by name.
GET /v1/workflows/kinds The step kinds with their config schemas, the tools a tool step can call, and the limits.
GET /v1/workflows/<id> · PUT · DELETE?version= Read one (with each node’s ports and its problems), save the whole definition ({ definition, version }, 0 creates), or delete it (its runs stay readable).
GET /v1/workflows/<id>/history Admins: the newest 20 versions.
POST /v1/workflows/<id>/runs { inputs, version? }: start a run (202).
GET /v1/workflows/<id>/runs?cursor= Run summaries, newest first, 50 a page.
GET /v1/workflows/<id>/runs/<run> One run with the definition it started on and every step’s state.
GET /v1/workflows/<id>/runs/<run>/steps/<step>/output A step’s outputs in full.
POST /v1/workflows/<id>/runs/<run>/pause · resume · stop Control a run.
POST /v1/workflows/<id>/runs/<run>/signals/<name> Admins and the API token: { payload? }, send a signal its signal step waits for (202 { delivered, step }).

Workflows need the thread Durable Object namespace (THREADS), the API token and a Workflows binding named FELIX_WORKFLOWS for the class FelixWorkflow; /health reports workflows: true where all three are there, and without the binding every route answers 503 workflows_not_configured. Running agent and tool steps also needs a model, and approval steps need approvals. The binding’s concurrency.limit (10 in the shipped configuration) caps how many runs execute at once; runs over it wait their turn, and a run waiting on a person does not count.

The Memory page shows the signed-in person’s long-term memories, on a deployment with sign-in. Proposed lists what the agent proposed to keep: Keep accepts one (or Keep all), Drop rejects it. Kept lists what is recalled; Forget takes one out of recall after asking, and the notice it leaves offers Undo. Forgotten lists what was forgotten, most recently first, each with Restore. A forgotten memory is never recalled, and is deleted for good 30 days after it was forgotten (or sooner once more than 500 are forgotten, oldest first). A memory proposed in a conversation links back to it, and is shown in that conversation too, where it was proposed, with Keep and Drop and the kept memory it would replace; the run does not wait for it. Forgetting, restoring and deleting are in the audit log by the memory’s id, never its text. Opened with the deployment’s API token instead of a sign-in, the page says memories belong to signed-in people.

Route Does
GET /v1/memories The caller’s memories, proposals first. ?status=forgotten lists the forgotten ones instead.
POST /v1/memories/accept { ids }: keep proposals. A kept memory on the same topic is replaced.
POST /v1/memories/reject { ids }: drop proposals.
DELETE /v1/memories/<id> Forget a memory: it stops being recalled. Forgetting it again changes nothing.
POST /v1/memories/<id>/restore Bring a forgotten memory back. 409 memory_superseded when a kept memory now says the same or holds its topic.

/health reports memory: true where memories are available.

The Connections page lets the signed-in person link their own GitHub or Google account, on a deployment with sign-in that offers them. Each offered provider has a row: Connect sends the person to the provider and back; a connected row shows the account (login or email, and its picture), what it granted, and when it was connected and last used, with Disconnect after asking. A connection the provider refused shows Stopped working and Reconnect. The page says how a return went (connected, or why not). Opened with the deployment’s API token instead of a sign-in, it says connections belong to signed-in people.

Route Does
GET /v1/connections { offered, connections, servers }: what can be connected, with the scopes asked for, and the caller’s connections. Never a token.
POST /v1/connections/<provider>/start { returnTo }: the provider’s consent address, { url }, for the browser to open.
GET /v1/connections/<provider>/callback Where the provider returns; redirects to returnTo with #felix_connect=ok or #felix_connect_error=<code>.
DELETE /v1/connections/<provider> Disconnect: forgotten here, withdrawn at the provider.
/v1/connections/mcp/<server> with /start, /callback or DELETE The same for the caller’s own sign-in to a hosted MCP server. servers lists them; it is absent where none takes one.

/health reports connections: true where connections are offered.

The GitHub page lists the repositories the agent may read and change, each with read or read & write access, and whether its reads are limited to them. Admins add a repository by owner/repo (a pasted GitHub address works), change its access or remove it, switch the read limit, and Save changes against the version they read; a save that lost a race says to reload. Members see the list without controls. The page also says whether the viewer has connected GitHub, with a link to Connections, and that every change the agent makes asks for approval. Once you have connected, Your repositories lists what your GitHub account reaches (owned, collaborator and organization repositories), with whether each is private or archived and whether you can push, and marks the ones already listed; from 7 a filter narrows it, and past 1,000 the filter searches GitHub by name. Admins add one to the list from there with Add (as read). What the agent can then do is described in GitHub repositories.

Route Does
GET /v1/github/repositories { repositories: [{ fullName, access }], restrictReads, version, updatedAt?, updatedBy? }. Anyone signed in; admins also get grants, the conversations where a read-only repository was made read & write at an approval.
DELETE /v1/github/grants?repo=&thread= Admins: revoke a write grant ({ revoked }; 404 grant_not_found).
GET /v1/github/repos?q= The repositories the caller’s own GitHub connection reaches, sorted by name, or those with q in their name: { repositories: [{ fullName, private, archived, canWrite }], truncated }. At most 1,000; truncated past that. A signed-in person with GitHub connected (409 github_not_connected otherwise).
GET /v1/github/reviews Open pull requests that ask the caller for review, newest first: { reviews: [{ repository, number, kind, title, state, url, author, updatedAt }], truncated }. At most 30. With Only these repositories on, those outside the list are left out. A signed-in person with GitHub connected (409 github_not_connected otherwise).
PUT /v1/github/repositories Admins: { repositories, restrictReads, version }; 409 stale_settings when someone saved since version; 400 invalid_repositories for a malformed or repeated name.

/health reports github: true where GitHub connections are offered.

A hosted thread keeps a tree of everything it was sent. POST /v1/threads/{id}/rewind with {"to": "<entry id>"} makes the branch ending at that entry the active one ("to": null goes back to the start); a thread’s messages, its revision, the runs that follow, forks and side questions all use the active branch. Nothing is deleted: the branch left behind stays in the thread, and GET /v1/threads/{id}/branches lists every branch with the active one marked current. "summarize": true adds a summary of the branch left behind, so what it found is not lost.

Each message in a thread document has an entry in entries (its id, and its parent’s). Editing a prompt is a rewind to its parent followed by an ordinary send: the new prompt becomes another version, and versions lists, for each prompt that has several, which one is on screen and each one’s tip, where a rewind switches to it. A rewind is refused while a run holds the thread (409 run_active), at a point between a tool call and its results (400 rewind_inside_call), and for an entry the thread does not have (404 entry_not_found). Who may rewind is who may write the thread, and each rewind is audited as thread_rewound with the entry id. Every branch counts toward the thread’s size limits (1,000 entries, 1 MiB).

PUT /v1/threads/{id}/entries/{entry}/label with {"label": "<name>"} names an entry (null or a blank name clears it; 1–100 characters after trimming, no control characters). The name shows on the entry in entries and on every branch through it in /branches. An optional revision refuses the change (409 stale_revision) when the thread moved since it was read; it is refused while a run holds the thread (409 run_active) and for an unknown entry (404 entry_not_found). Each is audited as thread_labeled with the entry id, never the name. A thread document’s branchModel is the model (and thinking level) its active branch last ran with: each run records a model change before its prompt when its model or thinking level differs from the branch’s. Labels and model changes advance the thread’s revision like any change, so a send composed before one is refused.

Where the deployment has workspaces, a rewind’s answer also has files.changed, the workspace files the prompts it went back past changed; with "restoreFiles": true they are put back as they were, and files.restored and files.failed report each.

On a deployment with sign-in, admins see two more parts at the end of the Activity page. People lists everyone who has signed in, with their provider, role and last sign-in; End sessions (after asking) ends every session that person holds. Delete account… deletes that person’s account and data once you type their handle (@login, or their email); it is not offered on your own row, since your own account is deleted from Your data… in the account menu. Audit log lists sign-ins, refused sign-ins, ended sessions, connections, approval decisions, GitHub list changes and writes, thread deletions, mode changes, rewinds and labels, newest first, with who did each; Show older pages back through 90 days. Members, and deployments without sign-in, do not see these parts. The routes are GET /v1/people, POST /v1/people/<id>/revoke, DELETE /v1/people/<id> and GET /v1/audit; see Sign-in and sessions.