Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

04. LLM Agents

Building intelligent LLM-powered agents with Google ADK.

Blog Post: https://arjunprabhulal.com/adk-llm-agents/

Table of Contents

  1. What is an LLM Agent?
  2. Prerequisites
  3. Setup Steps
  4. Agent Configuration
  5. Running the Agent
  6. Next Steps

What is an LLM Agent?

An LLM Agent uses a Large Language Model as its reasoning engine to:

  • Understand user intent
  • Plan and execute actions
  • Generate contextual responses
  • Maintain conversation state

Prerequisites

Setup Steps

  1. Navigate to this module:
cd 04-llm-agents
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r ../requirements.txt
  1. Set up environment variables in financial_analyst/.env:
GOOGLE_API_KEY=your-api-key-here

Agent Configuration

Key parameters when defining an LLM Agent:

Parameter Description Example
model The LLM model to use gemini-2.5-flash
name Unique agent identifier fin_analyst
instruction System prompt defining behavior Role, expertise, guidelines
description What the agent does Used for routing in multi-agent systems

Running the Agent

Using ADK Web

adk web

Open http://127.0.0.1:8000 and select financial_analyst.

Test Queries:

  • "What is a PE ratio?"
  • "Explain the difference between growth and value stocks"
  • "What are the key metrics in a 10-K filing?"

Using ADK CLI

adk run financial_analyst

Next Steps

Continue to 05. Workflow Agents