Skip to content

ReAct Orchestration

Kernel Service uses the ReAct (Reason + Act) pattern for task execution. The agent alternates between reasoning about what to do and taking actions via tools.

The Loop

1. Build context (agent + objective + tools)
2. Call LLM with available tools
3. If LLM returns tool calls:
→ Execute tools
→ Add results to context
→ Go to step 2
4. If LLM returns final answer:
→ Record output
→ Complete task

Safety Guardrails

  • Max iterations: Hard limit (default 10) prevents infinite loops
  • Tool permissions: Agents can only use tools they’re explicitly allowed
  • Execution modes: Outbound actions (email, messages) are draft-only by default
  • Budget enforcement: Token/cost limits per tenant (coming soon)

Multi-Provider Fallback

If the primary LLM fails, the orchestrator automatically falls back:

TierPrimaryFallback 1Fallback 2
CheapGemini FlashClaude HaikuGPT-4o-mini
ExpensiveClaude SonnetGemini ProGPT-4o