| Session | Agent | Item | Events | Started | Last activity |
|---|---|---|---|---|---|
| {{ s.session_id[:8] }}… | {% if s.agent %}{{ s.agent }}{% else %}—{% endif %} | {% if s.item_id %}#{{ s.item_id }}{% else %}—{% endif %} | {{ s.event_count }} | {{ s.first_seen | time_span }} | {{ s.last_seen | time_span }} |
{{ project }} yetSessions appear here once one of this project's agents runs the Claude SDK and ships a trace to the hub.
Minimal agent — save as agent.py, install the SDK (pip install waffle — base install, no hub deps), then run it:
from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient, ResultMessage
from waffle_sdk import AgentContext, run
async def handle(item: dict, ctx: AgentContext) -> dict:
options = ClaudeAgentOptions(
system_prompt="You are a helpful assistant.",
permission_mode="bypassPermissions",
)
async with ClaudeSDKClient(options=options) as client:
await client.query(item["prompt"])
async for msg in client.receive_response():
if isinstance(msg, ResultMessage):
return {"reply": msg.result or ""}
return {"reply": ""}
if __name__ == "__main__":
run(handle,
agent="hello",
project="{{ project }}",
subscriptions=[{"source": "hello", "filter": {}}])Run it (one-shot, no hub needed):
python agent.py once --input '{"prompt":"hi"}'Or run it as a persistent inbox worker + trigger with a webhook:
python agent.py inbox --hub {{ request.url.scheme }}://{{ request.url.netloc }} &
curl -sX POST {{ request.url.scheme }}://{{ request.url.netloc }}/webhooks/hello \
-H 'content-type: application/json' \
-d '{"prompt":"hi"}'