ADR: Deep Agent Dependency Management¶
Status: Accepted
Date: January 16, 2026
Authors: Development Team
Reference: docs/specs/spec_deep_agent_adoption_v1.md
Context¶
We are adopting the Deep Agent pattern from LangChain/LangGraph to replace our current
GlobalPlannerNode + agent_execution_node pattern. This requires adding the deepagents
package as a dependency.
The deepagents package provides:
- write_todos / read_todos tools for explicit multi-step planning
- task() tool for subagent/skill delegation with context isolation
- Filesystem middleware for large artifact management
- Backend abstractions for workspace storage
Decision¶
Pin deepagents to exact version (currently 0.3.6).
Why Exact Version Pinning?¶
- Stability: LangChain ecosystem evolves rapidly; minor versions can introduce breaking changes
- Reproducibility: Same behavior across dev, staging, and production environments
- Controlled upgrades: Forces explicit review of changelogs before upgrading
Dependency Entry¶
# In pyproject.toml
"deepagents==0.3.6", # Pin exact version - see docs/adr/adr_deep_agent_dependency.md
Upgrade Policy¶
Before Upgrading¶
- Review changelog: Check langchain-ai/deepagents releases for breaking changes
- Test in isolated branch: Create
test/deepagents-upgrade-X.Y.Zbranch - Run full test suite: Including integration and E2E tests
- Run benchmarks: Verify no performance regression
- Update this ADR: Document version change and any migration steps
Upgrade Steps¶
# 1. Create test branch
git checkout -b test/deepagents-upgrade-0.3.7
# 2. Update version in pyproject.toml
# Change: "deepagents==0.3.6" -> "deepagents==0.3.7"
# 3. Update lock file
uv lock
# 4. Rebuild Docker
docker compose build backend
# 5. Run tests
docker compose exec backend pytest -vv
# 6. Run benchmarks
docker compose exec backend pytest tests/performance/ -vv
# 7. If all pass, create PR
# 8. Require Tech Lead approval for merge
Major Version Upgrades¶
For major version changes (e.g., 0.x → 1.x):
- Requires Tech Lead approval before starting
- Create migration plan documenting API changes
- Extended testing period (minimum 1 week in staging)
- Rollback plan documented and tested
Rollback Procedure¶
If issues found after upgrading:
- Revert
pyproject.tomlto previous version - Run
uv lockto regenerate lock file - Rebuild Docker images:
docker compose build backend - Redeploy: Follow standard deployment procedure
- Document issue in this ADR under "Known Issues"
Consequences¶
Positive¶
- (+) Explicit control over dependency version
- (+) Reproducible builds across environments
- (+) Forced review of changes before adoption
Negative¶
- (-) Manual effort to stay updated
- (-) May miss security patches if not monitoring
- (-) Need to track upstream releases
Mitigations¶
- Set up GitHub Dependabot or Renovate to alert on new versions
- Quarterly review of dependency versions (add to tech debt backlog)
- Subscribe to LangChain changelog: https://changelog.langchain.com
Version History¶
| Version | Date | Notes |
|---|---|---|
| 0.3.6 | Jan 16, 2026 | Initial adoption |
Known Issues¶
None currently documented.
References¶
- deepagents PyPI
- langchain-ai/deepagents GitHub
- LangChain Changelog
- Spec: Deep Agent Pattern Adoption
- Plan: Deep Agent Implementation