Skip to content

Commit dd28d9d

Browse files
authored
Use new template repo (#7)
1 parent 9b9ca93 commit dd28d9d

37 files changed

Lines changed: 3401 additions & 4272 deletions

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
matrix:
1717
include:
1818
# Update this to build your own agent images.
19-
- name: adk-debate-judge
20-
dockerfile: scenarios/debate/Dockerfile.adk-debate-judge
2119
- name: debate-judge
2220
dockerfile: scenarios/debate/Dockerfile.debate-judge
2321
- name: debater

README.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55
## Quickstart
66
1. Clone the repo
77
```
8-
git clone git@github.com:rdi-foundation/agentbeats-tutorial.git
8+
git clone git@github.com:RDI-Foundation/agentbeats-tutorial.git agentbeats-tutorial
99
cd agentbeats-tutorial
1010
```
1111
2. Install dependencies
1212
```
13-
uv sync
13+
uv sync --extra debate
1414
```
15+
This installs the optional dependencies needed to run the debate scenario (Gemini).
1516
3. Set environment variables
1617
```
1718
cp sample.env .env
1819
```
19-
Add your Google API key to the .env file
20+
Fill in the keys you plan to use (e.g. `GOOGLE_API_KEY` for the debate example and `OPENAI_API_KEY` for the tau2 example).
2021

2122
4. Run the [debate example](#example)
2223
```
@@ -29,6 +30,8 @@ This command will:
2930

3031
**Note:** Use `--show-logs` to see agent outputs during the assessment, and `--serve-only` to start agents without running the assessment.
3132

33+
**Note:** If you see `Error: Some agent endpoints are already in use`, change the ports in the scenario TOML (or stop the process using them).
34+
3235
To run this example manually, start the agent servers in separate terminals, and then in another terminal run the A2A client on the scenario.toml file to initiate the assessment.
3336

3437
After running, you should see an output similar to this.
@@ -37,21 +40,22 @@ After running, you should see an output similar to this.
3740

3841
## Project Structure
3942
```
40-
src/
41-
└─ agentbeats/
42-
├─ green_executor.py # base A2A green agent executor
43-
├─ models.py # pydantic models for green agent IO
44-
├─ client.py # A2A messaging helpers
45-
├─ client_cli.py # CLI client to start assessment
46-
└─ run_scenario.py # run agents and start assessment
47-
4843
scenarios/
49-
└─ debate/ # implementation of the debate example
50-
├─ debate_judge.py # green agent impl using the official A2A SDK
51-
├─ adk_debate_judge.py # alternative green agent impl using Google ADK
52-
├─ debate_judge_common.py # models and utils shared by above impls
53-
├─ debater.py # debater agent (Google ADK)
54-
└─ scenario.toml # config for the debate example
44+
├─ debate/
45+
│ ├─ judge/src/ # green agent (green-agent-template structure)
46+
│ ├─ debater/src/ # purple agent (agent-template structure)
47+
│ ├─ Dockerfile.debate-judge
48+
│ ├─ Dockerfile.debater
49+
│ └─ scenario.toml
50+
└─ tau2/
51+
├─ evaluator/src/ # green agent (green-agent-template structure)
52+
├─ agent/src/ # purple agent (agent-template structure)
53+
├─ Dockerfile.tau2-evaluator
54+
├─ Dockerfile.tau2-agent
55+
├─ setup.sh # downloads tau2-bench data for local runs
56+
└─ scenario.toml
57+
58+
src/agentbeats/ # optional local runner + A2A client helpers (`agentbeats-run`)
5559
```
5660

5761
# AgentBeats Tutorial
@@ -122,7 +126,10 @@ To make things concrete, we will use a debate scenario as our toy example:
122126
- Two purple agents (`Debater`) participate by presenting arguments for their side of the topic.
123127

124128
To run this example, we start all three servers and then use an A2A client to send an `assessment_request` to the green agent and observe its outputs.
125-
The full example code is given in the template repository. Follow the quickstart guide to setup the project and run the example.
129+
The debate example is implemented using the same structure as the supported templates:
130+
131+
- Green agent: `scenarios/debate/judge/src/` (green-agent-template style)
132+
- Purple agent: `scenarios/debate/debater/src/` (agent-template style)
126133

127134
### Dockerizing Agent
128135

pyproject.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ description = "Agentbeats Tutorial"
99
readme = "README.md"
1010
requires-python = ">=3.11"
1111
dependencies = [
12-
"a2a-sdk>=0.3.5",
13-
"google-adk>=1.14.1",
12+
"a2a-sdk[http-server]>=0.3.20",
13+
"httpx>=0.28.1",
14+
"pydantic>=2.11.9",
15+
"python-dotenv>=1.1.1",
16+
"uvicorn>=0.38.0",
17+
]
18+
19+
[project.optional-dependencies]
20+
debate = [
1421
"google-genai>=1.36.0",
22+
]
23+
tau2-agent = [
1524
"litellm>=1.0.0",
16-
"loguru>=0.7.0",
25+
]
26+
tau2-evaluator = [
1727
"nest-asyncio>=1.6.0",
18-
"pydantic>=2.11.9",
19-
"python-dotenv>=1.1.1",
20-
"uvicorn>=0.35.0",
21-
# tau2 from GitHub
2228
"tau2 @ git+https://github.com/sierra-research/tau2-bench.git",
2329
]
2430

sample.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
GOOGLE_GENAI_USE_VERTEXAI=FALSE
22
GOOGLE_API_KEY=
3+
OPENAI_API_KEY=

scenarios/debate/Dockerfile.adk-debate-judge

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/astral-sh/uv:python3.12-trixie
1+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
2+
3+
ENV UV_HTTP_TIMEOUT=300
24

35
RUN adduser agentbeats
46
USER agentbeats
@@ -9,10 +11,10 @@ COPY src src
911

1012
RUN \
1113
--mount=type=cache,target=/home/agentbeats/.cache/uv,uid=1000 \
12-
uv sync --locked
14+
uv sync --locked --no-dev --no-install-project --extra debate
1315

1416
COPY scenarios scenarios
1517

16-
ENTRYPOINT ["uv", "run", "scenarios/debate/debate_judge.py"]
18+
ENTRYPOINT ["uv", "run", "scenarios/debate/judge/src/server.py"]
1719
CMD ["--host", "0.0.0.0"]
1820
EXPOSE 9009
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/astral-sh/uv:python3.12-trixie
1+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
2+
3+
ENV UV_HTTP_TIMEOUT=300
24

35
RUN adduser agentbeats
46
USER agentbeats
@@ -9,10 +11,10 @@ COPY src src
911

1012
RUN \
1113
--mount=type=cache,target=/home/agentbeats/.cache/uv,uid=1000 \
12-
uv sync --locked
14+
uv sync --locked --no-dev --no-install-project --extra debate
1315

1416
COPY scenarios scenarios
1517

16-
ENTRYPOINT ["uv", "run", "scenarios/debate/debater.py"]
18+
ENTRYPOINT ["uv", "run", "scenarios/debate/debater/src/server.py"]
1719
CMD ["--host", "0.0.0.0"]
1820
EXPOSE 9019

scenarios/debate/adk_debate_judge.py

Lines changed: 0 additions & 113 deletions
This file was deleted.

0 commit comments

Comments
 (0)