Installation
The Promptic Python SDK (promptic-sdk) provides tracing, a REST API client, and a CLI for the Promptic platform.
Requires Python 3.11+
Install
pip install promptic-sdkProvider and framework extras
Install auto-instrumentation for your LLM provider or agent framework:
# LLM providers
pip install promptic-sdk[openai] # OpenAI
pip install promptic-sdk[anthropic] # Anthropic
pip install promptic-sdk[bedrock] # AWS Bedrock
pip install promptic-sdk[vertexai] # Google Vertex AI
pip install promptic-sdk[mistralai] # Mistral
# Agent frameworks
pip install promptic-sdk[langchain] # LangChain / LangGraph / deepagents
pip install promptic-sdk[openai-agents] # OpenAI Agents SDK
pip install promptic-sdk[claude-agent] # Claude Agent SDK
# Everything above
pip install promptic-sdk[all]Google Generative AI and Cohere instrumentors are included with the base
install. Pydantic AI ships its own emitter — enable it with
Agent(..., instrument=True), no extras required.
Authentication
Option 1: API key (recommended for production)
Create an API key in your workspace settings and set it as an environment variable:
export PROMPTIC_API_KEY="pk_live_..."Or pass it directly:
import promptic_sdk
promptic_sdk.init(api_key="pk_live_...")Option 2: Device login (recommended for development)
Use the CLI for interactive login:
promptic loginThis opens your browser, authenticates via OAuth, and saves credentials to ~/.promptic/config.toml.
Option 3: Direct configuration (CI/CD)
promptic configure --api-key "pk_live_..."Configuration
The SDK resolves configuration in this order:
- Explicit arguments passed to
init()orPrompticClient() - Environment variables
- Config file at
~/.promptic/config.toml
Environment variables
| Variable | Description | Default |
|---|---|---|
PROMPTIC_API_KEY | API key for authentication | — |
PROMPTIC_ENDPOINT | Platform URL | https://promptic.eu |
PROMPTIC_ACCESS_TOKEN | Session token from promptic login | — |
PROMPTIC_WORKSPACE_ID | Workspace ID for session auth | — |
Config file
The config file is managed by promptic login and promptic configure. It's stored at ~/.promptic/config.toml with restricted permissions (0600).
api_key = "pk_live_..."
endpoint = "https://promptic.eu"