NavaClaw
Developer Preview
NavaClaw is a DeFi-focused agent harness based on NanoClaw. It enables autonomous AI agents to trade on-chain, remember what they learn, and run on a schedule, including signing transactions, executing swaps, and managing positions.
NavaClaw is a TypeScript monorepo that ships as a single server: plug in a model provider, point it at a chain, give it skills, and let it run.
Set up NavaClaw for a local Developer Preview. Ask me which model provider and chain to use, keep secrets in environment variables, start with dry-run execution, and verify /health and /ready before enabling a scheduled skill.Overview
What You Get
- Multi-chain execution. Protocol-specific execution skills (e.g.,
verified-swapfor Uniswap) handle calldata generation, Nava verification, and broadcast internally. Add a new protocol by creating a skill, no code changes required. - Nava verification. NavaClaw can ask Nava Guardian for a policy verdict before execution. The preview version of Nava Guardian is verdict-only and advisory; NavaClaw remains responsible for enforcing the verdict before it signs or broadcasts an action. See Execution safety.
- Skills on demand. Drop a
SKILL.mdfile into./skills/and the agent learns a new capability on the fly. Skills are listed in a compact catalog; the agent reads them viacatwhen needed, not injected into the prompt. Hot-reloaded, no restart needed. - Cron and heartbeat. Schedule recurring jobs with cron expressions. Skills can declare their own schedules in frontmatter.
- Memory. Typed
memorytool with search, recall, and observe actions. Backed by Postgres + pgvector for persistent semantic search, or zero-config in-memory mode for development. Memory is accessed on demand, not injected into every prompt. - Channels. Talk to your agent via Telegram or Slack. Channel plugins are composable and easy to extend.
- Any model. Claude, GPT, Gemini, Ollama, OpenRouter. Swap providers without changing your agent config.
Architecture
- server— HTTP server, boot sequence, graceful shutdown
- shared— logging and common utilities
- config— configuration and execution context
- models— model-provider discovery
- memory— persistent and in-memory recall
- skills— skill loading and hot reload
- channels— Telegram, Slack, and message routing
- pipeline— command queue and agent runner
- heartbeat— scheduled jobs
- tools— payload store, MCP client, and tool assembly
- trading— signing, Nava verification, and execution
- skills— on-demand SKILL.md definitions
Data flow: Inbound message (channel) enters the pipeline (model call, tools) and produces an outbound reply (channel). The heartbeat triggers jobs on cron schedules. On-chain execution is handled by protocol-specific skills that bundle calldata generation, Nava verification, and broadcast into self-contained scripts. Skills are read on demand via bash. Memory is queried via the memory tool.
Setup
Prerequisites
- Node.js 22+ (
nvm install 22) - pnpm (
npm install -g pnpm) - Foundry (optional, for on-chain reads via
cast-read) - Docker (optional, for Postgres persistence; omit
DATABASE_URLfor in-memory mode)
Quick Start
The fastest path is the interactive setup wizard, which handles deps, builds, provider config, channels, skills, and generates config.json + .env for you.
:::warning Direct execution is an explicit opt-in
Keep EXECUTION_MODE=dry-run while you configure providers, channels, policies,
and scheduled skills. The preview version of Nava Guardian is verdict-only and
advisory, so NavaClaw is responsible for keeping an action paused unless the
exact proposed action receives an approved verdict. Enable direct only after
you have reviewed the execution safety boundary,
tested the complete flow, and deliberately accepted the signing and broadcast risk.
:::
Claude Code
git clone --recursive git@github.com:navalabs-dev/nava-claw.git && cd nava-clawOpen a Claude Code session and run:
/setup
Cursor
Open the project in Cursor and ask:
Set up nava-claw
Cursor picks up the setup rule automatically.
Manual
git clone --recursive git@github.com:navalabs-dev/nava-claw.git && cd nava-claw
pnpm install && pnpm build
cp .env.example .env # Fill in your API keys and secrets
# Create config.json (see Configuration)
EXECUTION_MODE=dry-run pnpm --filter @nava-claw/server startThe server starts on http://localhost:4747. Health check at /health.
curl --fail http://localhost:4747/health
curl --fail http://localhost:4747/readyDocker (with Postgres Persistence)
cp .env.example .env # Fill in your API keys
# Set EXECUTION_MODE=dry-run in .env
# Create config.json (see Configuration)
docker compose upThis starts Postgres (pgvector) + the app. Memory, cron jobs, and sessions persist across restarts. To run without persistence, just omit DATABASE_URL from .env and run the server directly.
Development
pnpm build # Build all packages (TypeScript project references)
pnpm check # Type-check without emitting
pnpm test # Run all tests (Vitest)
pnpm clean # Clean build artifactsAPI Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check ({ status: "ok", uptime }) |
| GET | /ready | Readiness probe (503 if not ready) |
Configuration
NavaClaw uses two config sources: secrets in .env and everything else in config.json.
Environment Variables
See .env.example for the full list. Key ones:
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | At least one provider key | Anthropic API key |
OPENAI_API_KEY | At least one provider key | OpenAI API key |
TELEGRAM_BOT_TOKEN | If using Telegram | Bot token from @BotFather |
SLACK_BOT_TOKEN | If using Slack | Bot token from Slack app |
PRIVATE_KEY | Only for direct execution | Hex-encoded private key for signing; do not add one during dry-run setup |
WALLET_ADDRESS | If trading | Corresponding wallet address |
RPC_URL | If trading | Chain RPC endpoint |
UNISWAP_API_KEY | If using Uniswap | From https://hub.uniswap.org |
NAVA_API_KEY | If trading | Nava Guardian API key |
DATABASE_URL | For persistence | Postgres connection string (omit for in-memory) |
EXECUTION_MODE | Yes for this guide | Start with dry-run; changing to direct is a deliberate signing and broadcast opt-in |
PORT | No (default: 4747) | HTTP server port |
LOG_LEVEL | No (default: info) | debug, info, warn, error |
config.json
{
"port": 4747,
"agents": [
{
"id": "default",
"name": "Nava",
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"identity": "You are Nava, an autonomous trading agent..."
}
],
"providers": {
"anthropic": {
"baseUrl": "https://api.anthropic.com",
"apiKey": { "env": "ANTHROPIC_API_KEY" },
"api": "anthropic-messages",
"models": [
{ "id": "claude-sonnet-4-6", "name": "Sonnet 4.6", "contextWindow": 1000000, "supportsToolUse": true }
]
}
},
"channels": {
"telegram": {
"enabled": true,
"accounts": {
"default": { "botToken": { "env": "TELEGRAM_BOT_TOKEN" } }
}
}
},
"chain": { "id": 42161, "name": "Arbitrum One" },
"tools": {
"bash": {
"enabled": true,
"allow": {
"commands": ["curl", "cast-read", "cat", "jq", "grep", "head", "echo"],
"paths": ["./skills"]
}
},
"typed": true
}
}Secrets use the { "env": "VAR_NAME" } pattern. Never hardcode keys in config.
Supported Chains
| Chain | ID | Notes |
|---|---|---|
| Ethereum Mainnet | 1 | Highest liquidity, higher gas |
| Base | 8453 | Coinbase L2, low fees, growing DeFi |
| Arbitrum One | 42161 | Fast, low cost, most common for Uniswap |
| Polygon | 137 | Uniswap + Polymarket |
| Hyperliquid | 999 | Perpetuals and spot trading |
| Sepolia | 11155111 | Testnet, no real funds |
Writing Skills
Skills are markdown files that teach the agent new behaviors. Drop a SKILL.md into ./skills/<name>/ and it’s live on the next heartbeat cycle.
Directory Structure
skills/
core/ Auto-enabled (cast-read, testnet, mcporter)
reference/ Supplementary docs (Uniswap Trading API, Uniswap driver)
Skill Format
---
name: my-strategy
description: My custom trading strategy
tags: trading
schedule: "0 */2 * * *" # Optional: runs every 2 hours
---
# My Strategy
Describe what the agent should do...How Skills Work
- Skills are listed in a compact catalog; the agent reads them via
catwhen needed, not injected into the prompt. - Hot-reloaded, no restart needed.
- Skills can declare their own schedules in frontmatter using cron expressions.
- The heartbeat runner triggers scheduled skills on their cron schedule.
- Protocol-specific execution skills (e.g.,
verified-swapfor Uniswap) bundle calldata generation, Nava verification, and broadcast into self-contained scripts.
Channels
Talk to your NavaClaw agent via Telegram or Slack. Channel plugins are composable and easy to extend.
Telegram
- Create a bot via @BotFather and get the bot token.
- Set
TELEGRAM_BOT_TOKENin.env. - Enable in
config.json:
{
"channels": {
"telegram": {
"enabled": true,
"accounts": {
"default": { "botToken": { "env": "TELEGRAM_BOT_TOKEN" } }
}
}
}
}Slack
- Create a Slack app and get the bot token.
- Set
SLACK_BOT_TOKENin.env. - Enable in
config.json:
{
"channels": {
"slack": {
"enabled": true,
"accounts": {
"default": { "botToken": { "env": "SLACK_BOT_TOKEN" } }
}
}
}
}