Experimental Internal Achievement — For Evaluation & Testing Only
Community v0.1 — Open Source

Chat is Quant Local-First AI Crypto Research

Drive the entire strategy lifecycle through natural language conversation.
Native WebSocket feeds · ReAct Agent · 8 built-in Skills · MCP extensible · Your data stays local.

0 Setup Required
8 Built-in Skills
Possibilities
pnlclaw-agent
$ |
Scroll to explore

What is PnLClaw

An open-source, local-first platform for crypto quantitative research and prediction market workflows.

Chat is Quant

Built-in AI Agent with ReAct reasoning loop. Describe your strategy in natural language — the Agent generates YAML configs, runs backtests, analyzes results, and suggests optimizations.

Local-First & Privacy

No subscription, no data leaving your system. Your API keys and strategies stay on your hardware. LLM can be local Ollama.

Event-Driven Architecture

Streams live market data from exchange native WebSocket APIs. Backtesting, paper trading, and live execution share the same event loop.

Skill-Driven Agent

8 built-in quantitative Skills. Extensible via MCP. LLM-agnostic — works with any OpenAI-compatible endpoint or local Ollama.

Built Different

01

Chat = Strategy, Zero Code Barrier

Describe your trading idea in natural language. The Agent auto-generates executable YAML strategies and runs backtests. No Python or Pine Script needed.

02

Long-Term Memory, Precise Intent

The Agent retains full memory of the entire conversation. Say "backtest that strategy above" and it locates the prior config — context never gets lost.

03

Full Closed-Loop Workflow

Design → Validate → Backtest → Analyze → Optimize → Deploy, all within a single conversation. The Agent autonomously explores better parameters.

04

8 Built-in Quant Skills

Each Skill is a specialized workflow: strategy drafting, code generation, backtest interpretation, market analysis, PnL attribution, risk reporting, and more.

05

Native Prediction Market Support

Rare native Polymarket CLOB integration — live orderbook, event lifecycle tracking, implied probability analysis. Also supports Binance / OKX.

06

Extreme Privacy

No cloud dependency, no subscription fees. API keys live only on your machine. Secrets are redacted and never enter prompts or logs.

Everything You Need

AI Agent
ReAct reasoning loop · Multi-turn context · Natural language strategy generation · Autonomous backtest analysis · Hallucination detection
Skills System
8 built-in quant Skills · Multi-source registry · Custom Skill support · Automatic tool dependency validation
Strategy Loop
Conversational design → YAML validation → Event-driven backtest → Metric analysis → Parameter optimization → Deploy
Real-time Data
Native L2 orderbook streams · Kline/OHLCV · Ticker · Unified event model across Binance, OKX, Polymarket
Strategy Engine
YAML-based configs · Indicator registry (SMA, EMA, RSI, BBANDS, MACD, ...) · Strict Schema validation
Backtesting
Event-driven engine · Full portfolio accounting · Sharpe, MDD, win rate, Calmar, Sortino, Recovery Factor
Paper Trading
Simulated fills from live L2 data · Position & balance tracking · Real-time unrealized PnL · Multi-account isolation
Security Gateway
Secrets never enter prompts or logs · Per-tool risk policy · Shell & file-write disabled by default
MCP Protocol
Runtime MCP server registration · Dynamic Agent tool extension · Compatible with mainstream MCP ecosystem
Desktop App
Next.js + Tauri native app · Candlestick charts · Live orderbook panel · Agent chat · Strategy & backtest manager

One Conversation, Full Lifecycle

The Agent is not just a chat window — it's your quant research partner.

AI
PnLClaw Agent Online · ReAct Loop Active
Design an EMA crossover strategy for BTC/USDT, 1-hour timeframe
strategy_validate called

Generated strategy config: EMA(20) crosses above EMA(50) to go long, crosses below to close.

Backtest it for the last 90 days
backtest_run complete

Backtest complete. Total return +12.3%, Sharpe 1.45, max drawdown -6.8%.

Suggestion: Win rate at 52% is low — consider adding an RSI filter.

OK, add an RSI > 40 entry filter
backtest_run complete

Updated and re-ran. Sharpe improved to 1.72, win rate up to 58%, max drawdown narrowed to -5.1%. Clear improvement.

Nice, deploy it to paper trading
create_paper_account → deploy_strategy deployed

Created paper account and deployed strategy. Monitoring active.

🧠

Full Context Memory

Complete memory of all messages. "Backtest the strategy above" automatically extracts config from earlier turns.

🔄

Intent Continuity

Carries forward all relevant context. Follow-ups are never treated as isolated requests.

📈

Progressive Optimization

Analyzes backtest metrics and proactively suggests improvements. Iterates parameters autonomously.

🗜️

Smart Compression

Auto-compresses older turns while preserving key information, ensuring it stays within model context limits.

8 Quant Skills, Ready to Work

01 strategy-draft

Guide you through drafting and validating a YAML strategy config via interactive dialogue

02 strategy-coder

Produce a complete executable strategy YAML from a plain-language description

03 backtest-explain

Explain backtest metrics in plain language, highlight risks and optimization directions

04 market-analysis

Analyze current market state using ticker, candles, and orderbook data, with multi-timeframe support

05 pnl-explain

Break down paper trading PnL composition and attribution, pinpoint profit/loss sources

06 risk-report

Summarize risk exposure across open positions, assess overall risk

07 indicator-guide

Explain how indicators work, their parameters, and when to use them

08 exchange-setup

Walk through exchange API credential configuration securely

🔌

MCP Protocol Extension

Register MCP servers at runtime to dynamically extend the Agent's toolset. Connect community or custom MCP tools for additional capabilities.

Modular & Clean

apps/desktop/
Next.js 16 + Tauri 2 Desktop Application
services/local-api/
FastAPI Local Backend (localhost:8080)
core
shared-types
exchange-sdk
market-data
strategy-engine
backtest-engine
paper-engine
risk-engine
agent-runtime
llm-adapter
security-gateway
storage

Execution Flow: Desktop UI → Local API (FastAPI:8080) → Exchange SDK (native WS) / Strategy / Backtest / Paper Engine / Agent Runtime / Risk Engine

Get Started in Minutes

Run from Source

For developers who want full control.

terminal
git clone https://github.com/Hello-Application-XH/Pnlclaw-community.git
cd Pnlclaw-community
pip install uv
uv pip install -e ".[dev]"
env config
cp .env.example .env
# Set exchange credentials and LLM endpoint

Supported Exchanges

Binance Spot WS L2 Orderbook Testnet
OKX Spot WS L2 Orderbook Demo
Polymarket CLOB Prediction Market

Ready to Start?

Download PnLClaw and start building AI-powered crypto strategies today. No setup required.

License: AGPL-3.0 · Python 3.11+ · Next.js + Tauri