Skip to content

Tool

Do you need a TypeScript AI agent framework?

A framework is a purchase, not a default. Answer five questions about your agent and get a verdict with the reasoning. The rule behind it: adopt a framework when you can name the feature it ships that you would otherwise build, and the week you would feel its absence.

0 of 5 answered

  1. 1. How long does one agent run take?
  2. 2. How many agents work on the task?
  3. 3. Must a run survive a server restart or deploy?
  4. 4. What does your team already know?
  5. 5. Do you need tracing and run history from day one?

Answer all five to see your verdict.

Plain TypeScript

One agent, short runs and no durability requirement is a loop, a tool registry and a few limits. You will understand every failure, and the migration path stays open if you outgrow it.

An SDK on top of your own loop

You want help with streaming, providers and typed tools, but not a whole runtime. A focused SDK earns its place when it removes work you would otherwise write, without owning your state.

A graph framework

Durable runs, multi-agent routing and tracing are the features a framework already ships. If you can name the week you would feel their absence, adopt it now and keep your tools behind your own definition so it stays replaceable.

Frequently asked questions

When is an agent framework worth it?

When it ships something you would otherwise have to build and maintain yourself, such as durable state you can resume, human approval steps, or branching workflows, and you can name the week you would miss it. If you cannot name that feature, you are paying for abstraction you do not use.

What does a "plain loop" mean?

A loop in your own code: call the model, run any tools it asks for, append the results to the history, and repeat until it stops or hits a turn limit. It is short, easy to read and easy to debug, and it is where most agents should start.

Is the verdict advice or a rule?

Advice. It scores your answers against a simple heuristic and explains the reasoning, so you can disagree with it knowingly. Treat it as a prompt to justify the dependency, not as a ruling.

Related tools

  • Token Counter

    Count tokens for any text, exactly for OpenAI models and estimated for Claude, in your browser.

  • Claude Token Counter

    Estimate Claude tokens and input cost for a prompt, with the limits of estimating spelled out.

  • OpenAI Token Counter

    Exact o200k_base token counts for GPT-style prompts, computed locally.

  • LLM Cost Calculator

    Estimate what an LLM feature costs per request, per day and per month from your own token counts and prices.

  • Agent Run Budget Simulator

    See how an AI agent's cost grows turn by turn and where your budget cap would stop it.

  • JSON to Zod

    Paste a JSON sample or a JSON Schema and get a Zod schema and TypeScript types, in your browser.

  • Tool Schema Validator

    Check an OpenAI, Anthropic or MCP tool definition for common mistakes and convert it to the other two formats.

Read the guide →