# Agentic Deep Research MVP

A local MVP of a deep research system built with the OpenAI Agents SDK.

`2_openai/deep_research` is reference-only. This folder contains an intentionally more agentic redesign with a dedicated orchestrator agent plus specialist worker agents.

## Layout

- `app.py`: CLI entrypoint
- `app_ui.py`: Gradio web UI entrypoint
- `agents/`: orchestrator, clarifier, researcher, evaluator, writer
- `core/`: shared state and runtime guardrails
- `docs/implementation-plan.md`: local implementation plan

## Run

**Web UI (Gradio):**
```bash
PYTHONPATH=2_openai/community_contributions/shabsi4u uv run python 2_openai/community_contributions/shabsi4u/app_ui.py
```
Then open http://127.0.0.1:7860 in your browser.

**CLI:**
```bash
PYTHONPATH=2_openai/community_contributions/shabsi4u uv run python 2_openai/community_contributions/shabsi4u/app.py
```

## UI Flow

1. Enter a research query and click **Clarify**.
2. Answer three scoping questions generated by the clarifier agent.
3. Click **Begin Research** — the progress log streams live events.
4. The final structured report renders below when research is complete.

## MVP Limitations

- The runtime shell still enforces guardrails such as max iterations and max searches.
- The implementation is intentionally small and favors clarity over feature breadth.
