Skip to main content
You just built your first AI agent. It runs, answers questions in the terminal, and the ADK Web dashboard shows what it does under the hood. But when you ask a customer question like “Where’s my order?” the agent may reply with something unhelpful:
That response is correct given the agent’s configuration: it has no instruction or tooling to fetch order data. To fix this, open your agent definition (agent.py) and update the agent’s system prompt (instruction) and add any necessary connectors or tools that let it access order information. Below is the simplest LLM agent definition you’ll typically see in ADK. It wires a name, model, description, and a system prompt (instruction):
Key fields explained How ADK builds model input ADK composes model input by stacking three contexts:
  1. The system prompt (instruction) — your explicit rules and role.
  2. The conversation history — prior user and agent turns.
  3. The new user message — the latest question or instruction.
The model receives the full stack and generates the next response based on that combined context.
A diagram titled "The Stack" showing a shopper's message (envelope) feeding into the model's input (new message, conversation history, system prompt) and then into a chip icon labeled the model (gemini-flash-latest). It illustrates the flow of user input and context into an AI model.
That’s the agent anatomy: a model that performs reasoning, a name the runtime uses, an optional description for routing, and an instruction that determines behavior. If your agent should answer order-related questions, the system prompt must instruct it how to handle those queries and what tools (APIs) to use. Example: a focused system prompt for order support
  • Ask for an order ID when missing.
  • Use an orders API or tool when available.
  • Respond concisely and politely with the latest order status.
  • If no order data is available, explain what information is needed and how to provide it.
Here is a simple, concrete instruction that implements the above:
Best practices for system prompts
Keep system prompts focused, explicit, and actionable. Prefer short instructions that state: which tools to use, what to ask from users, and how to format responses. Avoid overly long or speculative rules—clarity yields consistent agent behavior.
Next steps: add tools and test
  1. Add any required tooling (orders API connector, database access, or an internal tool) and register it with the agent runtime so the agent can call it.
  2. Re-run the agent and simulate the “Where’s my order?” flow. Expected behaviors:
    • If the user did not provide an order ID, the agent asks for it.
    • If the agent has access to order data, it calls the orders tool and returns a helpful status.
    • If the agent lacks access, it explains what the user must provide and how.
  3. Iterate on the instruction to refine phrasing, response format, or required checks (e.g., privacy, authentication).
Troubleshooting checklist Further reading
  • ADK agents — agent configuration and registration
  • ADK Web — dashboard and debugging tools
After making the prompt and tooling changes, re-run your agent. It should now either request the missing order ID or call the orders API and return a useful status instead of the generic “I don’t have access” message.

Watch Video