ck_external_service
Track agent interactions with external APIs, with cost attribution, rate limits, and PII redaction. Supports recording, summaries, rate status, and top services.
Instructions
Track and govern agent interactions with external SaaS APIs. Rate limits per service, cost attribution, and PII redaction. Modes: record (log an interaction with auto-redaction), summary (aggregated view per service), rate_limit_status (current rates against limits), top_services (ranked by volume and cost).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost_cents | No | Estimated cost in cents. | |
| endpoint | No | Sanitized endpoint path. PII is auto-redacted. | |
| interaction_type | No | Type of interaction. Defaults to api_call. | |
| latency_ms | No | Request latency in milliseconds. | |
| limit | No | Max results for top_services mode. Default: 10. | |
| metadata | No | Additional metadata. | |
| method | No | HTTP method (GET, POST, etc.). | |
| mode | No | Operation mode. Defaults to summary. | |
| service_name | No | External service name (e.g., github, slack, jira). | |
| session_id | Yes | Session identifier. | |
| status_code | No | HTTP status code or result code. | |
| task_id | No | Task identifier for scoping the interaction. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| rate_limits | No | ||
| recorded | No | ||
| services | No | ||
| summary | No |