Skip to main content

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 VarDefaultDescription
CLAW_PORT3710Claw service port
CLAW_MAX_STEPS20Max ReAct loop steps per query
CLAW_TIMEOUT120sMax time per agent run
CLAW_TOOLS_ENABLEDsearch,code,dataEnabled tool categories

Ports

PortPurpose
3710Claw agent REST API + SSE streaming

Database Tables

6 tables added to your Postgres database:

  • np_claw_sessions: conversation sessions
  • np_claw_messages: message history
  • np_claw_tool_calls: tool invocation log
  • np_claw_tools: registered tool definitions
  • np_claw_contexts: injected context sources
  • np_claw_feedback: user feedback on responses

Nginx Routes

RouteTarget
/claw/Claw agent API
/claw/streamSSE 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.

PatternExampleBehaviour
Bare number3Delivers full article body (Path A)
Hash prefix#3Delivers full article body (Path A)
Embedded hashWhat 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.