Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,43 @@ agent = create_deep_agent(

### `model` (Optional)

By default, `deepagents` will use `"claude-sonnet-4-20250514"`. If you want to use a different model,
you can pass a [LangChain model object](https://python.langchain.com/docs/integrations/chat/).
By default, `deepagents` uses `"claude-sonnet-4-20250514"`. You can customize this by passing any [LangChain model object](https://python.langchain.com/docs/integrations/chat/).

#### Example: Using a Custom Model

Here's how to modify the **examples/research/research_agent.py** example:

```python
from deepagents import create_deep_agent
from langchain.chat_models import init_chat_model

# ... existing agent definitions ...

agent = create_deep_agent(
tools=[internet_search],
instructions=research_instructions,
subagents=[critique_sub_agent, research_sub_agent],
model=init_chat_model(
model="ollama:qwen3:14b", # Requires: pip install langchain-ollama
temperature=0.0,
max_tokens=40_000, # 📝 See context limits: https://ollama.com/library/qwen3
)
).with_config({"recursion_limit": 1000})
```
Comment thread
hwchase17 marked this conversation as resolved.
Resolved

#### Local Development with Ollama

Comment thread
hwchase17 marked this conversation as resolved.
Resolved
For cost-effective local testing, you can use models like `ollama:qwen3` from [langchain-ollama](https://github.com/langchain-ai/langchain/blob/master/libs/partners/ollama/README.md). These models are trained with tool-calling capabilities.

**Setup:**

```bash
# Start Ollama with GPU support
docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

# Pull the model
docker exec -it ollama ollama pull qwen3
```
Comment thread
hwchase17 marked this conversation as resolved.
Resolved

## Deep Agent Details

Expand Down