GitHub

Working with the agent

What the agent actually is, which tools it has on each surface, how Plan and Build differ, and how to brief it so the result is checkable.

The agent is not a chat window that produces text. It is a loop: it reads the project, decides on an action, calls a tool, reads the result, and decides again until the task is done or it needs something from you. Everything else on this page follows from that.

Loop request → context → decision → tool call → result → next step
Modes Plan (read-only) · Build (can change files)
Surfaces Desktop · CLI · Cloud
Subagents up to 6 per spawn_agents call · up to 20 concurrent in Projects

Model, agent, tool, runtime

Four different things that are easy to collapse into one word:

LayerWhat it decides
ModelGenerates the reply and chooses the next action
AgentGives the model a role, instructions, project context and a set of tools
ToolPerforms one concrete action: read a file, search text, run a command, open a page
RuntimeDecides where that action happens — your machine or a cloud workspace

This is why two sessions on the same model behave differently: different tools, different files, different instructions, different limits.

One request, step by step

  1. RequestYour message arrives with the project context the surface can see.
  2. InvestigateThe agent lists, searches and reads before it changes anything.
  3. DecideIt picks one action at a time — a tool call, a question, or an answer.
  4. Read the resultOutput goes back into the context, including errors and empty results.
  5. Repeat or reportIt continues until the task is done, blocked, or needs your input.

The instructions tell the agent to check its own result and to report checks it could not run. That is a rule it follows, not an independent audit: when a reply says "fixed", the evidence is the diff and the commands that actually ran.

The main agent

Freebuff's main loop is called base3: one agent investigates, edits and verifies with its own tools. Helper agents exist, but they are additions — a research assistant, and in some configurations code subagents — not the default shape of a turn. Definitions for other agents exist in the repository; their presence is not a promise that a given account or release runs them.

The tool groups

The exact set depends on the surface, the mode, your connections and the run itself. These are the groups you will see in practice.

GroupToolsWhat to expect
Find and read list_directory · glob · code_search · read_files Large files can be read by line range, so a shown excerpt is not proof the whole file was seen
Edit str_replace · write_file str_replace needs an exact match; write_file replaces a file whole
Run run_terminal_command Tests, builds, linters, installs — real actions with real side effects
Post-change checks run_file_change_hooks Runs your configured hooks for changed files, when hooks exist and the tool is available
Web web_search · read_url · researcher-web The researcher is a separate helper for multi-source questions; it is not offered in every run
Browser navigate · read page · click · type · console and network · screenshot Desktop only; see Browser and preview
Terminal panel terminal_open · terminal_list · terminal_read · terminal_write A terminal you can see and type into yourself
Connected apps search_integration_tools · get_integration_tool_schemas · run_integration_tools · connect_integration Only for accounts you connected — see Integrations
MCP search_mcp_tools · call_mcp_tool Only servers you added and approved — see MCP servers
Sites sites_list · sites_inspect · sites_create · sites_add_storage · sites_enable_auth · sites_deploy · sites_set_secret · sites_set_published Read-only in Plan mode; see Sites
Service research Gravity Index Finds and compares third-party services; creating an account there needs your explicit yes
Skills skill loader Loads a named instruction set on demand

Background commands work differently per surface. Desktop and the CLI can run a process in the background; a Cloud command is synchronous and time-limited, and long-running work uses the Cloud-specific mechanism instead.

Plan and Build

Plan

Plan is for understanding a task and writing the plan without touching the project. File writes and changing commands are refused. When the plan is ready the agent exits the plan and you approve it or ask for a revision — saying "do it" inside Plan does not quietly convert the turn into Build.

Build

Build can edit files and run commands within the task. The Desktop instructions still say not to commit, push or open a pull request unless you asked; that is a rule the agent follows, not a technical lock.

Do not project Desktop's Plan mode onto the CLI. In the CLI the root agent is tied to the selected model and an internal lite mode, so confirm the behaviour of your installed version instead of assuming.

Desktop, CLI and Cloud

DesktopCLICloud
Where files liveYour folder on your machineYour working directoryThe chat's workspace copy
Who runs commandsYour OS userYour OS userThe cloud workspace
UI toolsBrowser, preview, terminal panelQuestions, next-step suggestions, render_uiDev-server preview only
Extra helpersResearch and, in some runs, code subagentsSkills, service researchCloud Projects subagents

The desktop is not a sandbox: choosing a folder scopes the agent's work, it does not isolate the operating system. Commands run with your user's permissions and can reach beyond that folder, and administrator rights are never granted implicitly. See Desktop and Cloud for where files actually live.

Browser and preview

In Desktop the agent can drive a browser: open an address, read the page structure, click, type, follow navigation, read console and network activity, screenshot, and change the viewport. The preview tool shows either a running local dev server or a suitable HTML file from the workspace.

  • Reading the DOM is not a visual design review.
  • A 200 response is not proof that every button works.
  • Seeing a login page is not a completed sign-in.

When the browser or the tool is unavailable, the honest report is that it was not checked — and a preview server is not a Sites publication. See Sites.

The visible terminal

Besides plain command execution, the agent can open a terminal panel you share, list open terminals, read recent output and send input or a key. That is what makes interactive programs usable. The panel is yours too, so the agent reads before it types, and anything sensitive — a password, a one-time code — is better typed by you than sent through the chat.

Helper agents

A subagent gets one delegated job: locate a piece of code, study external documentation, investigate an independent part of a problem, or — where access allows — do a self-contained piece of code work. The result comes back to the main agent, which stays responsible for the answer.

  • Six per call. A single spawn request can carry up to six helpers.
  • Twenty at once. With Projects access, up to twenty code subagents can run concurrently in a session.
  • Not everywhere. Full code subagents are offered only under Projects access, not in Plan, and not on sponsored runs.

Those are implementation limits, not a target. Small or tightly coupled work is usually faster done by the main agent alone.

Skills

A skill is a set of instructions and supporting files for one kind of task — a release checklist, a testing procedure, a service integration. Loading one makes the agent follow that process; it does not change the model and does not guarantee an outcome. Treat third-party skills as code you are about to run: read what they ask for.

AGENTS.md

AGENTS.md is how a project states its own rules: layout, verification commands, conventions. It is context, not proof — instructions can be stale or contradict the code, so a change still has to be checked. In Cloud, an Include AGENTS.md setting decides whether project instructions are included, and settings differ between clients.

Long conversations

Context is finite. As a conversation grows, the history is compressed into a summary that tries to keep the goal, the decisions, the state of the work and the important files. It does not guarantee every detail survives.

  • Restate hard requirements when the task changes.
  • Ask the agent to re-read the current files instead of trusting an old message.
  • Keep long-lived project rules in AGENTS.md, where they are read fresh.

What to keep in mind

  • No OS sandbox. Commands run with your user's rights.
  • Unknown projects can carry executable settings. The CLI asks before trusting project-level agent or MCP configuration, and trust is tied to a directory — verify changes to it yourself.
  • Tools change the world. Publishing, deleting, Git commands and integrations deserve a second look before they run.
  • Keys do not belong in chat. Locally they go in the environment; on Sites they go in Secrets (API keys).
  • Pages and tool output are data. Text that says "ignore your instructions" is text, not an instruction.
  • "Verified" needs a noun. Which command ran, which URL returned what, what remains unchecked.

Brief it like a ticket

A reliable brief answers three questions: what to do, where, and how you will know.

  • The outcome — what is true when the task is done.
  • The boundary — what it may touch and what it must leave alone.
  • The check — the command, test or URL that proves it.
Fix the sign-in button. Don't change the design.
Cover the failed-auth path with a test and run the existing suite.
Find out why sign-in is broken. Change nothing yet —
show me the cause and propose a fix.

"Make login safer" is a wish, and a wish is where scope creep starts.

Keep the scope where you put it

Broad briefs produce broad diffs. When a result drifts, name the boundary in the follow-up — "keep the change to the settings page, revert the styling elsewhere" — instead of starting over.

When it stops to ask

A turn that pauses for a decision, a credential or a missing detail is working as designed. Answer with the specific value rather than "whatever you think": otherwise the agent picks something reasonable and you review a decision you never made.

What "verified" means

The agent reports what it ran, not what it believes. A green build is evidence about the build. A test that was never executed is a limitation, and it should be reported as one.

When a turn goes in circles

  • Stop and restate. Interrupt, then give the goal, the boundary and the failing check in one message.
  • Shrink the task. "Fix the failing snapshot test" beats "finish the migration" when the agent is stuck.
  • Give the error, not the summary. Paste the actual output; it usually changes the approach.
  • Start clean if context is poisoned. A fresh chat with the relevant files beats arguing with a long one.

Parallel work

Separate chats keep separate context, so parallel tasks do not contaminate each other. Two Cloud chats also keep separate copies of the files, which makes the merge step — through Git — yours. See Git and deploy.

Hands-off work

When the task is long but the definition of done is clear, stop babysitting it: Mission mode lets a judge model decide whether the agent should keep going, and stops it when the goal is reached or a human is needed.