Keep your interface. Import the same engine that powers Open Sustainability Analyst. Analyze one report for a topic, then feed grounded answers — with evidence and gaps — into the rest of your workflow.
Build your own sustainability tool on the report-analyst library
Build your own sustainability tool on the report-analyst library
The point
Teams often want their procurement or risk screen — not another Streamlit chrome — while still needing answers that cite the report. Open Sustainability Analyst (OSA) already did both jobs in the codebase; we are documenting and demoing the library path explicitly.
Companion OSA guide: Build with the report-analyst library (local preview: /osa/en/build-with-report-analyst-library).
What you import
from report_analyst.core.library import analyze_report, build_topic_brief
answers = await analyze_report("supplier-report.pdf", "tcfd")
brief = build_topic_brief(answers, topic="TCFD overview")
Each answer carries answer, score, evidence, gaps, and sources. Pass a built-in set id or a path to your own *_questions.yaml.
Demo: one report, one topic, then use the data
examples/grounded_topic_brief/ is a small FastAPI host app (not the OSA Streamlit UI) that:
- Accepts one PDF upload in a custom page
- Runs a three-question water-risk set via the library
- Shows evidence-backed answers
- Exposes a structured brief at
GET /brieffor a second screen or API client
Swap the YAML to change the topic without rewriting the host UI.
When to use Streamlit vs library vs API
| Need | Path |
|---|---|
| Analysts run frameworks out of the box | Streamlit app (Render / Streamlit Cloud guides on OSA) |
| Your Python product owns the UI | report_analyst.core.library |
| Separate frontend / microservices | report_analyst_api/ |
Repo
climateandtech/report-analyst — README section Standalone tool and library.