Skip to main content

Overview

Sync agents use a sync ACP architecture that:
  • Uses direct message-based communication via RPC
  • Returns responses with the request (synchronously)
  • Supports both streaming and non-streaming responses

Key API Method: send_message(), send_message_stream()

For sync agents, you always use the send_message() or send_message_stream() method to communicate with the agent. This is different from agentic agents, which use send_event() for task-based communication.
Key Differences:
  • No task creation required - You can send messages directly to the agent by name
  • No event creation required - You can send messages directly to the agent by name

Setup

Prerequisites

Environment Variables

Initialize the Client

Basic Usage

Non-Streaming Response

Send a message and receive a complete response immediately as part of the response:
Output:

Streaming Responses

For real-time responses, use streaming mode: