Specialist Agents
Focused prompts.
The whole point of a team is focus. Each specialist gets a short prompt, only the tools it needs, and if useful, a different model. Let's look at our two specialists, side by side.

- Focus is the point
- Short prompts, few tools
- Maybe a different model
specialists.py
The order status tool belongs only to the orders specialist. Each specialist is made with create agent. The books specialist gets the three shop tools, and a one line prompt. The orders specialist gets only order status. Each has a name, which becomes its node name.
from langchain.agents import create_agent
from langchain.tools import tool
from shop_tools import check_stock, get_price, get_author
@tool
def order_status(order_id: str) -> str:
"""Status of an order. Order ids look like RB-1234."""
return {"RB-1234": "shipped, arriving Thursday", "RB-5678": "being packed"}.get(order_id, "not found")
MODEL = "google_genai:gemini-flash-lite-latest"
books = create_agent(MODEL, tools=[check_stock, get_price, get_author], name="books",
system_prompt="You are the books specialist at Riverside Books. Be brief.")
orders = create_agent(MODEL, tools=[order_status], name="orders",
system_prompt="You are the orders specialist at Riverside Books. Be brief.")Designing specialists
Give each specialist one area of responsibility. Keep its tools to that area. Write a short prompt, that says what it does, and what it doesn't. And test each specialist alone, before putting it in the team.
| key | value |
|---|---|
| One area | per specialist |
| Tools | only for that area |
| Prompt | what it does and doesn't |
| Test | alone first |
Summary
Specialists are focused agents, each with a short prompt and only the tools it needs. Next, practise building a complete shop team.
Key takeaways- One area each
- Few tools
- Test alone