I have a full-time job and no time to watch the stock market all day. But I still trade — mostly US tech stocks. Last year I made at least three bad decisions because I was too tired or too rushed to think clearly. So I built an AI agent to do the watching for me.
The stack: OpenClaw as the agent framework, Exa for information gathering, and Milvus as a personal memory store. Total cost: about $20/month.
The NVIDIA Moment
On February 26th, NVIDIA reported Q4 earnings — revenue up 65% year-over-year. The stock dropped 5.5%. I didn't find out until the next morning.
But when I checked my phone, there was already a message from my agent, sent the previous evening:
NVDA earnings analysis: Revenue beat expectations, but the market is skeptical about AI capex sustainability. In similar past situations, the stock tended to drop short-term. You had a similar experience in September 2024 — you panic-sold and the stock recovered within three weeks. Recommendation: hold, don't panic-sell.
It didn't just analyze the earnings report. It pulled up my own past trading notes and reminded me not to repeat the same mistake.
Information Gathering with Exa
The first problem: where does the information come from?
Exa is a search API designed for AI agents. It does semantic search — describe what you're looking for in plain language, and it understands what you mean. The index refreshes every minute and filters out SEO spam.
from exa_py import Exa
exa = Exa(api_key="your-api-key")
result = exa.search(
"Why did NVIDIA stock drop despite strong Q4 2026 earnings",
type="neural",
num_results=10,
start_published_date="2026-02-25",
contents={
"text": {"max_characters": 3000},
"highlights": {"num_sentences": 3},
"summary": {"query": "What caused the stock drop?"}
}
)
The contents parameter is the killer feature — it extracts full text, highlights key sentences, and generates a summary, all in one request. No need to click through links one by one.
Personal Memory with Milvus
Information gathering solves "what's happening out there." But making good decisions also requires knowing yourself — what you got right, what you got wrong, what your blind spots are.
Milvus is a vector database. You convert text into vectors and store them. When you search later, it finds results by meaning, not keywords. So "Middle East conflict tanks tech stocks" and "geopolitical tensions trigger semiconductor selloff" match each other.
I set up three collections: past decisions/lessons, personal preferences/biases, and observed market patterns.
from pymilvus import MilvusClient
from openai import OpenAI
milvus = MilvusClient("./my_investment_brain.db")
llm = OpenAI()
def embed(text: str) -> list[float]:
return llm.embeddings.create(
input=text, model="text-embedding-3-small"
).data[0].embedding
milvus.create_collection("decisions", dimension=1536, auto_id=True)
milvus.create_collection("preferences", dimension=1536, auto_id=True)
milvus.create_collection("patterns", dimension=1536, auto_id=True)
A memory extractor runs after every conversation — it pulls out decisions, preferences, patterns, and lessons, then stores them automatically with deduplication (similarity > 0.92 = skip).
When the agent analyzes a current situation, it searches all three collections for relevant past experience:
def recall_my_experience(situation: str) -> dict:
query_vec = embed(situation)
past = milvus.search("decisions", data=[query_vec], limit=3,
output_fields=["text", "date", "tag"])
prefs = milvus.search("preferences", data=[query_vec], limit=2,
output_fields=["text", "type"])
patterns = milvus.search("patterns", data=[query_vec], limit=2,
output_fields=["text"])
return {
"past_decisions": [h["entity"] for h in past[0]],
"preferences": [h["entity"] for h in prefs[0]],
"patterns": [h["entity"] for h in patterns[0]]
}
That's why the NVIDIA alert referenced my trading history from a year ago — the agent found the lesson in my own notes.
Analysis Framework: Writing My Logic as a Skill
OpenClaw's Skills system lets you define situation-specific analysis rules in markdown. I wrote a post-earnings evaluation skill with my personal criteria:
---
name: post-earnings-eval
description: ">"
Evaluate whether to buy, hold, or sell after an earnings report.
---
The most important line in the skill: "I have a tendency to let fear override data. If my Milvus history shows I regretted selling after a dip, say so explicitly." A personal bias-correction mechanism baked into the agent.
Making It Run Automatically
OpenClaw's Heartbeat mechanism handles scheduling. The Gateway sends a pulse every 30 minutes, and the agent acts based on a HEARTBEAT.md file:
- Morning brief (6:30-7:30 AM): Search overnight news via Exa, query Milvus for positions and past experience, generate a personalized summary, push to phone.
- Price alerts (market hours): Monitor watchlist stocks, alert on >3% moves with context from past decisions.
- End of day summary: Recap the day, compare with morning expectations.
No cron jobs, no server. Just a markdown file.
Results
My weekly market-tracking time went from ~15 hours to ~2 hours. The agent runs 24/7, so nothing slips through. And because it uses my own past experiences in every analysis, the recommendations are personalized, not generic.
The NVIDIA situation was the proof point. Without the agent, I probably would have panic-sold again. Instead, I had complete information — including a reminder of my own past mistake — and made the right call.
Total monthly cost: ~$10 Exa API + ~$10 LLM calls. OpenClaw and Milvus run locally for free.
If you want to try it, start with the smallest goal: "get a market summary on my phone every morning." One weekend to set up, then iterate from there.
Disclaimer: This post shares a personal technical project. All market analysis examples are illustrative and do not constitute investment advice.

Top comments (0)