Skip to main content
In this lesson we evolve the helpdesk agent to behave like a real IT workflow: it clarifies the issue, requests the right details, calls targeted tools, and converts results into concise, actionable next steps. We accomplish this by tightening the agent instructions and relying on ADK’s multi-turn session handling so the agent remembers prior turns and avoids repeating already-answered questions.
ADK supplies the full conversation history on each turn. Use that to avoid repeating questions already answered earlier in the session.

Summary of changes

  • The original root agent was replaced with a workflow-aware version that:
    • Runs inside a multi-turn session and receives full conversation history each turn.
    • Follows a repeatable troubleshooting flow for every new issue.
    • Calls tools only when they add value (improves determinism).
    • Returns concise numbered or bulleted next steps based on tool results.
    • Enforces style and safety constraints (calm, practical, and honest).
These updates reduce guesswork about tool usage and make the agent’s behavior more predictable and useful.

At-a-glance: Troubleshooting flow

Tools (provided to this agent)

Root agent: structured prompt and tooling

Below is a consolidated example of the root agent definition and its instruction string. The two tools available to this agent are lookup_user and check_service_status.

How the flow behaves: examples

Below are two compact interaction examples illustrating how the agent uses session history and tools to be efficient and deterministic.
  1. VPN service degradation example
User reports a VPN that disconnects. The agent checks service status and returns short, actionable steps.
When the user reports the issue persists on a different network, the agent refers to prior messages (because it receives full session history) rather than re-asking the same questions:
  1. Locked email account example
When the user reports a locked account and supplies an email address, the agent calls lookup_user to confirm account status before advising next steps.

Why this pattern helps

  • Deterministic tool use: The prompt explicitly states when to call lookup_user and check_service_status, reducing incorrect or needless tool calls.
  • Session-aware interactions: ADK’s multi-turn state allows the agent to reference previous turns and avoid repeating questions.
  • Repeatable flow: A concise, explicit troubleshooting flow yields clearer guidance and is easier to extend (for example, by adding a ticket creation tool and a machine-readable ticket schema).
Do NOT claim to access real systems. Always treat tools as limited views of fake or provided data, and surface uncertainties or tool errors clearly to the user.

Next steps

This lesson introduced a stateful, workflow-driven helpdesk agent. Upcoming lessons will add more structure (for example, a ticket schema and a create-ticket tool) so the agent can produce machine-readable outputs that other systems can consume. Try the included lab to experiment with the troubleshooting flow and observe how session state influences the agent’s questions and tool usage.

References

Watch Video

Practice Lab