Token Budgeting Per Node

Token Budgeting Per Node

Avoiding the token explosion.

Token Budgeting Per Node

Running an agent loop is like checking a bank account balance. It drains fast.

The Strategy

Don't send the Full State to every node.

  • Planner Node: Needs full history messages. (Expensive).
  • Tool Node: Only needs the tool_call object. (Cheap).
  • Refiner Node: Needs messages + tool_output. (Expensive).

By creating Sub-States, you can invoke nodes with only the data they need, saving tokens on input and reducing latency.

Subscribe to our newsletter

Get the latest posts delivered right to your inbox.

Subscribe on LinkedIn