Skip to content

Repository files navigation

Tau2 Purple Agent

A purple agent for the τ²-Bench benchmark on the AgentBeats platform.

Competes in customer service tasks across airline, retail, and telecom domains, using LLM reasoning and tool calls to resolve user requests while following domain policies.

How it works

The agent exposes an A2A endpoint. On each evaluation task:

  1. The green agent sends a system prompt containing the domain policy, available tools, and the conversation so far.
  2. The purple agent calls an LLM (OpenAI-compatible) and responds with a JSON action — either a tool call or a direct response to the user.
  3. This loop continues until the task is resolved or the step limit is reached.

Project Structure

src/
├─ agent.py       # LLM-powered agent logic
├─ executor.py    # A2A request handling
├─ messenger.py   # A2A messaging utilities
└─ server.py      # A2A server setup and agent card
tests/
└─ test_agent.py  # A2A conformance tests
Dockerfile
pyproject.toml

Running Locally

# Install dependencies
uv sync

# Set your API key (supports any OpenAI-compatible endpoint)
export OPENAI_API_KEY=sk-...
# Optional: use a custom base URL (e.g. proxy)
export OPENAI_API_BASE=...
# Optional: choose model (default: gpt-4o-mini)
export OPENAI_MODEL=...

# Start the agent
uv run src/server.py

The server starts on port 9009.

Running with Docker

docker build -t tau2-purple-agent .
docker run -p 9009:9009 -e OPENAI_API_KEY=sk-... tau2-purple-agent

Testing

uv sync --extra test
uv run pytest -v --agent-url http://localhost:9009

Publishing

The GitHub Actions workflow automatically builds, tests, and publishes the Docker image to GHCR on push to main:

ghcr.io/paulrychkov/agent-beats-tau2:latest

Make the package public in: GitHub → Your Profile → Packages → agent-beats-tau2 → Package Settings → Make Public.

AgentBeats Registration

  1. Go to agentbeats.dev and click Register Agent
  2. Select Purple, fill in the Docker image ghcr.io/paulrychkov/agent-beats-tau2:latest
  3. Submit an assessment via Quick Submit on the τ²-Bench leaderboard

About

Winner of the tau2-bench competition on AgentBeats (Berkeley AgentX) at the competition close: a customer-service purple agent reaching 82.5% in the telecom domain. A plain A2A service with no agent framework; the edge is distilled per-domain policy playbooks injected ahead of the task policy.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages