API & agents
M08 · 9 min

Your own agent loop

Build products that call Grok: tools, structured outputs, and human gates.

Grok 4.5 is trained for tool use and agentic coding. On the API you can build custom loops: model proposes tool calls → your runtime executes → results return → model continues. Keep tools small, idempotent when possible, and least-privileged.

  • Separate plan tokens from act tokens when stakes are high.
  • Validate structured outputs (JSON schema) before side effects.
  • Log every tool call for debugging and evals.
  • Human approve for send/delete/pay-class actions.
Next