LLMs Behind Agents Best Practices
Ten practices for selecting, budgeting, and swapping models so the "brain" layer of your agent stays cheap enough to run, strong enough to finish, and flexible enough to change.
Search across all documentation pages
Ten practices for selecting, budgeting, and swapping models so the "brain" layer of your agent stays cheap enough to run, strong enough to finish, and flexible enough to change.
| Phase | Practices to emphasize |
|---|---|
| Prototype | 1, 2, 4, 7 |
| First production path | 5, 6, 8, 9 |
| Scale and multi-model | 3, 10, plus tighter routing from 2-3 |
| Incident or cost spike | 5, 7, 9, then revisit 2-3 |
Measuring real multi-turn token usage early (practice 5 + 9), because it forces honest model and context design before habits calcify.
No.
Ship one reliable path with a clean adapter, then add a second model for failover or cost routing when metrics justify the complexity.
Local models are one way to execute practices 3 and parts of privacy-sensitive deployments.
They still need practices 1, 6, 7, and 10 - local does not excuse weak tool calling or unbounded loops.
Rarely as a blanket default.
It can be right for a narrow, high-stakes step with low volume, especially behind human approval for side effects.
After material model launches, pricing changes, or dashboard regressions - and on a regular cadence (for example quarterly) even if nothing feels broken.
No.
Frameworks accelerate wiring; they do not set your ceilings, evals, or routing policy.
Model ids that passed evals, have known cost classes, clear owners, and documented capabilities (tools, vision, context).
Small enough that the next decision is obvious without re-reading noise - prefer filtered fields and summaries with links to full artifacts.
In the agent runtime configuration, enforced server-side, not only as a polite suggestion in the prompt.
No.
Caching can reduce the cost of stable prefixes when available; it does not fix irrelevant tool dumps or runaway turns.
When success rate, constraint adherence, and human edit distance meet the bar on a fixed eval set at acceptable turn counts - not when a single happy demo works.
Assuming prompts and tool schemas are fully portable without re-running evals.
Re-validate tool-calling and multi-turn constraint retention on every new default.
Stack versions: Pins from the category manifest (verify at build): OpenRouter (~315+ models, July 2026 pricing/fees); LangGraph 1.0+; CrewAI 1.14+; Microsoft Agent Framework 1.0; Vercel AI SDK 6; Pydantic AI (latest); LlamaIndex (latest); OpenAI Agents SDK (latest + MCP); MCP (Linux Foundation governance); A2A (HTTP+SSE+JSON-RPC 2.0); Solana
@solana/web3.js+@solana/spl-token.
Reviewed by Chris St. John·Last updated Jul 16, 2026