FinRobot equity-research agent with Langfuse tracing and LangChain tooling
From README links · today
Multi-agent financial research pipeline with traced, verifiable outputs.
What they did
They took the FinRobot agentic framework and stood up an end-to-end equity research workflow rather than a single-prompt chatbot. Following FinRobot's principle that models reason while software computes, they split the job across specialized agents: one to gather filings and market data, one to run deterministic quantitative calculations, and one to draft the analyst narrative. LangChain supplied the tool-calling layer so the agents could invoke data fetchers and calculators as discrete, typed tools instead of hallucinating numbers. Langfuse was added as the observability backbone, capturing each agent step, tool invocation, prompt, and token cost so the team could inspect why a given figure or claim appeared in the final report. They iterated on prompts and tool schemas by reading traces, then re-ran the pipeline against a small set of tickers to compare outputs before and after changes.
How it went
The result was a working research pipeline that produces a structured report with sourced figures and a full trace of how each number was derived. Trace-driven iteration made prompt and tool changes measurable rather than guesswork, and the deterministic calculation step kept arithmetic out of the model's hands. Polish level is prototype-to-internal-tool: it runs reliably on a curated ticker list but has not been hardened for production traffic or broad coverage.
Worth knowing
FinRobot and its data connectors need API keys and a Python 3.10/3.11 environment; the README excerpt does not cover every provider's setup. Langfuse requires a hosted or self-hosted instance plus keys. Output quality still depends on the underlying model and data freshness, and nothing here constitutes investment advice or a validated backtest. Cost and latency grow with agent count, so tracing is essential before scaling.
Wiring
Order: (1) Python 3.10/3.11 env with finrobot, langchain, langfuse installed; (2) environment variables for the LLM provider, financial data APIs, and Langfuse public/secret keys plus host; (3) initialize the Langfuse client at process start so a trace id is created per run; (4) define LangChain tools as thin wrappers over data fetchers and pure calculation functions, each decorated to emit a Langfuse span with inputs and outputs; (5) configure FinRobot agents with those tools and a shared trace context, chaining data agent to calculation agent to writing agent; (6) a CLI orchestrator passes the ticker through the chain and persists the markdown report alongside the trace id for later inspection in the Langfuse UI.
Try it yourself
Set up a FinRobot-based equity research agent in this repo. Create a Python 3.11 virtualenv, install finrobot, langchain, and langfuse, and add a config module that reads model and data-provider keys from environment variables. Build three agents: a data-gathering agent with LangChain tools for filings and price history, a deterministic calculation agent that only calls Python functions for ratios and returns, and a writing agent that drafts a short research note citing each figure's source. Wrap every agent and tool call in Langfuse spans, tagging each run with a trace id and ticker. Add a CLI entry point that takes a ticker and writes a markdown report plus a JSON trace summary. Include a smoke test on one ticker and document required env vars in the README.
Tools in this stack
Run this stack
Install the stack into this project. It writes AGENTS.md and the manifest, merges the MCP servers into .mcp.json, and — with --yes — runs the tool installs.
npx runchr install runchr/stack-autogen-and-autogpt-and-camel-and-dify-cc7887f9curl -s https://api.runchr.com/api/recipes/runchr/stack-autogen-and-autogpt-and-camel-and-dify-cc7887f9/manifestSystem prompt
You are an equity-research agent that runs a FinRobot pipeline over a given ticker: a data agent gathers filings and price history, a calculation agent computes ratios and returns only through Python functions, and a writing agent drafts a short research note citing each figure's source. Keep arithmetic out of the model's hands, cite sources for every number, and treat all output as research, not investment advice.
This system prompt was generated from this stack's copy and tools. A person has not reviewed it.
The manifest is also at api.runchr.com/api/recipes/runchr/stack-autogen-and-autogpt-and-camel-and-dify-cc7887f9/manifest.