Skip to main content

Agents

TF Code ships with three built-in agents. Switch between them with Tab in the TUI or the --agent flag in CLI mode.

Build

The default agent. Full read/write access for executing and implementing.

tfcode run "Add error handling to src/api.ts"
  • Full read/write access to files
  • Can execute bash commands
  • Uses all built-in tools (Bash, Read, Edit, Write, Glob, Grep, WebFetch, etc.)
  • Has access to synced workspace content (coder agents, agent skills) but NOT live MCP tools
  • Can switch into Plan mode via plan_enter
ActionPermission
Read filesAllowed
Write/edit filesAllowed
Bash commandsAllowed
Read .env filesAsk (requires confirmation)

Plan

Read-only planning agent. Explores your codebase and creates a plan without making changes.

tfcode run --agent plan "Analyze the auth flow and propose improvements"
  • Read-only — cannot edit, write, or modify any files
  • Writes plans to .tfcode/plans/*.md (the only write exception)
  • Can switch to Build via plan_exit
  • Injects a system prompt enforcing strict read-only behavior
ActionPermission
Read filesAllowed
Write/edit filesDenied (except .tfcode/plans/)
Bash commandsAllowed (read-only usage)

Workflow: Plan → Build

  1. Plan explores and creates a structured plan in .tfcode/plans/
  2. When ready, Plan offers to switch to Build
  3. Build receives the plan context and begins implementation

TF Engineer

The ToothFairyAI workspace agent. Automatically connected to the ToothFairyAI MCP server with exclusive access to live workspace management tools.

tfcode run --agent "TF Engineer" "Create a retriever agent called SupportBot"
tfcode run --agent "TF Engineer" "Search documents about refund policy"
  • Exclusive access to ToothFairyAI MCP tools — no other agent can use them
  • Can still read local files and use built-in tools
  • Edit and bash commands require confirmation (ask permission)
  • Always asks for confirmation before destructive operations
  • Connected via SSE to https://mcp.{region}.toothfairyai.com/sse
ActionPermission
Read filesAllowed
Write/edit filesAsk (requires confirmation)
Bash commandsAsk (requires confirmation)
TF MCP toolsAllowed (exclusive)

MCP Connection

TF Engineer automatically connects using your profile credentials. Credentials are injected as an x-api-key header and auto-filled parameters — the model never sees your API key, workspace ID, or region. They are stripped from the tool schema and added server-side.

MCP Tool Categories

CategoryToolsAuth Required
Agent ManagementCreate, get, update, delete, list, search agentsYes
Agent Functions/ToolsCreate, get, update, delete, list functionsYes
AuthorisationsCreate, get, update, delete, list auth configsYes
SecretsCreate, delete secrets (AWS Secrets Manager)Yes
Documents / Knowledge BaseCreate, get, update, delete, list, search documentsYes
EntitiesCreate, get, update, delete, list, search entitiesYes
FoldersCreate, get, update, delete, list, get folder treeYes
ChatsCreate, get, list, delete chats; list messages; send messagesYes
PromptsCreate, get, update, delete, list prompt templatesYes
MembersCreate, get, update, delete workspace membersYes
ChannelsCreate, get, update, delete, list channelsYes
ConnectionsCreate, get, delete model connectionsYes
BenchmarksCreate, get, update, delete, list benchmarksYes
Benchmark RunsRun, get, list, cancel, wait for benchmark runsYes
HooksCreate, get, update, delete, list hooksYes
Scheduled JobsCreate, get, update, delete, list scheduled jobsYes
SitesGet, update, delete, list sitesYes
Fine-TuningList trainable models, start/cancel training, generate datasetsYes
Training DataGenerate training data from chats or filesYes
DocumentationSearch docs, search API endpoints, get agent creation guideNo
Release NotesList, get, search release notesNo
Skills & GuidesList skills, get skill guide, recommend skill for operationNo
Credential ValidationValidate API key + workspace ID + regionYes
BillingGet monthly usage/costsYes
EmbeddingsCreate text embeddingsYes

Comparison

FeatureBuildPlanTF Engineer
PurposeExecute & implementExplore & planManage ToothFairyAI workspace
File editingAllowedDeniedAsk (requires confirmation)
Bash commandsAllowedAllowedAsk (requires confirmation)
TF MCP toolsNo accessNo accessExclusive access
Default agentYesNoNo
Custom system promptNoYes (read-only enforcement)Yes (MCP-first behavior)

Set Default Agent

{
"default_agent": "build"
}

Reviewer

The Reviewer lets you attach a stronger AI model to your agents so they can get a second opinion before making decisions. When enabled, agents gain access to a reviewer tool they can call for expert analysis.

{
"reviewer": {
"model": "anthropic/claude-opus-4-8",
"enabled_for": ["build", "tf_engineer", "plan"],
"temperature": 0.3,
"max_tokens": 8192
}
}

The model field uses the same provider/model format — use any provider you have configured. The reviewer is a one-shot call — it doesn't run tools, doesn't loop, and doesn't modify anything.

Focus Areas

FocusWhen to use
architectureDesign decisions, structure, patterns
securityVulnerabilities, auth issues, data exposure
performanceSpeed, memory, scaling concerns
correctnessLogic errors, edge cases, test coverage
general (default)Broad review across all areas

Permissions

The reviewer permission defaults to allow for built-in agents. Override:

{
"agent": {
"build": {
"permission": {
"reviewer": "ask"
}
}
}
}

To disable for a specific agent, remove it from enabled_for. To disable entirely, remove the reviewer section from config.