Core modules overview
Modules under components/claw_modules/ are ESP-Claw’s runtime framework: Agent loop, capability registration and invocation, event routing and automation, context persistence, and related core logic.
Each cap_* capability registers and runs through the framework’s unified interfaces without tight coupling to one another. Aside from claw_core and claw_event_router, other modules may be omitted from the build.
Module roles at a glance
Section titled “Module roles at a glance”| Module | Role |
|---|---|
| claw_core | Request queue and background tasks; assembles system / messages / tools context; drives multi-turn LLM and tool calls; writes session history via callbacks and invokes claw_cap. |
| claw_cap | Capability registry: descriptors and lifecycle per group, LLM-visible grouping, unified execution entry, and tools JSON for claw_core. |
| claw_event_router | Unified event ingress: rule matching, action chains such as call_cap / run_agent / run_script / send_message; run_agent asynchronously submits to claw_core and the response is published via agent_response event. Event types are in claw_event.h and publishing APIs are in claw_event_publisher.h. |
| claw_memory | Read/write session history and long-term memory files; acts as a context provider for claw_core. |
| claw_skill | Skills tree, skills_list.json rendering, per-session activation persistence, and injection of “catalog + activated Skill docs” into the model context. |
Per-module docs
Section titled “Per-module docs” claw_core Agent request queue, context assembly, LLM loop, and tool-call boundaries
claw_cap Capability registry, group lifecycle, and LLM tool visibility
claw_event_router Event ingress, automation rules, outbound channel bindings
claw_memory Session history and long-term memory file I/O
claw_skill Skills directory and per-session activation state