Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
一个 简单的 AI 投资助理,管理股票(美股、港股)和基金(国内基金),同时具备类似 Hermes 自迭代学习的能力
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
AI-powered local investment analysis tool with multi-engine agent architecture for comprehensive stock market analysis, portfolio management, and intelligent investment recommendations.
Multi-Engine AI Architecture
• DeepAgents Engine - LangChain/LangGraph-based agent orchestration
• Claude Engine - Anthropic Claude Agent SDK integration
• Hermes Engine - Lightweight agent framework with full observability (trace, metrics, cost tracking)
• Unified engine interface for seamless switchingREADME 전문 보기 ↗AI-powered local investment analysis tool with multi-engine agent architecture for comprehensive stock market analysis, portfolio management, and intelligent investment recommendations.
English Version | 中文版本
| Chat Interface (Light) | Chat Interface (Dark) |
|---|---|
| Agent Observability | Account Overview |
|---|---|
| Agent Observability | Account Overview |
|---|---|
UIArtifact JSON through create_ui_artifact, not arbitrary JSX or HTMLstock_quote_card, fund_detail_panel, data_chart, and trade_intent_cardui_artifact events into the same assistant messagefallbackText for copy/share/export, rendering failures, and historical compatibility📚 Full documentation: https://ishenli.github.io/investment-agent/
git clone https://github.com/ishenli/investment-agent.git
cd investment-agent
pnpm install
pnpm dev
# Visit http://localhost:8888
npm install -g investment-agent
investment-agent [command] # or: ig [command]
┌─────────────────────────────────────────────┐
│ Unified Engine Interface │
├──────────────┬──────────────┬───────────────┤
│ DeepAgents │ Claude │ Hermes │
│ (LangGraph)│ (Agent SDK) │ (Lightweight)│
├──────────────┴──────────────┴───────────────┤
│ AI Tools Layer │
│ • Asset Query • Note Search │
│ • DB Query • Web Search │
│ • Stock Analysis │
├──────────────────────────────────────────────┤
│ Observability Layer (Hermes) │
│ • Trace/Span • Metrics • Cost Tracking │
│ • Live Panel • Persistent Storage │
├──────────────────────────────────────────────┤
│ Generative UI Layer │
│ • UIArtifact • Whitelist • Fallback Text │
│ • SSE Events • Inline Cards │
├──────────────────────────────────────────────┤
│ Multi-Channel Communication Layer │
│ • WeChat • Feishu • Web Interface │
├──────────────────────────────────────────────┤
│ Business Logic & Data Persistence │
└──────────────────────────────────────────────┘
The WeChat channel enables AI assistant access through personal WeChat accounts:
The Feishu channel connects an enterprise self-built Bot through the official WebSocket SDK. It currently supports text messages only.
im:message.p2p_msg:readonlyim:message.group_at_msg:readonlyim:message:send_as_botim.message.receive_v1.open_id values (ou_...), and group chat_id values (oc_...). Enable the channel after saving.The App Secret is stored in the local single-user SQLite database so the channel can reconnect after restarts. It is never returned by the settings API or written to application logs. Group messages are accepted only from allowlisted chat_id values and must mention the Bot.
The Feishu channel settings can create a PersonalAgent Bot through a browser or QR authorization. The returned App Secret is stored locally, and the authorizing Feishu user's open_id is added to the private-chat allowlist automatically. Manual App ID/App Secret entry remains available when tenant policy blocks automatic registration.
# Development
pnpm dev # Start dev server
# Build & Production
pnpm build # Build for production
pnpm start # Start production server
# Database
pnpm db:generate # Generate migrations
pnpm db:migrate # Run migrations
pnpm db:studio # Open Drizzle Studio
# Code Quality
pnpm lint # ESLint check
pnpm format # Prettier format
pnpm test # Run tests
src/
├── app/ # Next.js pages and routes
│ ├── api/channel/ # Channel configuration and lifecycle APIs
│ ├── api/chat/ # Chat, observability & trade intent APIs
│ └── (pages)/chat/features/Conversation/components/GenerativeUI/
│ # Inline UI artifact renderer and card registry
├── server/
│ ├── core/
│ │ ├── agents/ # AI agent implementations
│ │ │ ├── langchain/ # DeepAgents engine
│ │ │ ├── claude/ # Claude engine
│ │ │ └── hermes/ # Hermes engine
│ │ ├── engine/ # Engine registry and runner
│ │ └── business/ # Core business logic
│ ├── channel/ # Channel handlers
│ ├── service/ # API services
│ │ └── observabilityService.ts
│ └── repository/ # Data access layer
│ └── chat/ # Chat & observability repositories
├── types/ # TypeScript definitions
│ └── chat/ # Chat schemas, including UIArtifact protocol
└── locales/ # i18n translations
packages/
├── agent-channel/ # Multi-platform messaging SDK
│ └── src/ # WeChat and Feishu channel implementations
└── hermes-agent/
└── src/
└── observability/ # Trace, metrics, cost tracking
| Module | Path | Description |
|---|---|---|
| Chat | /chat | AI-powered conversation interface |
| Generative UI | /chat | Inline UI artifacts for quotes, charts, funds, and trade intents |
| Asset | /asset | Portfolio and position management |
| Research | /research | Market research and analysis |
| Notes | /note | Investment knowledge base |
| Reports | /report | Analysis reports history |
| Settings | /setting | Account, AI model, and channel config |
The application runs locally as a desktop app (Electron) or web server. No cloud deployment required - all data stays on your machine.
Contributions are welcome! Please:
git checkout -b feature/amazing-feature)MIT License - see LICENSE for details.
| Project | Contribution |
|---|---|
| TradingAgents | Multi-agent architecture inspiration |
| LobsterAI | Skill system reference |
| LobeUI | UI components |
Made with ❤️ by ishenli
Questions? Open an issue