Dependencies
This document explains StuntDouble’s dependencies and why each is required.
Core Dependencies
These are installed automatically with StuntDouble:
[project]
dependencies = [
"langchain-core>=1.2.5",
"pydantic>=2.0.0",
"langgraph>=1.0.0",
]
langchain-core
Version: >=1.2.5
Why it’s needed:
Component |
Usage |
|---|---|
|
Converting mirrored tools to LangChain format |
|
Per-invocation configuration passing |
Type definitions |
Tool protocols and interfaces |
Used by:
stuntdouble/langgraph/wrapper.py—create_mockable_tool_wrapper,mockable_tool_wrapperstuntdouble/mirroring/— LangChain tool conversion
pydantic
Version: >=2.0.0
Why it’s needed:
Component |
Usage |
|---|---|
|
Schema validation for tools |
|
Dynamic schema generation from MCP tools |
Field validation |
Input/output type checking |
JSON schema |
Converting between formats |
Used by:
stuntdouble/langgraph/wrapper.py— Dynamic schema conversionstuntdouble/types.py— Type models (ScenarioMetadata, MockRegistration, etc.)stuntdouble/langgraph/validation.py— Signature validation
langgraph
Version: >=1.0.0
Why it’s needed:
Component |
Usage |
|---|---|
|
Building mockable agent graphs |
|
Native node with |
|
Tool call data extraction |
Message types |
State management compatibility |
Used by:
stuntdouble/langgraph/wrapper.py—mockable_tool_wrapper,create_mockable_tool_wrapper
Development Dependencies
These are only needed for development and testing:
[dependency-groups]
dev = [
"black >=25.9.0",
"isort >=7.0.0,<8.0.0",
"mypy >=1.18.1,<2.0.0",
"pytest-cov>=7.0.0",
]
test = [
"pytest >=8.4.0",
"pytest-cov >=7.0.0,<8.0.0",
"pytest-xdist >=3.8.0,<4.0.0",
"tox >=4.26.0,<5.0.0",
"tox-uv >=1.28.0",
]
Package |
Purpose |
|---|---|
|
Code formatting |
|
Import sorting |
|
Static type checking |
|
Test framework |
|
Coverage reporting |
|
Parallel test execution |
|
Multi-environment testing |
|
uv integration for tox |
Optional Dependencies
These are NOT included but may be needed for specific features:
For LLM-powered mock generation
pip install langchain-openai
# or
pip install foundationsai
When needed: Using ToolMirror.with_llm() for realistic mock data generation.
For MCP mirroring support
pip install "stuntdouble[mcp]"
When needed: Using live MCP discovery and mirroring. The optional mcp extra currently provides the additional client dependency used by the StuntDouble MCP client.
Version Compatibility
Python Versions
StuntDouble supports:
Python 3.11
Python 3.12
Python 3.13
Python 3.14
LangChain Ecosystem
StuntDouble is designed around the LangChain Core / LangGraph 1.x series:
Package |
Compatible Versions |
|---|---|
|
1.x |
|
1.x |
Note: Optional integrations such as langchain-openai are not pinned in StuntDouble’s package metadata. If you use them, align them with your project’s existing LangChain stack.
If you encounter dependency conflicts, ensure your project’s LangChain packages are aligned:
# Check versions
pip show langchain-core langgraph langchain-openai
# Upgrade to compatible versions
pip install --upgrade langchain-core>=1.2.5 langgraph>=1.0.0
Dependency Graph
┌─────────────────────────────────────────────────────────────────────────────┐
│ StuntDouble Dependencies │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ stuntdouble │
│ │ │
│ ┌─────────┬───────────┬─────────┐ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ langchain-core pydantic langgraph (optional) │
│ │ │ │ │ │
│ │ │ │ ▼ │
│ │ │ │ langchain-openai │
│ │ │ │ │ │
│ └───────────┴─────────────────────┴───────────┘ │
│ │ │
│ ▼ │
│ Common transitive deps: │
│ • typing-extensions │
│ • httpx/httpcore │
│ • tenacity │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Minimal Installation
For the absolute minimal installation (core mocking only):
# These are the only truly required imports for basic mocking:
from stuntdouble.matching import InputMatcher
from stuntdouble.resolving import ValueResolver
The core matching and resolution logic has no external dependencies beyond the standard library. However, for practical use with LangChain/LangGraph agents, the full dependency set is recommended.
Troubleshooting
Dependency Conflicts
If you see errors like:
langchain-core 1.x requires ..., but you have ...
Solution:
# Pin versions explicitly
pip install langchain-core==1.2.5 langgraph==1.0.0
pip install stuntdouble
Missing Optional Dependencies
If you see:
ImportError: langchain-openai is not installed
Solution:
pip install langchain-openai