Initial commit: OpenClaw Skill Collection
6 custom skills (assign-task, dispatch-webhook, daily-briefing, task-capture, qmd-brain, tts-voice) with technical documentation. Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
This commit is contained in:
29
openclaw-knowhow-skill/docs/agents/agent-loop.md
Normal file
29
openclaw-knowhow-skill/docs/agents/agent-loop.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Agent Loop Documentation - OpenClaw
|
||||
|
||||
## Overview
|
||||
|
||||
The Agent Loop in OpenClaw represents a complete agent execution cycle, encompassing message intake through final reply persistence. An agentic loop is the full run of an agent: intake, context assembly, model inference, tool execution, streaming replies, and persistence.
|
||||
|
||||
## Key Components
|
||||
|
||||
**Entry Points:**
|
||||
The system accepts agent requests via Gateway RPC (`agent` and `agent.wait` commands) and CLI.
|
||||
|
||||
**Execution Flow:**
|
||||
The process involves parameter validation, session resolution, metadata persistence, and model inference through the pi-agent-core runtime, which handles serialization and event streaming.
|
||||
|
||||
**Queueing System:**
|
||||
Runs are serialized per-session to prevent concurrency issues. Runs are serialized per session key (session lane) and optionally through a global lane.
|
||||
|
||||
## Extension Mechanisms
|
||||
|
||||
OpenClaw provides two hook systems for customization:
|
||||
|
||||
1. **Internal Gateway Hooks** - Event-driven scripts for commands and lifecycle events (bootstrap, commands)
|
||||
2. **Plugin Hooks** - Extension points including `before_agent_start`, `agent_end`, tool call interception, and message lifecycle events
|
||||
|
||||
## Operational Details
|
||||
|
||||
- **Timeout defaults:** 30 seconds for `agent.wait`; 600 seconds for agent runtime
|
||||
- **Streaming:** Assistant deltas and tool events are emitted as separate streams
|
||||
- **Reply handling:** Payloads are assembled from assistant text, tool summaries, and reasoning, with suppression of duplicate messaging tool outputs
|
||||
Reference in New Issue
Block a user