a2aproject / a2aproject/a2a-samples

Travel Planner Agent: cannot import name 'AgentAuthentication' from 'a2a.types'

Open
#111 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.8k
Forks
751
PR merge metrics
No merged PRs in 30d

Description

### What happened?

Following the instructions for [travel_planner_agent](https://github.com/google-a2a/a2a-samples/blob/main/samples/python/agents/travel_planner_agent/README.md), step 3 (`uv run .`) fails with the following error:
> ImportError: cannot import name 'AgentAuthentication' from 'a2a.types'

### Relevant log output

```shell
Using CPython 3.13.3
Creating virtual environment at: .venv
Built travel-planner @ file:///path/to/a2a-samples/samples/python/agents/travel_planner_agent
Installed 65 packages in 261ms
/path/to/a2a-samples/samples/python/agents/travel_planner_agent/.venv/lib/python3.13/site-packages/google/protobuf/runtime_version.py:98: UserWarning: Protobuf gencode version 5.29.3 is exactly one major version older than the runtime version 6.31.1 at a2a.proto. Please update the gencode to avoid compatibility violations in the next runtime release.
warnings.warn(
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/path/to/a2a-samples/samples/python/agents/travel_planner_agent/__main__.py", line 6, in
from a2a.types import (
...<4 lines>...
)
ImportError: cannot import name 'AgentAuthentication' from 'a2a.types' (/path/to/a2a-samples/samples/python/agents/travel_planner_agent/.venv/lib/python3.13/site-packages/a2a/types.py)
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

The error occurs in __main__.py at line 6 where it tries to import 'AgentAuthentication' from 'a2a.types'. Check the a2a.types module in the installed package to see what exports are available. Compare with the travel_planner_agent's dependencies and the a2a library version. The fix likely involves updating the import statement or the library version.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai-infra-agents
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.