Skip to content

Core modules overview

Modules under claw_modulescomponents/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 out_message 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, SKILL.md metadata rendering, per-session activation persistence, and injection of the Skills catalog list into the model. Activated Skill documents are injected into conversation history through activate_skill tool results.
claw_ramfsRAM-backed file system that provides high-speed memory file storage through VFS and supports bidirectional sync with FATFS.
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
claw_ramfs RAM file system: high-speed memory storage and FATFS sync