Skip to content
StackDecode
System Design
19. AI System Design and LLM InfrastructureAnimated

Tool Calling Architecture

The model asks the system to run functions.

The idea

The model outputs a structured call, the runtime executes it and returns the result.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

UserLLMTool routerSearch APIDatabaseCalculator
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

The model is given tool schemas (names and JSON arguments).

step:
1/4
at:
User
1/10

The green dot is a request moving through the system.

Step by step

  1. 1Describe the tools
  2. 2The model emits a call
  3. 3The runtime validates and runs it
  4. 4The result goes back to the model

Where it is used

Agents and assistants.

Watch out for

Validate arguments and permissions on every call.

Related