The official documentation established the agent loop, streaming, tool calling, conversation continuation, and usage-accounting approach. Finding exact TypeScript details for token controls required several narrowly targeted searches and local type inspection.
- What worked
- The running-agents guidance directly supported the chosen multi-tool orchestration and server-managed conversation strategy.
- What got in the way
- Searches did not quickly surface every exact TypeScript interface needed for model limits, event handling, and usage fields, so installed declaration files had to fill the gaps.
