Agents reference
An agent is a name people pick a conversation by, with the model it runs on, instructions added to
Felix’s own, the tools it may use and any approvals it adds. Agents need hosted threads and a
configured model; /health reports agents: true where both are there.
Fields
Section titled “Fields”| Field | Required | Limits | Effect |
|---|---|---|---|
id |
Yes | 1–40 lowercase letters, digits and hyphens, starting with a letter or digit | What conversations and the delegate tool name it by. Fixed once saved. |
name |
Yes | 1–60 characters, unique without regard to case | Shown in the composer’s picker and by /agent in the terminal. |
description |
Up to 300 characters | Shown beside the name, and told to the model when it can delegate. | |
model |
A model the deployment offers (GET /v1/models) |
What its runs use when the message names none. Absent: the deployment’s default. A save naming another model is refused with 400 unknown_model; a model the deployment later stops offering falls back to the default. |
|
reasoning |
off, low, medium, high, xhigh or max |
Its thinking level. Absent: FELIX_REASONING. |
|
instructions |
Up to 8,000 characters | Added to the system prompt after Felix’s own, never in its place. | |
tools |
Up to 200 names | The tools it may use, from those the deployment offers; MCP tools by mcp__<server>__<tool>. Absent: all of them. A name the deployment does not have is refused (400 unknown_tool), except MCP tools, which arrive as each run connects. notify, and for an admin workflow_catalog, check_workflow and save_workflow, are the exceptions to Absent: all of them: an agent has them only when this list names them (for notify, see Notices from an agent). |
|
approvalRules |
Up to 20 | Approvals it adds. See Approval rules. | |
greeting |
headline 1–120 characters, subtitle up to 300 |
What an empty conversation shows. | |
starters |
Up to 8, each title 1–60 and prompt 1–2,000 characters |
Prompts an empty conversation offers; picking one sends its prompt as written. | |
outputStyles |
Up to 16, each name 1–64 letters, digits, _ or - (unique without regard to case), description up to 200 and prompt 1–16,000 characters |
Ways of writing a conversation can pick. See Output styles. | |
defaultOutputStyle |
The name of one of its outputStyles |
The style a conversation writes in until it picks one. Absent: the instructions as written. | |
workspace |
codework or cowork |
Where its conversations open: CodeWork or Cowork. Absent: a general conversation. See Workspaces. |
Text fields are trimmed, and an unknown field is refused rather than ignored.
An agent only narrows what the deployment offers. A tool the admins turned off for every agent
stays off, and a client’s own tools (such as ask_user in the web app, or the terminal’s file
tools) are the client’s to offer, whatever the agent’s list says.
The document
Section titled “The document”The agents are saved as one document:
| Field | Meaning |
|---|---|
defaultAgent |
The id of the agent a conversation runs as when it names none, or names one since removed. It must be listed. |
disabledTools |
Server tools turned off for every agent. |
agents |
1 to 50 agents with distinct ids and names. |
The whole document is at most 256 KiB. A deployment that has never saved one has three agents:
default (Felix), and the starter agents coder and assistant. One that had
the earlier single agent settings keeps them as its default agent.
Saving sends the whole document with the version it changes (PUT /v1/agents), so two admins
cannot overwrite each other unseen: the second gets 409 stale_settings. Runs that start after a
save use it, within 15 seconds on every server instance. Each save is a new version (the newest 100
are kept, and GET /v1/agents/history lists the newest 20) and an agents_changed audit line
naming the ids added, removed and changed, never the instructions. If the agents cannot be read, runs
do not start (503 settings_unavailable).
Members read each agent’s name, description, model, thinking level, tools, greeting, starters and its output styles’ names and descriptions; only admins see instructions, approval rules and style prompts, and only admins save.
Output styles
Section titled “Output styles”An agent can offer ways of writing, such as terse or teacher, and a conversation picks one.
The chosen style’s prompt is added to the end of the system prompt, after the agent’s instructions,
under a heading naming it (# Output style: terse). Until a conversation picks one, it writes in
the agent’s defaultOutputStyle, or with no style when there is none.
- Picking. A server conversation stores its style with
PATCH /v1/threads/<id>and{ "outputStyle": "teacher" }, andnullgoes back to the default. A name its agent does not declare is refused with422 unknown_output_style; names match without regard to case. The style can change at any time and applies from the next run. A request without a server thread names its style in the run request (outputStyle). - When styles change. A stored style the agent no longer declares reads as the agent’s default, so removing a style never breaks a conversation.
- Delegation. A child run started by
delegateanswers its parent, not a person, and keeps its own prompt without a style.
The web app’s composer shows a Style picker when the conversation’s agent has styles, and the
terminal has /style with --server.
Workspaces
Section titled “Workspaces”An agent can open its conversations in a workspace: CodeWork, for work on a GitHub repository, or Cowork, for a personal assistant’s calendar, email, schedules and files. A workspace chooses what the web app shows; it never gives an agent a tool. An agent without one opens general conversations, as every agent did before workspaces.
Starter agents
Section titled “Starter agents”A deployment comes with an agent for each workspace, so both work before anyone sets them up:
| Id | Name | Opens in | Instructions, in short |
|---|---|---|---|
coder |
Coder | CodeWork | Read the code before changing it, keep changes small and tested, work on a branch of its own and never push to the default branch, and open a pull request for a person to review. |
assistant |
Assistant | Cowork | Check the calendar before proposing a time, save email as drafts for the person to send, and offer to schedule what should happen later or repeatedly. |
They narrow no tools: each uses what the deployment offers. Edit or delete them like any agent. A deployment that saved its agents before the starters existed keeps what it saved; the Agents page offers Add CodeWork and Cowork agents (or whichever is missing), which adds them to the page to review and save like any change. An agent already named Coder or Assistant is not added twice.
- Kept by the conversation. A conversation takes its agent’s workspace whenever its agent is set
(when it is created, or by a change before its first run) and keeps it after, in the thread’s
workspacefield. Changing an agent’s workspace later does not move existing conversations; a fork keeps its source’s. - Choosing. Where the deployment’s agents open in more than one workspace, a new conversation in the web app offers General, CodeWork and Cowork above its greeting. Each choice is an agent: the default agent where it opens there, else the first that does. The choice is gone once the first message is sent.
- GitHub belongs to CodeWork. Where the deployment has a CodeWork agent, Open a repository and Start from an issue or PR are offered in CodeWork only; General and Cowork open without them. A deployment with no CodeWork agent offers them in every new conversation, as before.
- CodeWork. The greeting leads with the conversation’s repository and Open a repository, then Start from an issue or PR where it is offered, and starters about the repository after the agent’s own. With Start from an issue or PR in the first row, the starters are two. Where a repository cannot be opened it says what is missing instead: GitHub set up on the deployment, a signed-in person (the clone uses their own GitHub connection), or a sandbox. A repository picked there opens its files and sandbox beside the conversation on a wide window. Once the conversation has started, a line above the composer shows the repository, its branch (commits ahead, uncommitted changes) and that branch’s pull request on GitHub: open, draft, merged or closed, how its checks are going, and what its reviewers asked for.
- Cowork. The greeting shows Today: the person’s calendar for their own day, read through their Google connection, and the jobs about to run, before starters about the day after the agent’s own. Without a Google connection it says where to make one. A Gmail draft the agent saves is drawn as the email it is, marked not sent, with a link to Gmail’s Drafts.
- Finding them. Once a conversation has started, the header names its workspace beside the
title on a wide window. The sidebar names a conversation’s workspace under its title, and searching for
codeworkorcoworklists those conversations.
How a conversation gets its agent
Section titled “How a conversation gets its agent”docs/diagrams/agent-resolution.mmd, which follows packages/protocol/src/agents.ts:resolveAgent, apps/api/src/routes/chat.ts (agent, model, reasoning, tools, instructionsOf), apps/api/src/routes/threads.ts and packages/storage/src/thread-store.ts:setAgent.- Choosing. A server conversation is given its agent when it is created
(
POST /v1/threadswith{ "agent": "reviewer" }) or before its first run (PUT /v1/threads/<id>/agent, by its owner or an admin). Once it has run, holds messages, or is held by a run, it keeps that agent, and a change is refused with409 agent_locked. In the web app the composer’s agent picker does this; in the terminal,/agent. - Default and removed agents. 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 id in its run
history (
missingAgent) rather than failing. - Without a server thread. A stateless run request names its agent in the request (
agent). - Model and thinking level. A message’s own
modelandreasoningcome first, then the agent’s, then the deployment’s defaults. The agent’s model is used only while the deployment still offers it. - Instructions. The agent’s instructions follow Felix’s own system prompt, and the date stays last.
Approval rules
Section titled “Approval rules”An agent’s rules add approvals; they can never loosen or replace one. Each rule:
| Field | Meaning |
|---|---|
id |
1–64 letters, digits, dots, dashes or underscores, distinct within the agent. |
description |
Up to 300 characters, shown to the person deciding. |
tools |
1 to 50 tool names, or patterns with * and ?. |
ttl_seconds |
1–86,400: how long a decision is awaited, and how long the approval then lasts. Absent: five minutes to decide, and the approval does not expire. |
one_shot |
true: an approval covers one call. |
when_args |
Up to 10 argument names: the rule applies only when each is present and non-empty. |
How they combine with the deployment’s. A call is first checked against the deployment’s rules (those of its MCP servers, and the built-in rule on GitHub writes). Only a call none of them decides is checked against the agent’s. So an agent can gate a tool the deployment leaves open, but cannot change what happens to one the deployment already gates. Within a set of rules, a rule naming the tool literally beats a pattern, and among equals the last one wins.
bypass mode skips the agent’s rules as it skips the deployment’s, but never the built-in rule on
GitHub writes. Rules need the deployment’s approvals storage: without it, a save with rules is
refused (400 approvals_not_configured), and tools an agent’s rules would gate are not offered. See
Governance for how a gated call waits.
Delegation
Section titled “Delegation”With FELIX_DELEGATE=on, runs get the delegate tool: the model hands a self-contained task to a
child agent and gets its reply back, marked as the child’s. When the deployment has agents, the
tool lists them (up to 50, with their names and descriptions), and the model can hand the task to
one by id.
| The child’s setup | The named agent’s model (else the parent run’s), thinking level and instructions, after a line telling it to do only that task. Without a name, the parent’s model and Felix’s prompt. |
| The child’s tools | Only those a child may be given: in the shipped configuration fetch_url, run_script (while FELIX_CODEMODE is off), the time tools, calculate, web_search and the lookups the deployment turns on, and the thread workspace’s read_file, list_files, find_files and grep_files, where the run has them. A named agent’s tool list narrows them further. A child is never given a tool that needs approval, a client’s tool, a workspace write, an MCP tool or delegate. |
| Limits | Three children at once, eight per run, ten model turns each. A child runs in memory: its turns are not saved to the thread. |
| An unknown agent | Comes back to the model as a tool error naming the agents there are. |
A child cannot delegate in turn; a chain or fan-out is the model’s to arrange with several
delegate calls. Children are not traced on their own: the call appears as one tool span. The
terminal’s --delegate hands read-only subtasks to unnamed children; see
Concepts.
Scripts
Section titled “Scripts”With the LOADER binding, runs offer run_script: the model writes JavaScript that runs in a fresh
isolate with no network, file system or timers, and only what it returns, passes to text() or
logs reaches the model. FELIX_CODEMODE decides what a script may call:
FELIX_CODEMODE |
Scripts |
|---|---|
off (the default) |
Compute only: calculations, parsing, reshaping data. |
on |
Also call the run’s server tools as tools.<name>(args), several at once with Promise.all, to filter a large result before the model reads it. Every call meets the run’s approval rules and plan mode exactly as if the model had made it, and a refused call rejects with the reason. |
only |
As on, and the model is offered those tools only through scripts. |
A script finds tools with ALL_TOOLS, describeTool(name), await searchTools(query) and
await describeNamespace(server) (an MCP server’s tools), makes at most 200 calls, four at a time,
and stops after 60 seconds unless it asks for up to 300. A sequential tool waits for earlier calls and runs alone. Refusing a call lets the script handle the refusal. If the approval service fails, the run stops and leaves the script call unresolved for recovery. Selecting Stop at confirmation ends the script and the run, cancels active nested calls and discards queued calls. Calls already made are not undone if the
script fails. Tools a terminal brings with --server stay the model’s to call; a script cannot.
In terminal file sessions, scripts can save values on the current branch. store(key, null) saves JSON null across restarts. store(key) deletes the key, and a later load(key) returns undefined. A script can change up to 200 distinct keys. Both the resulting state and the changes saved in one entry have a 1 MiB UTF-8 JSON limit. If a script catches a limit error, it can still read the previous value and save its other accepted changes. A failed script discards its staged changes. If the session cannot load or save values, the run stops and the script call stays unresolved. A tool called before a save failure may already have taken effect.
run_script replaced run_javascript: an agent or setting that names run_javascript means
run_script.
Import and export
Section titled “Import and export”Export JSON on the Agents page downloads the whole document as it stands in the editor,
unsaved changes included, as felix-agents.json: { defaultAgent, disabledTools, agents },
without a version. Import JSON reads such a file, checks it with the same parser the
server uses, and makes it the editor’s draft; nothing changes until an admin saves it. The same
document is what PUT /v1/agents takes, with version beside it:
{ "version": 3, "defaultAgent": "default", "disabledTools": [], "agents": [ { "id": "default", "name": "Felix", "description": "" }, { "id": "reviewer", "name": "Reviewer", "description": "Reads a change and says what is wrong with it.", "reasoning": "high", "instructions": "Review the change you are given. Lead with what would break.", "tools": ["fetch_url", "run_script"], "approvalRules": [ { "id": "fetch", "description": "Reading the web", "tools": ["fetch_url"], "one_shot": true } ], "starters": [{ "title": "Review a pull request", "prompt": "Review this pull request: " }] } ]}History on the Agents page lists the saved versions for admins; Load into the editor makes an older one the draft, and saving restores it as a new version.
Routes
Section titled “Routes”| Route | Who | Does |
|---|---|---|
GET /v1/agents |
Anyone signed in | The document, its version, admin, and what the deployment resolves to: the models, every server tool and whether it is on, the MCP servers, and whether memory, documents, sign-in and delegation are on. |
PUT /v1/agents |
Admins | Save the whole document against its version. |
GET /v1/agents/history |
Admins | The newest 20 versions, each with who saved it and when. |
PUT /v1/threads/<id>/agent |
The thread’s owner, or an admin | { agent }, before the conversation’s first run. |
Coming from manifests
Section titled “Coming from manifests”The manifest reference’s pages map onto Felix as follows. Fields with no entry here have no counterpart.
| Manifest page | In Felix |
|---|---|
| Model and prompts | An agent’s model, reasoning and instructions; the deployment’s models are in Models and embeddings. |
| Tools, Tool families | An agent’s tools, from the deployment’s server tools (the bindings in Deploy) and its MCP servers. |
| Agents and delegation | Delegation, above. |
| Skills, memory and sessions | The skill library, per-person memories, and hosted threads. |
| Running and reaching people | Scheduling and runs. |
| Governance | An agent’s approval rules, and Governance. |
The manifest pipeline (how a manifest was compiled into an agent) has no counterpart: an agent is data a run reads when it starts, as above.
© Felix. All rights reserved.