Agent Development Kit

Paper · Source
Foundation ModelsAgents Multi Architecture

LLM Agent

https://google.github.io/adk-docs/agents/llm-agents/

Workflow Agent

https://google.github.io/adk-docs/agents/workflow-agents/

Agents Multi Architecture

Guiding the Agent: Instructions ( instruction )

The instruction parameter is arguably the most critical for shaping an LlmAgent 's behavior. It's a string (or a function returning a string) that tells the agent:

Its core task or goal.

Its personality or persona (e.g., "You are a helpful assistant," "You are a witty pirate").

Constraints on its behavior (e.g., "Only answer questions about X," "Never reveal Y").

How and when to use its tools . You should explain the purpose of each tool and the

circumstances under which it should be called, supplementing any descriptions within the tool itself.

The desired format for its output (e.g., "Respond in JSON," "Provide a bulleted list").

Tips for Effective Instructions:

Be Clear and Specific: Avoid ambiguity. Clearly state the desired actions and outcomes.

Use Markdown: Improve readability for complex instructions using headings, lists, etc.

Provide Examples (Few-Shot): For complex tasks or specific output formats, include examples directly in the instruction.

Guide Tool Use: Don't just list tools; explain when and why the agent should use them.

State:

The instruction is a string template, you can use the {var} syntax to insert dynamic values into the instruction.

{var} is used to insert the value of the state variable named var.

{artifact.var} is used to insert the text content of the artifact named var.

If the state variable or artifact does not exist, the agent will raise an error. If you want to ignore the error, you can append a ? to the variable name as in {var?} .