Skip to content

Core, Capability, and Event

Core, Capability, and Event relationship

ESP-Claw is event-driven: an Event is the trigger for Agent traffic and automation. Core and capabilities consume Events and emit Actions.

claw_event_router schedules each Event: to Core for LLM work, to a capability for an action, or end processing.

Core is the Agent runtime. It runs the LLM loop: fold Events and context into a prompt, call the model, and emit follow-on Events back through claw_event_router. The LLM’s output is also passed to claw_event_router for further processing.

Capabilities implement concrete features. In ESP-Claw they can both emit Events and handle Actions, for example:

  • Emit Events:
    • cap_im_* gateways wrap inbound IM as Events for claw_event_router.
    • Peripherals can emit Events on interrupts.
  • Handle Actions:
    • claw_event_router hands outbound IM sends to cap_im_*.
    • Core invokes tool calls on capabilities.