AI Agent
Leveraging LLMs for Financial Analysis
The OCSE AI Agent is the "brain" of the system, responsible for synthesizing vast amounts of market data into actionable insights.
Research Process
When the agent starts a new research cycle, it follows these steps:
1. Web Search
The agent uses the Brave Search API to find the most recent news for the selected stock. It focuses on:
- Recent earnings reports
- Product announcements
- Regulatory news
- Market sentiment
2. Prompt Engineering
The system prompt (constructed from IDENTITY.md and SOUL.md) gives the agent its personality and analytical framework. The user prompt provides the specific market context and current portfolio status.
3. Report Generation
The agent uses Claude 3.5 Sonnet to generate an Equity Research Report. The output is a structured JSON object containing:
- Industry Vertical: Categorization of the asset.
- Rating: A binary
BUYorSELLdecision. - Conviction: A score from 0-100 indicating confidence.
- Investment Thesis: A detailed markdown-formatted analysis.
Configuration
The agent's personality can be tuned by modifying the files in src/agent-config/:
IDENTITY.md: Defines who the agent is (e.g., a "brilliant but cynical equity researcher").SOUL.md: Defines the agent's core values and analytical priorities.
Trade Validation
Reports are not just for humans; the internal logic uses the conviction and rating fields to calculate exact trade amounts in SOL or tokens before sending them to the blockchain.