The Agent2Agent (A2A) protocol is described as:
The Agent2Agent (A2A) Protocol is an open standard developed by Google and donated to the Linux Foundation designed to enable seamless communication and collaboration between AI agents.
Dapr actors are described in the documentation as:
The actor pattern describes actors as the lowest-level “unit of computation”. [...] Dapr includes a runtime that specifically implements the Virtual Actor pattern.
py-a2a-dapr is a template repository for developing Dapr managed Agent2Agent (A2A) systems in Python.
The components and their interactions in py-a2a-dapr is shown in the figure below. The template exposed in this project helps construct A2A endpoints that invoke Dapr actors. The endpoints and the Dapr actors, both run as Dapr applications with their respective Dapr sidecars. The JSON-RPC clients (e.g., a web or a CLI application, or just curl) interact with the A2A endpoints and are oblivous to the underlying actors.
- Install
uvpackage manager. - Install project dependencies by running
uv sync --all-groups. - Configure Dapr to run with docker.
- Run
dapr initto initialisedaprdand the relevant containers.
- Start the Dapr actor service and the A2A endpoints by running
./start_dapr_multi.sh. (This will send the dapr sidecar processes in the background.) - Invoke the A2A agent using JSON-RPC by calling
uv run a2a-client --helpto learn about the various skills-based A2A endpoint invocations. - Or, start the Gradio web app by running
uv run web-appand then browse to http://localhost:7860. - Once done, stop the dapr sidecars by running
./stop_dapr_multi.sh.
Run ./run_tests.sh to execute multiple tests and obtain coverage information. The script can accept additional arguments (e.g., -k to filter specific tests), which will be passed to pytest.