liveBook · Manning

Specialized agent

As explained in AI Agents and Applications

A specialized agent is an agent configured with a distinct role and tool set for a particular type of task.

A specialized agent is configured with a distinct role and tool set for a particular task. A router evaluates each request, then hands it to the appropriate specialist for a direct response. section 12.2.2 section 12.2.3

A practical specialized-agent design includes:

  • A clearly defined scope, tool list, and examples of requests the agent should handle. section 12.4
  • A router that classifies intent and dispatches the unchanged workflow state to a selected agent node. section 12.2.2
  • A graph where each specialist uses its own tools and normally finishes by returning control to the workflow end. section 12.2.3
  • Operational safeguards such as default routes, clarification for low-confidence classifications, structured interagent data, and handoff tracking. section 12.4

Travel assistant

A router sends questions about destinations or attractions to a travel information agent and hotel availability or prices to an accommodation booking agent. Each specialist handles the request with its own tools and ends the session. section 12.2.4

Listing 12.4 Router-based multi-agent travel assistant graph
graph = StateGraph(AgentState)  #1
graph.add_node("router_agent", router_agent_node)  #2
graph.add_node("travel_info_agent", 
    travel_info_agent)  #3
graph.add_node("accommodation_booking_agent", 
    accommodation_booking_agent)  #4

graph.add_edge("travel_info_agent", END)  #5
graph.add_edge("accommodation_booking_agent", END)  #6

graph.set_entry_point("router_agent")  #7
travel_assistant = graph.compile()  #8

Shows the minimal LangGraph structure: register the router and specialist nodes, connect specialists to the end, set the router as entry point, and compile the workflow. section 12.2.3

How AI Agents and Applications covers it

How deep it goes
Builds a runnable router-based graph and discusses prompts, handoffs, edge cases, structured state, testing, and tracing.
Examples
Demonstrates travel-information and accommodation-booking agents handling attractions and room-availability questions.
What you can do after
Build it from scratch with LangGraph by defining specialist nodes, routing classification, dynamic handoffs, and terminal edges.
How it connects
Connects specialized agents with router agents, LangGraph, tool calling, supervisor agents, structured data, and LangSmith traces.

Also explained in

Compare how 3 books explain specialized agent →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.