Terminal chat that looks up Yahoo Finance quotes, news, fundamentals, and
history. Every turn is an Overmind entry_point with declared intent(),
conversation id, a grounded-quote expectation, and @tool spans — the
trajectory eval path on the platform binds and scores it as stock-research.
From the claw repo root (trajectory SDK already in the venv):
uv pip install yfinance openai
export OPENAI_API_KEY=sk-...
export OVERMIND_API_KEY=ovr_...
# local platform:
export OVERMIND_API_URL=http://localhost:8000
python examples/stock_agent/agent.pyOptional: OVERMIND_AGENT_ID (console UUID), STOCK_AGENT_MODEL (default
gpt-5-mini), STOCK_AGENT_CONVERSATION_ID (reuse a session).
Type /quit to emit end_conversation and flush traces.
| Signal | How |
|---|---|
| Agent identity | overmind.init(agent_name="Stock Agent", providers=["openai"]) |
| Conversation | set_conversation_id — session score groups turns |
| Task key | overmind.behaviour.key = stock-research on the turn span |
| This-turn ask | overmind.intent(user_text) |
| History | eval_context(running_intent, conversation_so_far, …) |
| Gate | expect(constraint, grounded-quotes, gate=True) |
| Tools | @overmind.tool on get_price / get_news / get_fundamentals / get_history / search_ticker |