Skip to main content

What is traces?

Traces are a chained collection of workflows and tasks. You can use tree views and waterfalls to better track dependencies and latency.
Agent tracing visualization

Use agent tracing

1. Get your Keywords AI API key

After you create an account on Keywords AI, you can get your API key from the API keys page.

2. Keywords AI Native (OpenTelemetry)

You just need to add the keywordsai_tracing package to your project and annotate your workflows.
1

Install the SDK

Python Requirement: This package requires Python 3.9 or later.
pip
2

Set up Environment Variables

Get your API key from the API Keys page in Settings, then configure it in your environment:
.env
3

A full example with LLM calls

Use the @workflow and @task decorators to instrument your code:
Python
Optional HTTP instrumentation If you see logs like:install the OpenTelemetry instrumentations to enable and silence these messages:
This is optional; tracing works without them. Add only if your app uses requests or urllib3.

3. View your traces

You can now see your traces in the Traces.
Agent tracing visualization

Integrate with your existing AI framework

Keywords AI also integrates seamlessly with popular AI frameworks to give you complete observability into your agent workflows.
OpenAI Agents SDK
Vercel AI SDK
Mastra