BroadRouter
Get started

AI coding agent

Updated

An AI coding agent is a software tool in which a language model works on a codebase in a loop: it reads files, edits them, runs commands such as tests, reads the output and decides the next step until the task is done or a limit is reached.

Also called: coding agent, agentic coding, AI coding assistant

A coding agent is an AI agent whose tools are your editor, file system and terminal.

How it works

The agent gets a task in plain language and works in a loop. Each turn, the model either answers or returns tool calls such as “read this file”, “apply this edit” or “run the tests”. The tool host runs them, appends the output and calls the model again.

Claude Code’s docs describe it as “an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.” Aider, Cline and similar tools follow the same loop with different interfaces and permission models.

The SWE-agent paper (Yang et al., 2024) argues that agents are a new kind of user that needs its own interface, an “agent-computer interface”, in the way people need an IDE. With their interface, the authors report a pass@1 rate of 12.5% on the SWE-bench benchmark, which they describe as state of the art at the time.

A typical run, as requests to the model:

Step Model output Tokens sent as input
1 run_tests() system prompt + tools + task
2 read_file("src/parse.py") step 1 + test output
3 edit_file(...) step 2 + file contents
4 run_tests() step 3 + diff
5 “Fixed; tests pass.” step 4 + test output

Input grows every step, because the whole history is resent.

Why it matters

On BroadNet Inference

Coding agents that accept an OpenAI-compatible base URL can call BroadNet at https://inference.broadnet.ai/v1. Setup guides exist for Aider, Cline and others. BroadNet’s docs list tool calling for GLM 5.3 and Qwen3.8 27B.

On pay-as-you-go, a key allows 30 requests per minute and 4 in flight. The flat-rate plans (Full Moon, Orbit, Meteor) cover DeepSeek V4.1 Flash with no token meter. A session runs one request at a time, which fits one agent. If you run agents in parallel, or an agent that starts subagents, buy one session for each request that runs at the same time. The sessions guide shows the math.

Questions

What is the difference between a coding agent and code autocomplete?

Autocomplete suggests the next few lines while you type. A coding agent takes a whole task, such as fixing a failing test, and runs many steps on its own, reading files, editing them and running commands until it finishes.

Why do coding agents use so many tokens?

Every step is a new request that resends the system prompt, tool definitions, file contents and the growing history. A task of 40 steps sends that prefix 40 times, which is why cached input and flat plans matter for agents.

Can I use an open model in Claude Code, Aider or Cline?

Tools that accept an OpenAI-compatible base URL can call open models. Aider, for example, documents setting OPENAI_API_BASE and OPENAI_API_KEY and prefixing the model name with openai/.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity