Skip to content

Repository files navigation

EREVNA

An agentic research assistant with structured planning, web retrieval, grounded report generation, and semantic session memory.

CI Python 3.11+ License: MIT

Live Demo

Deploy to Streamlit Community Cloud in one click:

  1. Fork this repo
  2. Go to share.streamlit.ioNew app
  3. Set Main file path to app.py
  4. Add OPENAI_API_KEY under Secrets
  5. Deploy

Or run locally ( no API key required — Demo Mode works out of the box):

git clone https://github.com/ramshetty01/EREVNA.git
cd EREVNA
pip install -r requirements.txt
cp .env.example .env
streamlit run app.py

AI Backend Options

Mode Cost Setup
Demo (default) Free Leave OPENAI_API_KEY blank — uses templates + live web search
OpenAI Paid Set OPENAI_API_KEY in .env
Ollama Free Install Ollama, run ollama pull llama3.2, set OLLAMA_MODEL=llama3.2 in .env

Architecture

User Query
    ↓
Planner Agent   (LangChain + Pydantic structured output)
    ↓  plan steps & key questions feed downstream agents
Search Agent    (DuckDuckGo API + BeautifulSoup page scraper)
    ↓
Analyst Agent   (GPT-4o-mini, plan-aware analysis)
    ↓
Report Agent    (Structured markdown report)
    ↓
Memory Agent    (SQLite + SentenceTransformer cosine similarity)

Features

  • Plan-driven research — Search and analysis use the planner's key questions, not just the raw query
  • Semantic memory — Similar past sessions are detected via embeddings; choose cached report or fresh research
  • Multi-source search — DuckDuckGo results enriched with page scraping
  • Structured outputs — Pydantic-validated research plans via LangChain
  • Report export — Download results as markdown
  • Run history — Sidebar with past sessions
  • JSONL logging — Per-day agent run logs for debugging

Project Structure

├── app.py                     # Streamlit UI (pipeline orchestration)
├── agents/
│   ├── plan_schema.py         # Pydantic models (testable without API key)
│   ├── planner_agent.py       # LangChain plan generation
│   ├── search_agent.py        # Plan-driven multi-source search
│   ├── analyst_agent.py       # Plan-aware LLM analysis
│   ├── report_agent.py        # Report generation
│   └── memory_agent.py        # Semantic memory (SQLite + embeddings)
├── tools/
│   └── web_search.py          # DuckDuckGo + page scraper
├── utils/
│   └── logger.py              # JSONL agent run logger
├── tests/                     # pytest suite
└── .github/workflows/ci.yml   # GitHub Actions CI

Skills Demonstrated

Skill Where
Python + Type Hints All agents
LangChain Chains + Prompt Templates planner, analyst, report agents
Pydantic v2 Validation planner_agent.py
Pipeline Orchestration app.py
NLP Embeddings (Sentence-BERT) memory_agent.py
SQLite Persistence memory_agent.py
Web Scraping (BeautifulSoup) search_agent.py, web_search.py
Streamlit UI app.py
Testing (pytest) tests/
CI/CD (GitHub Actions) .github/workflows/ci.yml

Testing

pytest tests/ -v

Environment Variables

Variable Required Description
OPENAI_API_KEY Yes OpenAI API key for GPT-4o-mini

Author

ramshetty01GitHub

License

MIT — see LICENSE.

About

Agentic research assistant with structured planning, web retrieval, grounded reports, and semantic memory

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages