APIClaw agent tracing API
The agent tracing API from APIClaw — 6 operation(s) for agent tracing.
The agent tracing API from APIClaw — 6 operation(s) for agent tracing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/apiclaw:apiclaw-agent-tracing-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: LiteLLM agent tracing API
description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs**
👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login```
💸 ```LiteLLM Model Cost Map```.
🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**'
version: 1.105.1
tags:
- name: agent tracing
paths:
/v1/traces:
get:
tags:
- agent tracing
summary: List Agent Traces
operationId: list_agent_traces_v1_traces_get
security:
- APIKeyHeader: []
parameters:
- name: start_ms
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: 'Window start, unix ms. Default: 24h ago'
title: Start Ms
description: 'Window start, unix ms. Default: 24h ago'
- name: end_ms
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: 'Window end, unix ms. Default: now'
title: End Ms
description: 'Window end, unix ms. Default: now'
- name: cursor
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Cursor
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TracePage'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/traces/query:
post:
tags:
- agent tracing
summary: Query Agent Traces
operationId: query_agent_traces_v1_traces_query_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TraceQueryRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- APIKeyHeader: []
/v1/traces/query/help:
get:
tags:
- agent tracing
summary: Help Agent Trace Queries
operationId: help_agent_trace_queries_v1_traces_query_help_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
security:
- APIKeyHeader: []
/v1/traces/{trace_id}:
get:
tags:
- agent tracing
summary: Get Agent Trace
operationId: get_agent_trace_v1_traces__trace_id__get
security:
- APIKeyHeader: []
parameters:
- name: trace_id
in: path
required: true
schema:
type: string
title: Trace Id
- name: trace_ref
in: query
required: false
schema:
type: string
default: ''
title: Trace Ref
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Trace'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/traces/{trace_id}/spans/{span_id}:
get:
tags:
- agent tracing
summary: Get Agent Trace Span
operationId: get_agent_trace_span_v1_traces__trace_id__spans__span_id__get
security:
- APIKeyHeader: []
parameters:
- name: trace_id
in: path
required: true
schema:
type: string
title: Trace Id
- name: span_id
in: path
required: true
schema:
type: string
title: Span Id
- name: trace_ref
in: query
required: false
schema:
type: string
default: ''
title: Trace Ref
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SpanDetail'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/traces/{trace_id}/spans/{span_id}/error:
get:
tags:
- agent tracing
summary: Get Agent Trace Span Error
operationId: get_agent_trace_span_error_v1_traces__trace_id__spans__span_id__error_get
security:
- APIKeyHeader: []
parameters:
- name: trace_id
in: path
required: true
schema:
type: string
title: Trace Id
- name: span_id
in: path
required: true
schema:
type: string
title: Span Id
- name: trace_ref
in: query
required: false
schema:
type: string
default: ''
title: Trace Ref
- name: cursor
in: query
required: false
schema:
anyOf:
- type: string
maxLength: 512
- type: 'null'
title: Cursor
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/SpanErrorPage'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
UIMessage:
properties:
role:
type: string
enum:
- system
- user
- assistant
- tool
title: Role
content:
type: string
title: Content
name:
type: string
title: Name
tool_calls:
items:
$ref: '#/components/schemas/UIToolCall'
type: array
title: Tool Calls
type: object
required:
- role
- content
title: UIMessage
UIToolCall:
properties:
name:
type: string
title: Name
arguments:
type: string
title: Arguments
type: object
required:
- name
- arguments
title: UIToolCall
UIField:
properties:
key:
type: string
title: Key
value:
type: string
title: Value
type: object
required:
- key
- value
title: UIField
TracePage:
properties:
data:
items:
$ref: '#/components/schemas/TraceSummary'
type: array
title: Data
next_cursor:
anyOf:
- type: string
- type: 'null'
title: Next Cursor
type: object
required:
- data
- next_cursor
title: TracePage
TraceQueryRequest:
properties:
sql:
type: string
title: Sql
additionalProperties: false
type: object
required:
- sql
title: TraceQueryRequest
SpanDetail:
properties:
span_id:
type: string
title: Span Id
input:
type: string
title: Input
output:
type: string
title: Output
input_ui:
anyOf:
- $ref: '#/components/schemas/UIMessages'
- $ref: '#/components/schemas/UIFields'
- $ref: '#/components/schemas/UIText'
title: Input Ui
output_ui:
anyOf:
- $ref: '#/components/schemas/UIMessages'
- $ref: '#/components/schemas/UIFields'
- $ref: '#/components/schemas/UIText'
title: Output Ui
attributes:
additionalProperties:
type: string
type: object
title: Attributes
type: object
required:
- span_id
- input
- output
- input_ui
- output_ui
- attributes
title: SpanDetail
UIFields:
properties:
kind:
type: string
const: fields
title: Kind
fields:
items:
$ref: '#/components/schemas/UIField'
type: array
title: Fields
type: object
required:
- kind
- fields
title: UIFields
Trace:
properties:
summary:
$ref: '#/components/schemas/TraceSummary'
agents:
items:
$ref: '#/components/schemas/AgentNode'
type: array
title: Agents
spans:
items:
$ref: '#/components/schemas/Span'
type: array
title: Spans
type: object
required:
- summary
- agents
- spans
title: Trace
UIText:
properties:
kind:
type: string
const: text
title: Kind
text:
type: string
title: Text
type: object
required:
- kind
- text
title: UIText
UIMessages:
properties:
kind:
type: string
const: messages
title: Kind
messages:
items:
$ref: '#/components/schemas/UIMessage'
type: array
title: Messages
type: object
required:
- kind
- messages
title: UIMessages
AgentNode:
properties:
name:
type: string
title: Name
parent_agent:
anyOf:
- type: string
- type: 'null'
title: Parent Agent
invocations:
type: integer
title: Invocations
llm_calls:
type: integer
title: Llm Calls
tool_calls:
type: integer
title: Tool Calls
duration_ms:
type: number
title: Duration Ms
spend:
anyOf:
- type: number
- type: 'null'
title: Spend
type: object
required:
- name
- parent_agent
- invocations
- llm_calls
- tool_calls
- duration_ms
- spend
title: AgentNode
description: One distinct agent in a trace. 200 invocations of `researcher` = one node.
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
SpanErrorPage:
properties:
span_id:
type: string
title: Span Id
message:
type: string
title: Message
total_chars:
type: integer
title: Total Chars
next_cursor:
anyOf:
- type: string
- type: 'null'
title: Next Cursor
type: object
required:
- span_id
- message
- total_chars
- next_cursor
title: SpanErrorPage
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
Span:
properties:
span_id:
type: string
title: Span Id
parent_span_id:
anyOf:
- type: string
- type: 'null'
title: Parent Span Id
name:
type: string
title: Name
type:
type: string
enum:
- agent
- llm
- tool
- chain
- framework
title: Type
agent:
type: string
title: Agent
start_offset_ms:
type: number
title: Start Offset Ms
duration_ms:
type: number
title: Duration Ms
status:
type: string
enum:
- ok
- error
- unset
title: Status
error:
anyOf:
- type: string
- type: 'null'
title: Error
error_truncated:
type: boolean
title: Error Truncated
input_preview:
type: string
title: Input Preview
model:
anyOf:
- type: string
- type: 'null'
title: Model
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
litellm_request_id:
anyOf:
- type: string
- type: 'null'
title: Litellm Request Id
spend:
anyOf:
- type: number
- type: 'null'
title: Spend
type: object
required:
- span_id
- parent_span_id
- name
- type
- agent
- start_offset_ms
- duration_ms
- status
- error
- error_truncated
- input_preview
- model
- input_tokens
- output_tokens
- litellm_request_id
- spend
title: Span
TraceSummary:
properties:
trace_id:
type: string
title: Trace Id
trace_ref:
type: string
title: Trace Ref
name:
type: string
title: Name
service:
type: string
title: Service
input_preview:
type: string
title: Input Preview
start_time:
type: string
title: Start Time
duration_ms:
type: number
title: Duration Ms
status:
type: string
enum:
- ok
- error
- unset
title: Status
span_count:
type: integer
title: Span Count
agent_count:
type: integer
title: Agent Count
agent_invocations:
type: integer
title: Agent Invocations
llm_calls:
type: integer
title: Llm Calls
tool_calls:
type: integer
title: Tool Calls
error_count:
type: integer
title: Error Count
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
models:
items:
type: string
type: array
title: Models
spend:
anyOf:
- type: number
- type: 'null'
title: Spend
type: object
required:
- trace_id
- name
- service
- input_preview
- start_time
- duration_ms
- status
- span_count
- agent_count
- agent_invocations
- llm_calls
- tool_calls
- error_count
- input_tokens
- output_tokens
- models
- spend
title: TraceSummary
securitySchemes:
APIKeyHeader:
type: apiKey
description: Bearer token
in: header
name: x-litellm-api-key
HTTPBearer:
type: http
scheme: bearer