Coding Agent V2
Coding Agent V2 is an AI agent specialised in code that you talk to as in a chat. You paste a snippet or describe what you need, and the agent detects the language and what you want to do: create new code from a description, change existing code, move it to another language or analyse it to find errors and room for improvement. It plans long tasks step by step and checks the changes it makes.
If you need it to, it can also connect to a server of yours to read, create and change files or run commands there, within the limits you set.
When to use it
- A developer wants an assistant in the chat to write or review functions.
- You need to move a script from one language to another and understand the differences.
- You want a quick analysis of the quality or security of a piece of code before a review.
- You want the agent to check or fix configuration files on a test server.
Configuration
| Field | What it does |
|---|---|
| Agent Name | The agent’s name. It is used when you connect it as a tool or as an agent of another agent. Default: ReactAgent. |
| Agent Description | What the agent does, in one sentence. It helps other agents decide when to use it. |
| Input | The message the conversation starts with, usually connected from a Chat Input. |
| User Prompt | The text the agent receives with each message. Default: {input}, which is replaced by whatever arrives at Input. You can add text around it, for example fixed instructions for every request. |
| Connection | What to connect |
|---|---|
| Model (required) | The AI model that drives the agent, for example OpenAI or Anthropic. |
| Tools | Optional. Other tools the agent can use besides its own code tools. |
Advanced options
| Field | What it does |
|---|---|
| Enable Advanced Analysis | Adds more thorough analysis tools: code complexity, security review and a stricter style review. Default: off. |
| Enable SSH | Lets the agent work on a server of yours: run commands and read, create and change files. When you turn it on, the fields in the next table appear. Default: off. |
| Max Iterations | The maximum number of steps the agent can take for each answer. Default: 50. |
| Use short term memory | Makes the agent remember the previous messages of the same conversation. Default: on. |
| Memory top message | How many recent messages are kept in full when the conversation is summarised. Default: 20. |
| Max Tokens Before Summary | How large the conversation can grow before the agent summarises the oldest part. Default: 4000. |
| Context Editing Trigger (tokens) | How large tool results can grow before the agent drops the oldest ones so it does not get overloaded. Default: 1500. |
| Context Editing Keep (results) | How many recent tool results are kept when the old ones are dropped. Default: 3. |
| Checkpoint Timeout (s) | Seconds to wait for the conversation’s saved memory to load. If it takes longer, the agent answers without remembering the previous messages. Default: 3. |
| Stream | Shows the answer in the chat as it is generated. Default: off. |
| Tool Schema | The data the agent asks for when another agent uses it as a tool. If you leave it as it is, it asks for the code or specification to process and, optionally, the operation (edit, create, translate or analyse). |
Working on a server
These fields appear when you turn on Enable SSH:
| Field | What it does |
|---|---|
| Credential (required) | The credential of the SSH Client service with the access details of your server. Pick it with Choose an option or create one with Add new credential. See Credentials. |
| SSH Allowed Hosts | The servers the agent may connect to, one per line. If you leave it empty, it can only connect to the credential’s server. |
| SSH Allowed Paths | The folders on the server where the agent may work with files, one per line. Default: /workspace, /tmp and /home/developer. |
| SSH Read-Only Mode | Stops the agent from creating or changing files: it can only read them. Default: off. |
Output
- Response: the agent’s answer as a chat message. Connect it to a Chat Output.
- Agent: the whole agent, to connect it to another component that coordinates agents, such as Supervisor Agent.
- Tool: the agent as a tool, to connect it to another agent’s Tools input.
Example
A development team wants an assistant that reviews code before every delivery.
- Connect a Chat Input to Input and an AI model to Model.
- In User Prompt write:
Review this code, explain the problems you find and suggest a corrected version: {input}. - In the advanced options, turn on Enable Advanced Analysis.
- Connect Response to a Chat Output.
Each developer pastes their code into the chat and gets the analysis and the suggestion.
Good practices
- If you turn on Enable SSH, limit SSH Allowed Paths to the folders that are strictly needed and use SSH Read-Only Mode when the agent only has to look.
- Use a test server, not the production one, for the agent to make changes on.
- Review the code the agent suggests before putting it to use.
Related components
- Code Agent: converts whole projects to another version or language.
- Code Task Agent: writes and runs code to solve tasks with data and files.
- SSH Client: runs commands on a server from a flow.