---
title: "Agents: LLM API guides and articles | BroadRouter"
description: "Running coding agents and parallel agent fleets on an OpenAI-compatible API: sessions, concurrency, rate limits and long context."
url: https://broadrouter.com/blog/category/agents/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Agents articles

Updated 2026-11-16

Running coding agents and parallel agent fleets on an OpenAI-compatible API: sessions, concurrency, rate limits and long context. 16 articles, each opening with a direct answer. Every outside fact links to its source with the date we checked it.

-   [Pricing20](https://broadrouter.com/blog/category/pricing/)
-   [Engineering33](https://broadrouter.com/blog/category/engineering/)
-   [Arabic AI26](https://broadrouter.com/blog/category/arabic-ai/)
-   [Comparisons16](https://broadrouter.com/blog/category/comparisons/)
-   [Agents16](https://broadrouter.com/blog/category/agents/)
-   [Privacy8](https://broadrouter.com/blog/category/privacy/)

1.  [https://broadrouter.com/blog/claude-code-with-openai-compatible-models/](https://broadrouter.com/blog/claude-code-with-openai-compatible-models/)
    
    6 min read · Updated 2026-11-15
    
    ## [Claude Code with open models: proxies, native endpoints and limits](https://broadrouter.com/blog/claude-code-with-openai-compatible-models/)
    
    Claude Code sends Anthropic Messages API requests to ANTHROPIC\_BASE\_URL. To use an OpenAI-compatible provider, run a translating proxy such as LiteLLM and point Claude Code at it, or pick a provider with its own Anthropic-format endpoint, such as DeepSeek or Z.ai. Anthropic does not support non-Claude models in Claude Code, so test tools, caching and context limits yourself.
    
2.  [https://broadrouter.com/blog/openclaw-hermes-agent-cheap-model/](https://broadrouter.com/blog/openclaw-hermes-agent-cheap-model/)
    
    6 min read · Updated 2026-11-15
    
    ## [OpenClaw and Hermes Agent on a cheap model: setup and token math](https://broadrouter.com/blog/openclaw-hermes-agent-cheap-model/)
    
    Both agents accept a custom OpenAI-compatible endpoint: OpenClaw under models.providers with api "openai-completions", Hermes Agent with provider: custom and a base\_url. Cost is driven by context size times how often the agent runs times the model price. Shrink the context, run scheduled checks less often and on a cheaper model, and test tool calling before you commit.
    
3.  [https://broadrouter.com/blog/prompt-injection-coding-agents/](https://broadrouter.com/blog/prompt-injection-coding-agents/)
    
    8 min read · Updated 2026-11-15
    
    ## [Prompt injection in coding agents: defences that actually hold](https://broadrouter.com/blog/prompt-injection-coding-agents/)
    
    Assume a coding agent will sometimes follow instructions hidden in a README, issue, web page or tool result; OWASP says fool-proof prevention may not exist. So limit what a hijacked agent can do: sandbox it with no network by default, keep secrets out, allow-list commands, require approval to push or install, and review every change.
    
4.  [https://broadrouter.com/blog/ai-coding-agent-run-cost/](https://broadrouter.com/blog/ai-coding-agent-run-cost/)
    
    7 min read · Updated 2026-11-15
    
    ## [What one AI coding agent run costs: steps, context growth, caching](https://broadrouter.com/blog/ai-coding-agent-run-cost/)
    
    An agent resends its whole context on every step, so input grows with the square of the step count: 60 steps cost about 3.5 times the input of 30. Caching decides most of the bill; with append-only history, over 90% of input can bill at the cached rate. Multiply cost per run by monthly runs and compare with a flat session.
    
5.  [https://broadrouter.com/blog/agent-token-budget/](https://broadrouter.com/blog/agent-token-budget/)
    
    5 min read · Updated 2026-11-14
    
    ## [Agent token budget: where an agent loop's tokens go](https://broadrouter.com/blog/agent-token-budget/)
    
    An agent loop resends its whole context on every call: system prompt, tool definitions, conversation history, file contents and tool output, plus the new step. Input usually outweighs output many times over. Log prompt\_tokens, cached\_tokens and completion\_tokens per call, find the biggest repeating block, then trim tools, cap tool output and restart long sessions.
    
6.  [https://broadrouter.com/blog/best-llm-for-aider/](https://broadrouter.com/blog/best-llm-for-aider/)
    
    6 min read · Updated 2026-11-14
    
    ## [Best LLM for Aider: how to choose a model and connect it](https://broadrouter.com/blog/best-llm-for-aider/)
    
    The best model for Aider follows its edit format reliably, holds your repository map in context and is cheap enough to run all day. Aider connects to any OpenAI-compatible API: set OPENAI\_API\_BASE to https://inference.broadnet.ai/v1, set OPENAI\_API\_KEY, and start aider --model openai/broadnet/deepseek-v4.1-flash. On a Full Moon plan that model has no token meter.
    
7.  [https://broadrouter.com/blog/best-open-model-for-coding-agents/](https://broadrouter.com/blog/best-open-model-for-coding-agents/)
    
    6 min read · Updated 2026-11-16
    
    ## [Best open model for coding agents: pick by tools, context and cost](https://broadrouter.com/blog/best-open-model-for-coding-agents/)
    
    For a coding agent that depends on native tool calls (opencode, Continue Agent mode, Zoo Code), GLM 5.3 is the safest pick on BroadNet: tools listed, 1M context. For Aider or an all-day agent, DeepSeek V4.1 Flash on a flat plan costs least. Qwen3.8 27B fits screenshot work. Gemma 4 VL 26B's 32K context is too small.
    
8.  [https://broadrouter.com/blog/long-running-agent-context-management/](https://broadrouter.com/blog/long-running-agent-context-management/)
    
    6 min read · Updated 2026-11-16
    
    ## [Context management for long-running agents with a 1M window](https://broadrouter.com/blog/long-running-agent-context-management/)
    
    Treat the context as an append-only log: a fixed system prompt and tool list first, then history that only grows, so each turn reuses the cached prefix. With a 1,048,576-token window, as on DeepSeek V4.1 Flash, compact rarely and in large steps, trim bulky tool output first, and keep durable facts in a short notes file the agent rereads.
    
9.  [https://broadrouter.com/blog/overnight-coding-agent-runs/](https://broadrouter.com/blog/overnight-coding-agent-runs/)
    
    5 min read · Updated 2026-11-16
    
    ## [How to run coding agents unattended overnight, safely](https://broadrouter.com/blog/overnight-coding-agent-runs/)
    
    Run the agent in a container or VM with only the repository mounted, on its own git branch, committing after every completed step. Give it a written task file, a step cap and a wall-clock deadline, then review the branch in the morning. A flat plan session, such as BroadNet's $60 Full Moon, fixes the worst-case bill.
    
10.  [https://broadrouter.com/blog/run-parallel-coding-agents-flat-rate/](https://broadrouter.com/blog/run-parallel-coding-agents-flat-rate/)
     
     5 min read · Updated 2026-11-16
     
     ## [How to run parallel coding agents on a flat-rate LLM API](https://broadrouter.com/blog/run-parallel-coding-agents-flat-rate/)
     
     Give each agent that works at the same time its own plan session. A session runs one request at a time with no token meter, so an orchestrator with three sub-agents needs four sessions. Cap requests in flight in your own code to match. One key can hold several sessions, and each session on Full Moon costs $60 a month.
     
11.  [https://broadrouter.com/blog/long-running-agents-timeouts-retries/](https://broadrouter.com/blog/long-running-agents-timeouts-retries/)
     
     4 min read · Updated 2026-11-16
     
     ## [Long-running agents: timeouts, retries and checkpoints that hold](https://broadrouter.com/blog/long-running-agents-timeouts-retries/)
     
     Treat each model call as disposable and the agent's state as durable. Set a timeout per call, stream to detect stalls, retry 429, 5xx and dropped streams with bounded backoff, and give every side-effecting tool an idempotency key. Save the message list after each step so a crash resumes from the last checkpoint, not from the start.
     
12.  [https://broadrouter.com/blog/n8n-ai-agent-cheap-llm/](https://broadrouter.com/blog/n8n-ai-agent-cheap-llm/)
     
     5 min read · Updated 2026-11-16
     
     ## [n8n AI Agent on a cheap LLM: setup, model choice and cost per run](https://broadrouter.com/blog/n8n-ai-agent-cheap-llm/)
     
     Point n8n's OpenAI credential at a low-cost OpenAI-compatible API, enter the model by ID and turn off Use Responses API. Give the AI Agent a model with tool calling, such as Qwen3.8 27B or GLM 5.3. Keep Max Iterations low, memory short and tools few, and route simple classification to a cheaper model first.
     
13.  [https://broadrouter.com/blog/mcp-with-openai-compatible-models/](https://broadrouter.com/blog/mcp-with-openai-compatible-models/)
     
     4 min read · Updated 2026-11-16
     
     ## [Use MCP servers with OpenAI-compatible models (any provider)](https://broadrouter.com/blog/mcp-with-openai-compatible-models/)
     
     MCP is model-independent. The MCP client in your app lists each server's tools, passes them to the model as ordinary function-calling tools, and runs tools/call when the model asks. Any OpenAI-compatible model with reliable tool calling can use MCP servers. Configure them in Cline, Continue, opencode or n8n, or bridge them in about 40 lines of Python.
     
14.  [https://broadrouter.com/blog/use-open-models-in-coding-agents/](https://broadrouter.com/blog/use-open-models-in-coding-agents/)
     
     4 min read · Updated 2026-11-16
     
     ## [Use open models in coding agents: Aider, Cline, opencode, Codex](https://broadrouter.com/blog/use-open-models-in-coding-agents/)
     
     Every major coding agent takes three values for a custom model: a base URL, an API key and a model ID. Aider uses OPENAI\_API\_BASE, Cline and Roo Code an OpenAI Compatible provider, opencode a custom provider, Continue apiBase. Codex CLI now speaks only the Responses API, so a chat-completions endpoint needs a translating proxy such as LiteLLM.
     
15.  [https://broadrouter.com/blog/what-unlimited-llm-api-really-means/](https://broadrouter.com/blog/what-unlimited-llm-api-really-means/)
     
     7 min read · Updated 2026-11-15
     
     ## [What "unlimited" really means in an LLM API plan](https://broadrouter.com/blog/what-unlimited-llm-api-really-means/)
     
     "Unlimited" in an AI plan can still hide a token meter, a rolling usage window, a weekly cap, a rate limit or a concurrency limit. Ask which of these apply. BroadNet's Full Moon plan has no token meter, no 5-hour window and no weekly cap for DeepSeek V4.1 Flash; its one limit is one request at a time per session.
     
16.  [https://broadrouter.com/blog/multi-agent-cost/](https://broadrouter.com/blog/multi-agent-cost/)
     
     4 min read · Updated 2026-11-16
     
     ## [What multi-agent setups really cost: per token vs flat sessions](https://broadrouter.com/blog/multi-agent-cost/)
     
     A multi-agent setup costs roughly the tokens of every agent added together, plus handoffs and repeated context. Anthropic measured about 15 times the tokens of a chat for its multi-agent research system, against 4 times for one agent. Per token, the bill grows with every agent; on a flat plan it grows with the agents running at once.
     

Free tools for agents

-   [Agent run cost estimator](https://broadrouter.com/tools/agent-run-cost-estimator/) Context growth per step, total tokens and cost of one agent run, with a DeepSeek session comparison.
-   [LLM batch job planner](https://broadrouter.com/tools/llm-batch-job-planner/) Run time, binding limit, cost per model and the flat sessions needed to finish a big job by a deadline.
-   [Flat-rate vs per-token LLM cost calculator](https://broadrouter.com/tools/flat-rate-vs-per-token-calculator/) Break-even between an unlimited plan and paying per token, per agent.
-   [LLM rate limit and concurrency calculator](https://broadrouter.com/tools/llm-rate-limit-calculator/) Which limit binds first: RPM, TPM or concurrency, with Little's law.

[All free tools](https://broadrouter.com/tools/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=blog-category-agents&utm_content=page-cta) ·
