This project demonstrates an evaluation pipeline built with the OpenAI Agents SDK. Multiple agents extract information from a PDF, perform brief web searches and generate a decision report.
Install the dependencies listed in requirements.txt:
pip install -r requirements.txtThe script requires the following variables:
OPENAI_API_KEY– OpenAI API keySERPAPI_API_KEY– SerpAPI key used for Google searchAGENT_MODEL– optional model name, defaults togpt-4oAGENT_DATA_DIR– optional directory for persistent data (defaults to./data)
Run the evaluation with:
python investment_agents.py ./KPIs.pdf testThe PDF path is the first argument and test is the project name used to store
the results. Generated Markdown reports are written to data/reports/<project>.md.
The final report is created directly in Markdown without any HTML templating.
The embedding memory is handled through vector_store.VectorStore, which currently wraps a FAISS index. This abstraction allows alternative backends to be plugged in easily.
An alternative implementation using Microsoft AutoGen is available in autogen_agents.py. Install the separate dependencies from requirements-autogen.txt and run:
pip install -r requirements-autogen.txt
python autogen_agents.py <PDF-path> <project>See AUTOGEN_GUIDE.md for details and memory optimisation notes.
investment_agents.py now attempts a quick text extraction using PyPDF2.
If the PDF already contains selectable text, no Vision API calls are issued,
which drastically speeds up the pipeline. Only image‑based pages are sent to
GPT‑Vision as a fallback.