openprophet.io | learn | github
By Jake Nesler. Open source. CC BY-NC 4.0.
OpenProphet is a fully autonomous trading harness that runs an AI agent on a heartbeat loop. The agent wakes up on a configurable schedule, assesses market conditions, manages positions, and executes trades — all without human intervention. A web dashboard streams everything in real time.
It runs locally on your machine and supports any large language model — Claude, GPT, Gemini, and 294+ others via OpenCode.
Three components:
Web Dashboard (port 3737, SSE streaming)
|
Agent Server (Node.js/Express, heartbeat loop)
|
+--- OpenCode CLI (AI subprocess, any model)
| |
| +--- MCP Server (Node.js, 45+ tools)
|
+--- Go Trading Backend (Gin, port 4534)
|
+--- Alpaca Markets API (paper / live)
Six market phases with configurable intervals:
Each heartbeat spawns an OpenCode subprocess with the configured model, system prompt, and MCP tools. The agent calls tools to check its account, scan news, analyze setups, and place orders. Results stream to the dashboard.
The agent can modify its own heartbeat via the set_heartbeat tool — speeding up during volatile periods or slowing down when markets are calm.
Trading: place_options_order, place_buy_order, place_sell_order, place_managed_position (automated stop-loss/take-profit), cancel_order, close_managed_position.
Market data: get_quote, get_latest_bar, get_historical_bars, get_options_chain, get_positions, get_options_positions, get_orders, get_account.
News intelligence: get_quick_market_intelligence (AI-cleaned MarketWatch), get_cleaned_news, search_news, aggregate_and_summarize_news. Google News + MarketWatch feeds cleaned by Gemini. Reduces raw news by 80-90%.
Technical analysis: analyze_stocks (RSI, MACD, momentum via Go backend).
AI memory: find_similar_setups, store_trade_setup, get_trade_stats. Semantic search over past trades using local 384-dimensional embeddings (sqlite-vec).
Self-modification: update_agent_prompt, update_strategy_rules, update_permissions, set_heartbeat. The agent can modify its own behavior at runtime.
Every tool call passes through a permission enforcement layer:
Each Alpaca account gets an isolated runtime — its own Go backend process, SQLite database, and agent session. Add paper and live accounts from the dashboard. Switching accounts kills the current backend and restarts with new credentials.
Everything runs on your machine. Dashboard, orchestration, config, databases, trade history — all local. External calls go to your LLM provider and Alpaca only.
Requirements: Go 1.22+, Node.js 18+, OpenCode CLI, free Alpaca paper trading account.
Clone from GitHub or use the Premium Setup Guide ($49.99 one-time) for automated installation, 8 strategy templates, 8 agent personas, and setup support.
OpenProphet is experimental software. AI agents can hallucinate and result in total loss of an account. We never recommend connecting real money. This is not investment advice.
CC BY-NC 4.0 · Jake Nesler · Source on GitHub