Skip to content

About

AI trading agent for Pacifica Perpetual Futures with persistent memory, multi-provider AI, and natural language trading all in your CLI.

Resources

Code of conduct

Contributing

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

PacificaPilot

AI trading agent for Pacifica Perpetual Futures with persistent memory, multi-provider AI, and natural language trading.

License Python YouTube

pip install pacificapilot
pacifica init
pacifica start

CLI Screenshot

Quick Start

pip install pacificapilot

# Setup wizard
pacifica init
# -> Pacifica keys -> AI provider -> Trading config -> Supermemory -> Telegram

# Launch TUI
pacifica start

Type /help for commands, or just chat naturally.
/start boots the Loop Agent, /stop stops it.
/config to view/edit settings, /apikey for keys, /remote for Telegram pairing.

Keyboard Shortcuts

Ctrl+P  Command palette     Ctrl+M  Switch AI provider
Ctrl+S  Settings toggles    Ctrl+L  Clear chat
Ctrl+R  Refresh sidebar     Ctrl+D  Toggle dry run
Ctrl+K  API key management  Ctrl+T  Mode switch
Ctrl+Q  Quit

Architecture

Architecture Diagram

Chat Agent (tool loop) <-> Trading Core <-> Pacifica API
     |                        |
Loop Agent (autonomous)    Supermemory
     |
Textual TUI (3-panel)

Features

  • Persistent memory -- Trades, patterns, and preferences stored in Supermemory across sessions
  • Agentic chat -- Multi-turn tool loop: gathers data, reasons, then responds
  • Autonomous loop agent -- 24/7 AI-driven market monitoring and trading
  • Live technical analysis -- RSI, MACD, Bollinger Bands, funding, volume, market regime
  • 13 trading tools -- place/close orders, cancel orders, native TP/SL, market analysis, performance metrics, regime detection
  • Analytics commands -- /performance, /analytics, /portfolio, /backtest, /history for stats without asking the AI
  • Telegram remote -- pair once with /remote, then monitor positions and chat with the agent from your phone
  • Multi-provider AI -- Anthropic, OpenAI, Google Gemini, OpenRouter (BYOK)
  • Textual TUI -- 3-panel layout with slash autocomplete, live sidebar, keyboard shortcuts
  • Non-custodial -- Your keys, your machine. Nothing leaves.

Supported Providers

Provider Models
Anthropic Claude Sonnet 4, Haiku 3.5
OpenAI GPT-4o, GPT-4o-mini
Google Gemini 2.0 Flash, Pro
OpenRouter Any model (e.g. meta-llama, deepseek, mistral)

Supermemory

Every AI decision, market pattern, user preference, and daily summary is stored in Supermemory -- a persistent, searchable memory layer that survives restarts.

decisions    -> "LONG BTC, confidence 75%, RSI 35"
patterns     -> "Funding spike on ETH: 0.003"
preferences  -> "Never trade BONK" -- said once, remembered forever
performance  -> "Daily: 3 trades, +$12.50, 67% win rate"

Two modes:

  • Cloud -- https://app.supermemory.ai (default, cross-platform)
  • Local -- npx supermemory local (offline, zero data leaves your machine)

Windows users: Local mode only works on Linux and macOS.
Install WSL, then inside WSL run npx supermemory local.
Copy the API key from the terminal output and paste it back in the setup wizard.

Tools

place_order · close_position · close_all_positions · cancel_order · cancel_all_orders · set_position_tpsl · get_positions · get_open_orders · get_account_balance · get_market_price · get_trade_history · get_performance_metrics · get_market_regime

set_position_tpsl attaches native exchange-side take-profit / stop-loss, so protection survives restarts.

Telegram Remote

Enable during pacifica init or anytime with /remote. The TUI shows a one-time pairing code:

/remote          # enable + show pairing code

Open your bot on Telegram, send /pair <code>, and that chat is bound to your agent. After pairing you can check positions, review decisions, and trade in natural language from your phone. Only paired chat IDs are allowed.

Security

  • Non-custodial -- Keys stored in ~/.pacificapilot/secrets.env (chmod 600)
  • BYOK -- Your AI keys go directly to your provider
  • Confirmation prompts -- Every trade requires explicit yes/no
  • Testnet first -- Dry run by default, mainnet requires confirmation

Links

Disclaimer: PacificaPilot is experimental software for educational purposes. Trading perpetual futures carries significant risk. AI decisions are not financial advice. Start with testnet and dry run enabled.

About

AI trading agent for Pacifica Perpetual Futures with persistent memory, multi-provider AI, and natural language trading all in your CLI.

Resources

Code of conduct

Contributing

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages