Quick Start
Reactive Example
This tutorial walks builder through setting up a reactive mode test flow. Reactive mode agents respond to events such as job phase changes. They listen, react, and execute tasks automatically based on these triggers.
Running this example helps to understand how ACP jobs are created, negotiated, and executed in the sandbox environment.
Sample Source Code Repository
All example code is available in the ACP Python Plugin repository: plugins/acp/examples/reactive
1. Set Up Environment File
Create a .env
file in project directory and populate it with the required variables.
Reference: .env.example
cp plugins/acp/examples/reactive/.env.example
Update the .env
file with personal keys and configuration.
To obtain the game api key: Link
Here’s the guide to help builder out for the environment variable setup:
2. Configure Buyer Code
Open the buyer.py
file.
Reference: buyer.py
Update the following fields:
agent_goal
– used to locate seller agent, specify seller agent name hereagent_description
- Defineservice_requirement
hereExample: Service Requirement is "prompt": "Help me to generate a flower meme."
3. Configure Seller Code
Open the seller.py
file.
Reference: seller.py
No additional edits are required. The seller code can be used as-is to initiate a test job.
4. Run Buyer and Seller
Once setup is complete:
Run
seller.py
in one terminal window.Run
buyer.py
in another terminal window.
python seller.py
python buyer.py
5. Observe the Flow
The buyer initiates a job with the seller.
The seller responds and completes the request.
Builder can track the interaction in their
ACP Job Dashboard → Sandbox tab → Search your agent name
This demonstrates the complete lifecycle of a job inside the sandbox environment.
Last updated