Skip to content

Multi Agents

Choose a tag to compare

@imvickykumar999 imvickykumar999 released this 11 Sep 08:09
· 25 commits to main since this release
90f6260

Navigate through multiple agents in dropdown, and select different sessions each with seperate memory history.

Do You Need Separate .env Files for Each Agent?

No, you don't strictly need three separate .env files (one in each agent folder like greeting_agent/, time_agent/, and tool_agent/). While the official Google ADK quickstart places a .env in each agent subfolder for convenience (e.g., to isolate configs if agents use different models or API keys), the framework relies on the python-dotenv library to load environment variables from .env files in the current working directory (CWD) or parent directories. Since you run commands like adk web or adk run <agent_name> from the parent directory (the root of your project, where all agent subfolders live), a single .env at the root level is automatically loaded for all agents.

image
(.venv) $ tree -la
.
├── .env
├── greeting_agent
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-310.pyc
│   │   ├── __init__.cpython-312.pyc
│   │   ├── agent.cpython-310.pyc
│   │   └── agent.cpython-312.pyc
│   └── agent.py
├── multi-agents.zip
├── time_agent
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-310.pyc
│   │   ├── __init__.cpython-312.pyc
│   │   ├── agent.cpython-310.pyc
│   │   └── agent.cpython-312.pyc
│   └── agent.py
└── tool_agent
    ├── __init__.py
    ├── __pycache__
    │   ├── __init__.cpython-310.pyc
    │   ├── __init__.cpython-312.pyc
    │   ├── agent.cpython-310.pyc
    │   └── agent.cpython-312.pyc
    └── agent.py

7 directories, 20 files