Skip to content
 
 

Repository files navigation

Tau2 Purple Agent

Baseline purple agent for the tau2-bench customer service benchmark on AgentBeats. Uses litellm to call any supported LLM provider.

During evaluation, the green agent sends customer service tasks via the A2A protocol. This agent receives each task, uses the provided tools and policy to resolve it, and returns a JSON response.

src/
├─ server.py      # Server setup and agent card configuration
├─ executor.py    # A2A request handling
├─ agent.py       # Your agent implementation goes here
└─ messenger.py   # A2A messaging utilities
tests/
└─ test_agent.py  # Agent tests
Dockerfile            # Docker configuration
pyproject.toml        # Python dependencies
amber-manifest.json5  # Amber manifest
.github/
└─ workflows/
   └─ test-and-publish.yml # CI workflow

Getting Started

  1. Create your repository - Click "Use this template" to create your own repository from this template

  2. Implement your agent - Add your agent logic to src/agent.py

  3. Configure your agent card - Fill in your agent's metadata (name, skills, description) in src/server.py

  4. Fill out your Amber manifest - Update amber-manifest.json5 to use your agent in Amber scenarios

  5. Write your tests - Add custom tests for your agent in tests/test_agent.py

For a concrete example of implementing an agent using this template, see this draft PR.

Configuration

Environment Variable Default Description
AGENT_LLM openai/gpt-4o-mini LLM model in litellm format
OPENAI_API_KEY Required if using OpenAI models
GEMINI_API_KEY Required if using Gemini models
DEEPSEEK_API_KEY Required if using DeepSeek models

Running Locally

# Install dependencies
uv sync

# Run the server
AGENT_LLM=openai/gpt-4o-mini OPENAI_API_KEY=sk-... uv run src/server.py

Running with Docker

# Build the image
docker build -t tau2-purple-agent .

# Run the container
docker run -p 9009:9009 \
  -e AGENT_LLM=openai/gpt-4o-mini \
  -e OPENAI_API_KEY=sk-... \
  tau2-purple-agent

Amber Scenario

This agent includes an Amber manifest at amber-manifest.json5 for use in the AgentBeats quick-submit flow.

Validate the manifest

docker run --rm -v "$PWD":/work -w /work \
  ghcr.io/rdi-foundation/amber-cli:main check amber-manifest.json5

Run as part of a scenario

The green agent's repo contains the full scenario file that wires this purple agent to the gateway and green agent. See the green agent amber directory for the scenario manifest and instructions.

To submit via quick-submit, use the form on the green agent's AgentBeats page. The scenario builder will reference this agent's manifest URL and pass in the configured AGENT_LLM and API keys.

Testing

# Install test dependencies
uv sync --extra test

# Start the agent, then run A2A conformance tests
uv run pytest --agent-url http://localhost:9009

Publishing

The included GitHub Actions workflow builds, tests, and publishes a Docker image to GitHub Container Registry on push to main:

ghcr.io/rdi-foundation/tau2-purple-agentbeats:latest

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages