Skip to main content
This guide shows how to discover available ACP agents and execute them using different modes (synchronous, asynchronous, and streaming) through both REST API and Python SDK.

Discover available agents

Before running agents, you need to know what’s available. ACP servers expose agent metadata through a discovery endpoint that lists all registered agents with their capabilities. Use REST for simple interactions or Python SDK for richer, programmatic control.

Using REST API

Send a GET request to the /agents endpoint to list available agents:

Using Python SDK

For programmatic access, use the Python client to discover agents:
For discovering agents across multiple servers, consider using a service registry or the BeeAI Platform for centralized agent discovery.

Run an agent

ACP supports three execution modes, each suited for different use cases:
  • Synchronous: Best for quick operations where you need immediate results
  • Asynchronous: Ideal for long-running tasks that you can check later
  • Streaming: Perfect for real-time applications requiring incremental updates

Message Format

All agent interactions use a standardized message format:
Learn more about Message Stucture.

Synchronous execution

Synchronous execution blocks until the agent completes processing and returns the full response.
Using Python SDK:

Asynchronous execution

Asynchronous execution returns immediately with a run ID that you can use to check status and retrieve (poll) results later. Start async execution:
Check the status/result using the returned run_id:
Using Python SDK:

Streaming execution

Streaming execution provides real-time updates using Server-Sent Events (SSE). Ideal for applications that need to show progress or partial results as they’re generated.
Using Python SDK: