Remote agents can be slow, unavailable or wrong. Client agents must cope.
Failure Types
- Transport errors: network issues, timeouts.
- Protocol errors: malformed requests or unsupported methods, reported as JSON-RPC errors.
- Task failures: the remote agent couldn't complete the task.
- Bad results: the task "completes" but the output is wrong or incomplete.
Timeouts and Retries
Set timeouts appropriate to each skill. Retry transient failures with backoff, but be careful with tasks that have side effects.
Idempotency
Retrying a booking request could book twice. Use identifiers so repeated requests are recognised, and check task status before resubmitting.
Validate Results
Check artifacts against expected formats and sanity rules before relying on them.
Fallbacks
Have alternatives when an agent is unavailable: another agent, a simpler automated route, or a human.
Communicate Clearly
Remote agents should fail with meaningful reasons. Client agents should tell users what happened and what options remain.
Monitor
Track success rates, latency and failure reasons per remote agent.