CLI Examples
Quick Start
bash
# 1. Configure
payre config set-key pyr_sk_abc123def456...
# 2. Browse agents
payre agents list
payre agents list --domain travel
# 3. Resolve a query
payre resolve "book a flight to Tokyo"
# 4. One-shot invoke
payre run "book a flight to Tokyo" \
--payload '{"from":"SFO","to":"NRT","date":"2026-05-01"}'Register an Agent from JSON
Create a file my-agent.json:
json
{
"id": "agt_my_agent",
"slug": "my-agent",
"displayName": "My Custom Agent",
"providerId": "prv_acme",
"protocol": "rest",
"sourceType": "manual",
"endpointUrl": "https://api.example.com/v1",
"description": "Handles custom tasks",
"domains": ["custom"],
"capabilities": [
{ "key": "do_thing", "summary": "Does the thing" }
],
"version": "1.0.0"
}bash
payre agents register my-agent.json
# → Registered: agt_my_agent (My Custom Agent)Session-Based Invoking
bash
# Create a session grant
payre grants create --target agt_flight_master --type session --quota 10
# Invoke multiple times with the same grant
payre invoke agt_flight_master --grant grt_abc123 \
--capability search_flights \
--payload '{"from":"SFO","to":"NRT"}'
# Revoke when done
payre grants revoke grt_abc123Scripting
bash
# Use in shell scripts
RESULT=$(payre run "translate to Chinese" --payload '{"text":"Hello world"}')
echo "$RESULT"
# Check agent details
payre agents get agt_flight_master | jq '.protocol'