examples/agents/ in the source repository.
Why These Patterns Work
warp-md’s agent-first design makes framework integration straightforward:- Contract-first - Pydantic schemas validate inputs/outputs
- CLI-accessible - Any framework can invoke via subprocess
- Machine-readable - JSON envelopes for reliable parsing
- Streaming support - NDJSON events for real-time progress
Framework Support
| Framework | Pattern | Status | Example Location |
|---|---|---|---|
| LangChain | StructuredTool | ✅ Ready | examples/agents/langchain/ |
| CrewAI | ToolBase | ✅ Ready | examples/agents/crewai/ |
| AutoGen | function_map | ✅ Ready | examples/agents/autogen/ |
| OpenAI Agents | Function calling | ✅ Ready | examples/agents/openai/ |
| MCP | FastMCP server | ✅ Ready | python/warp_md/mcp_server.py |
1. LangChain
Installation
Tool Implementation
LangChain integration usesStructuredTool with Pydantic validation:
Example: Multi-Analysis Agent
LangChain’s tool calling agent automatically parses natural language into structured tool calls with validated parameters.
2. CrewAI
Installation
Tool Implementation
CrewAI usesToolBase for multi-agent collaboration:
CrewAI’s multi-agent architecture enables parallel analysis by specialist agents, each focusing on different aspects of the trajectory.
3. OpenAI Agents SDK
Installation
Tool Implementation
OpenAI Agents use function calling with JSON schemas:4. AutoGen
Installation
Tool Implementation
AutoGen usesfunction_map for conversational agents:
5. MCP (Model Context Protocol)
warp-md includes a native MCP server for Claude Desktop and other MCP clients.Installation
Configuration (Claude Desktop)
Add toclaude_desktop_config.json:
Available MCP Tools
The MCP server exposes these tools:| Tool | Description |
|---|---|
run_analysis | Run MD analyses on a trajectory |
list_analyses | List all available analysis types |
get_analysis_schema | Get parameter schema for an analysis |
validate_config | Validate a config without running |
pack_molecules | Pack molecules with warp-pack |
build_peptide | Build peptides with warp-pep |
mutate_peptide | Mutate peptide residues |
Example Usage (Claude)
The MCP server implementation is in
python/warp_md/mcp_server.py and uses FastMCP for tool registration.Common Utilities
All frameworks can use the shared utilities inexamples/agents/warp_utils.py:
Progress Tracking
Event Streaming
Best Practices
1. Error Handling
Always check thestatus field and handle errors gracefully:
2. Streaming for Long Operations
Enable streaming for long analyses to provide user feedback:3. Validate Before Running
Use validation to catch errors early:4. Batch Multiple Analyses
Run multiple analyses in a single request to share trajectory loading:Example: Complete Workflow
Here’s a complete example combining multiple frameworks:See Also
Overview
Why warp-md is agent-friendly
Schema Reference
Complete Pydantic schema reference