query-loop-implementation

Installation
SKILL.md

Query Loop Implementation

Core Idea

Build the loop as product infrastructure, not prompt glue:

ConversationManager -> QueryLoop -> ToolRuntime
  • ConversationManager owns durable state: session id, messages, user settings, budget, persistence.
  • QueryLoop owns one task turn: call model, detect tool calls, execute tools, append tool results, repeat.
  • ToolRuntime owns registered tools: schemas, permission checks, execution, error formatting.

Use ReAct as the mental model:

Thought -> Action -> Observation -> Thought -> Answer
Installs
7
GitHub Stars
87
First Seen
Jun 5, 2026
query-loop-implementation — simbajigege/book2skills