Skip to content

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.

ModuleRole
claw_coreRequest 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_capCapability registry: descriptors and lifecycle per group, LLM-visible grouping, unified execution entry, and tools JSON for claw_core.
claw_event_routerUnified 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_memoryRead/write session history and long-term memory files; acts as a context provider for claw_core.
claw_skillSkills tree, skills_list.json rendering, per-session activation persistence, and injection of “catalog + activated Skill docs” into the model context.