claw
claw — ɳSelf documentation.
Claw Plugin
AI agent runtime with ReAct loop, tool discovery, and SSE streaming. Pro plugin.
Requires: Basic license tier or higher.
nself license set nself_pro_...
Install
nself license set nself_pro_xxxxx...
nself plugin install claw
What It Does
Provides the backend for ɳSelf Claw, an AI assistant that can use tools, browse the web, run code, and interact with your data. Implements a ReAct (Reasoning + Acting) loop where the agent plans steps, executes tools, and observes results iteratively. Streams responses via SSE for real-time display. Connects to any chat interface or the companion claw-web Next.js frontend.
Dependencies
Requires the ai plugin.
Configuration
| Env Var | Default | Description |
|---|---|---|
CLAW_PORT | 3710 | Claw service port |
CLAW_MAX_STEPS | 20 | Max ReAct loop steps per query |
CLAW_TIMEOUT | 120s | Max time per agent run |
CLAW_TOOLS_ENABLED | search,code,data | Enabled tool categories |
Ports
| Port | Purpose |
|---|---|
| 3710 | Claw agent REST API + SSE streaming |
Database Tables
6 tables added to your Postgres database:
np_claw_sessions: conversation sessionsnp_claw_messages: message historynp_claw_tool_calls: tool invocation lognp_claw_tools: registered tool definitionsnp_claw_contexts: injected context sourcesnp_claw_feedback: user feedback on responses
Nginx Routes
| Route | Target |
|---|---|
/claw/ | Claw agent API |
/claw/stream | SSE streaming endpoint |
Newsletter Reply-by-Number (Plan 30)
When the mux plugin sends a numbered newsletter digest to Telegram, users can reply to fetch the full article or ask a question about it. The claw plugin’s Telegram long-poll handler processes these replies.
| Pattern | Example | Behaviour |
|---|---|---|
| Bare number | 3 | Delivers full article body (Path A) |
| Hash prefix | #3 | Delivers full article body (Path A) |
| Embedded hash | What about #3? | Focused AI answer to the question (Path B) |
Requires CLAW_TG_BOT_TOKEN. Articles are stored by the mux plugin in np_mux_newsletter_articles and read here via the Hasura GraphQL API. Rate limit: one fetch per user per 10 seconds. Full documentation: .github/docs/features/newsletter.md in the claw plugin source.