CodingAgent is an Agent with a bundle of file, shell and web tools and instructions for working on a code base. Every file and shell operation is scoped to base_dir.
The agent lists the files, reads the relevant ones, makes targeted edits, runs the tests in the shell and reports back.

The bundled tools

Tools passed with tools=[...] are added to the bundle, not substituted.

Options

name, description and instructions have defaults you can override, and every other Agent parameter applies.
restrict_to_base_dir confines the file tools, not the shell: ShellTool runs any command with the permissions of your process. Run the agent in a container, or set include_shell=False and pass ShellTool(base_dir=..., requires_approval=True) so each command is reviewed. See Tool approvals.

Long sessions

A coding session reads many files and runs many commands, which fills the context window fast. The default compaction already replaces older reads of the same file by the latest one; for small-window models, see the recommended configuration in Context management. To build the same tools for your own agent, use build_coding_tools(base_dir=...) from gwenflow.agents.coding_agent.