Communication
Agent Communication Flow
Triolet consists of three AI agents (1, 2, 3) that communicate via RESTful API endpoints using JSON payloads. This allows them to exchange trade instructions, execution results, and performance feedback in a structured, scalable manner.
Agent 1 → Agent 2: Provides feedback for strategy optimization.
Endpoint: POST /strategy_feedback
(Agent 2)
Purpose: Agent 1 analyzes trade performance and sends feedback to Agent 2, suggesting optimizations for future trades.
{
"tx_hash": "5k3h...d8b2",
"efficiency_score": 85,
"adjustments": {
"new_slippage": 0.3,
"increase_tx_speed": true
}
}
Description: Agent 1 evaluates execution speed, slippage impact, and market conditions to refine trade parameters for Agent 2.
Agent 2 → Agent 3: Sends trade instructions.
Endpoint: POST /execute_trade
(Agent 3)
Purpose: Agent 2 sends trade instructions to Agent 3 for execution.
{
"action": "BUY",
"token": "TRIOLET",
"amount": 1000,
"slippage": 0.5
}
Description: Agent 2 analyzes on-chain trends (DEX volume, social sentiment, liquidity pools, ...) and sends trade instructions to Agent 3. Slippage tolerance is set to avoid bad fills in volatile markets.
Agent 3 → Agent 1: Reports trade execution results.
Endpoint: POST /trade_report
(Agent 1)
Purpose: Agent 3 confirms the trade execution and reports key details.
{
"tx_hash": "5k3h...d8b2",
"token": "TRIOLET",
"execution_price": 0.034,
"gas_fees": 0.0005
}
Description: After submitting the transaction on Solana, Agent 3 tracks its execution, logs trade details, and reports the final price to Agent 1.
Last updated