by juanjuandog
AI equity research agent with resilient workflows, Redis Lua single-flight, pgvector RAG, versioned reports, evidence tracing, and RAG evaluation.
# Add to your Claude Code skills
git clone https://github.com/juanjuandog/FinSight-AILast scanned: 5/25/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-25T08:20:48.525Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}FinSight-AI is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by juanjuandog. AI equity research agent with resilient workflows, Redis Lua single-flight, pgvector RAG, versioned reports, evidence tracing, and RAG evaluation. It has 1,115 GitHub stars.
Yes. FinSight-AI passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/juanjuandog/FinSight-AI" and add it to your Claude Code skills directory (see the Installation section above).
FinSight-AI is primarily written in Java. It is open-source under juanjuandog on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh FinSight-AI against similar tools.
No comments yet. Be the first to share your thoughts!
Open-source AI equity research agent with evidence-grounded reports, resilient workflow orchestration, and RAG evaluation.
FinSight turns filings, financial reports, research notes, market data, and company events into source-grounded answers and versioned AI research reports. The project is intentionally backend-heavy: it shows how to build the infrastructure around an AI agent, not just how to call a model.
FinSight includes a runnable institutional research console. The UI is not just a decoration for the backend: it exposes the research workflow, report cache, evidence trace, RAG evaluation, and financial signals that the backend produces.


reportVersion, dataSnapshotHash, cache hit status, model source, generated time, and evidence chunks bound to the report.
Most RAG demos stop at "retrieve chunks and ask an LLM." FinSight focuses on the parts that make an AI research system dependable:
| Area | What FinSight Implements |
|---|---|
| Agent workflow | Data ingestion, metric recalculation, document indexing, intelligence build, and AI report generation as recoverable stages |
| Concurrency control | Idempotency keys, repository-level createIfAbsent, Redis Lua single-flight lease, fencing token, local fallback lock |
| Failure recovery | Task status machine, stage tracking, retry, dead letter state, timeout takeover scheduler |
| Trustworthy AI cache | contextHash, dataSnapshotHash, reportVersion, Redis/PostgreSQL-backed report reuse |
| Retrieval | PostgreSQL JSONB, full-text search, pgvector embeddings, hybrid recall, deduped evidence chunks |
| Evaluation | RAG hit rate, evidence coverage, answer coverage, hallucination risk, conclusion consistency, confidence calibration, latency |
| Demo surface | Spring Boot API, static dashboard, sample data flow, Actuator and Prometheus metrics |
flowchart LR
UI["Dashboard / REST API"] --> Backend["Spring Boot Backend"]
Backend --> Workflow["Agent Workflow Orchestrator"]
Workflow --> MQ["RabbitMQ Async Queue"]
Workflow --> Redis["Redis Lua Lease + Cache"]
Workflow --> PG["PostgreSQL + pgvector"]
Backend --> AI["FastAPI AI Service / Ollama fallback"]
PG --> Retrieval["Hybrid Retrieval + Evidence"]
Retrieval --> Backend
AI --> Report["Versioned AI Report"]
Report --> PG
Backend --> Eval["RAG / Agent Evaluation"]
More detail: Architecture Notes
docker --version
docker compose version
Optional non-Docker tooling:
cd backend && mvn spring-boot:run.ai-service directly.qwen2.5:7b for local LLM-backed analysis.git clone https://github.com/juanjuandog/FinSight-AI ~/work/FinSight-AI
cd ~/work/FinSight-AI
docker compose up -d --build
This starts the backend, dashboard, PostgreSQL/pgvector, RabbitMQ, Redis, the FastAPI AI sidecar, Elasticsearch, and MinIO in detached mode. The containers keep running after the terminal closes.
Check status and open the app:
docker compose ps
curl -fsS http://localhost:8080/actuator/health
curl -fsS http://localhost:8001/health
open http://localhost:8080
Service management:
docker compose logs -f backend
docker compose restart backend ai-service
docker compose stop
docker compose start
docker compose down
Published local URLs:
| Service | URL |
|---|---|
| Dashboard and Spring Boot API | http://localhost:8080 |
| Backend health | http://localhost:8080/actuator/health |
| FastAPI AI sidecar health | http://localhost:8001/health |
| RabbitMQ management UI | http://localhost:15672 |
| Elasticsearch | http://localhost:9200 |
| MinIO API / console | http://localhost:9000 / http://localhost:9001 |
Default local credentials are defined in docker-compose.yml (finsight / finsight for PostgreSQL and RabbitMQ; finsight / finsight123 for MinIO).
In another terminal:
./scripts/quick-demo.sh
Or run the smaller flows separately:
./scripts/demo-flow.sh
./scripts/demo-workflow.sh
Useful endpoints:
GET /api/workflows/summary
POST /api/evaluations/rag/run
GET /api/companies/600519/ai-analysis/latest
GET /api/document-index/600519/search?q=现金流风险
Example demo signals after ./scripts/quick-demo.sh:
| Signal | Example Result |
|---|---|
| Ingestion | documentCount: 6, statementCount: 3 |
| Metric engine | metricCount: 60, riskSignalCount: 2 |
| Evidence index | 6 documents, 6 chunks for 600519 |
| Intelligence graph | 20 events, 36 entities, 47 relations |
| RAG evaluation | totalCases: 3 with scores that vary as public source data changes |
For a lightweight local backend using in-memory repositories:
cd backend
mvn spring-boot:run
open http://localhost:8080
backend: Spring Boot service for APIs, domain workflow, metrics, and RAG orchestration.ai-service: FastAPI service for document parsing, entity extraction, embedding, rerank, and answer generation stubs.docker: local infrastructure placeholders.Backend:
cd backend
mvn spring-boot:run
Dashboard:
open http://localhost:8080
Backend with PostgreSQL profile:
docker compose up -d postgres
cd backend
mvn spring-boot:run -Dspring-boot.run.profiles=postgres,prod
Backend with PostgreSQL + RabbitMQ workflow:
./scripts/run-backend-workflow.sh
Production-like stack with PostgreSQL, pgvector, RabbitMQ, FastAPI AI service, Actuator, and the dashboard:
./scripts/run-full-stack.sh
open http://localhost:8080
AI service:
cd ai-service
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8001
Optional local Ollama analysis:
ollama serve
ollama pull qwen2.5:7b
The FastAPI sidecar calls OLLAMA_BASE_URL (http://localhost:11434 by default) and OLLAMA_MODEL
(qwen2.5:7b by default) from /analyze-stock. If Ollama is not installed, not running, or the model is
missing, the endpoint returns a deterministic rule-based fallback with aiGenerated=false, so the dashboard
keeps working.
The default Docker Compose setup does not require an .env file. Override these variables only when you need different local infrastructure or optional LLM behavior:
| Variable | Default | Purpose |
|---|---|---|
OLLAMA_BASE_URL |
`http://host.docker.internal |