# RDK Python SDK ## Docs - [create_redactor()](https://docs.021labs.ai/api-reference/create-redactor.md): Build a reusable PII redaction function from RedactorConfig - [create_synthetic_world()](https://docs.021labs.ai/api-reference/create-synthetic-world.md): Create a synthetic world for simulated tool calls - [flush()](https://docs.021labs.ai/api-reference/flush.md): Manually flush pending traces - [get_current_trace()](https://docs.021labs.ai/api-reference/get-current-trace.md): Access the active trace from within a traced function - [instrument_baml()](https://docs.021labs.ai/api-reference/instrument-baml.md): Wrap a BAML client with automatic tracing - [Span](https://docs.021labs.ai/api-reference/models/span.md): A single operation in a trace - [TokenUsage](https://docs.021labs.ai/api-reference/models/token-usage.md): Token usage information from LLM calls - [Trace](https://docs.021labs.ai/api-reference/models/trace.md): A trace containing multiple spans - [@observe](https://docs.021labs.ai/api-reference/observe.md): Decorator to create a trace context - [redact_all_pii()](https://docs.021labs.ai/api-reference/redact-all-pii.md): One-shot PII redaction using all default patterns - [RedactorConfig](https://docs.021labs.ai/api-reference/redactor-config.md): Configuration for PII redaction - [shutdown()](https://docs.021labs.ai/api-reference/shutdown.md): Gracefully shutdown the RDK client - [span()](https://docs.021labs.ai/api-reference/span.md): Context manager to trace custom code blocks - [ToolSpec](https://docs.021labs.ai/api-reference/tool-spec.md): JSON Schema descriptor for synthetic tools - [trace()](https://docs.021labs.ai/api-reference/trace.md): Context manager alternative to @observe - [Core Concepts](https://docs.021labs.ai/concepts.md): Understanding traces, spans, and how RDK works - [Agent Tracing](https://docs.021labs.ai/guides/agent-tracing.md): Trace AI agents with tool calling and multi-turn conversations - [FastAPI Integration](https://docs.021labs.ai/guides/fastapi.md): Use RDK with FastAPI web applications - [Synthetic Worlds](https://docs.021labs.ai/guides/synthetic-worlds.md): Iterate on agent behavior with simulated tool responses - [Testing](https://docs.021labs.ai/guides/testing.md): Write tests for LLM applications without making real API calls - [Anthropic](https://docs.021labs.ai/integrations/anthropic.md): Trace Claude API calls automatically - [BAML](https://docs.021labs.ai/integrations/baml.md): Trace BAML structured extraction calls - [Google Gemini](https://docs.021labs.ai/integrations/gemini.md): Trace Google Gemini API calls automatically - [LangChain](https://docs.021labs.ai/integrations/langchain.md): Trace LangChain chains, agents, and LLM calls - [OpenAI](https://docs.021labs.ai/integrations/openai.md): Trace OpenAI GPT API calls automatically - [Introduction](https://docs.021labs.ai/introduction.md): RDK - LLM Tracing Library for Python - [Quickstart](https://docs.021labs.ai/quickstart.md): Get started with RDK in 5 minutes ## OpenAPI Specs - [openapi](https://docs.021labs.ai/api-reference/openapi.json) ## Optional - [GitHub](https://github.com/021/rdk-python) - [Package](https://pypi.fury.io/021labs/)