This repo is prepped to use uv for dependency and virtual environment management. The reusable agent logic lives in src/deep_agent/agent.py, and the workbook.ipynb notebook simply imports it for interactive exploration.
- Python 3.11+ (uv can manage toolchains with
uv python install 3.11) uvCLI (install viacurl -LsSf https://astral.sh/uv/install.sh | shorbrew install uv)
- Create a uv-managed virtual environment:
uv venv --python 3.11
- Activate it (uv automatically writes
.venv):source .venv/bin/activate - Install dependencies defined in
pyproject.toml(and dev deps for notebooks):uv sync --dev
- Launch Jupyter Lab directly:
uv run jupyter lab
- Supply API keys via
.env(loaded automatically) or export them in your shell:Ifexport TAVILY_API_KEY=... export GOOGLE_API_KEY=...
GOOGLE_API_KEYis missing at runtime,deep_agent.agentwill prompt once usinggetpass. - Execute the packaged agent from anywhere inside the repo:
Leave off the question to drop into an interactive loop—type new prompts until you enter
uv run deep-agent "What is LangGraph?"quit/exit. Each turn is stateless (no memory), so include prior context in your next question. You can also pass--model <name>to switch LLMs or--no-google-promptto skip interactive key entry. The same helpers remain available for import in scripts/notebooks.
- Add runtime packages with
uv add <package>; useuv add --dev <package>for tooling / notebook extras. - When you need optional notebook tooling without dev extras, install via
uv sync --extra notebooks. - The
pyproject.tomlis the single source of truth; uv will maintainuv.lockautomatically the first time you runuv sync.
.
├── pyproject.toml # uv + PEP 621 metadata
├── src/deep_agent/ # package code + research agent
└── workbook.ipynb # thin UI around the packaged agent
Feel free to extend the package under src/deep_agent and import it inside the notebook once functionality stabilizes.