Releases: promptrails/python-sdk
Release list
v0.8.0
Removes the deprecated agent-memory API surface (the memories resource — list / create / search / delete). The feature was removed from the PromptRails platform backend, so these calls now return 404. For retrieval use cases, use Knowledge (RAG) instead.
v0.7.0 — Anthropic + Google GenAI integrations
Adds tracing integrations for two more providers, alongside the existing LangChain, OpenAI, and OpenTelemetry support:
- Anthropic —
pip install "promptrails[anthropic]".trace_anthropic(client, tracer)traces everymessages.createcall (model, input/output tokens, output). - Google GenAI —
pip install "promptrails[google]".trace_google(client, tracer)traces everymodels.generate_contentcall on the unifiedgoogle-genaiSDK.
Each is a dedicated wrapper because the providers use different method paths and response shapes than OpenAI. Also fixes the openai integration docstring that incorrectly claimed Anthropic support.
See docs/integrations.md.
v0.6.0 — Standalone tracing + integrations
Standalone tracing
Send spans to PromptRails from any Python code, without managing your prompts or agents on the platform — PromptRails as a standalone LLM observability backend.
Core (promptrails.tracing)
Tracer—with tracer.span(...)context manager,@tracer.tracedecorator, manual spans; automatic parent nesting viacontextvars.Span— chainableset_input/output/model/usage/cost/tags/attributes/error.SpanExporter— buffered batch export to/api/v1/traces/ingestwith a background flush thread, atexit flush, and best-effort (never raises) delivery.
Only needs an API key with the traces:write scope.
Integrations (optional extras)
- LangChain —
pip install "promptrails[langchain]"— a callback handler that builds the span tree fromrun_id/parent_run_id. - OpenAI / Anthropic —
pip install "promptrails[openai]"—trace_openai(client, tracer)auto-traces chat completions. - OpenTelemetry —
pip install "promptrails[otel]"— aSpanExportermappinggen_ai.*semantic conventions.
See docs/tracing.md and docs/integrations.md.
v0.5.0
langrails v0.7 parity.
- LLMModel / AvailableModelEntry: capability flags (
supports_temperature/top_p/top_k/reasoning/web_search/prompt_caching),cached_input_price, and deprecation (is_deprecated/deprecated_at). - MediaModel:
is_deprecated/deprecated_at. - TokenUsage (streaming):
cached_tokens,cache_creation_tokens,reasoning_tokens. - Fix:
list_available()now parses the{"groups": [...]}response envelope — it previously always returned an empty list.
Run-prompt feature toggles (reasoning_effort, web_search, prompt_caching, top_k) already pass through run_prompt(data=...).
v0.4.0 — Agent Triggers + Virtual Filesystem
Highlights
client.webhook_triggers→client.agent_triggers— the trigger surface now spans generic webhook, Slack, Telegram, Microsoft Teams, WhatsApp Business, and cron schedules.create()acceptssource,source_config, andreply_configso any of the six sources can be configured from one method.- New
client.agent_vfs— per-agent Virtual Filesystem:list,read(withline_offset+line_limit),write(overwrite or append),stat,mkdir,move,copy,delete,grep,glob,usage. Files survive across executions and double as long-term memory.
Types
New / changed:
AgentTrigger,AgentTriggerCreateResponse— addsource,source_config,reply_configAgentVFSFile,AgentVFSGrepMatch— new
Routes
/api/v1/webhook-triggers→/api/v1/triggers- New:
/api/v1/agents/:agentId/vfs/*
Breaking change
client.webhook_triggers no longer exists. Replace with client.agent_triggers. The on-the-wire payload accepts the same fields plus the new source / source_config / reply_config.
Install
```bash
pip install --upgrade promptrails==0.4.0
```
v0.3.0 — streaming + typed AgentConfig
New
- Streaming: `ChatResource.send_message_stream` and `ExecutionsResource.stream` yield typed events (`ExecutionEvent`, `ThinkingEvent`, `ToolStartEvent`, `ToolEndEvent`, `ContentEvent`, `DoneEvent`, `ErrorEvent`). Sync + async resources both support it.
- Typed AgentConfig: `AgentsResource.create_version(config=...)` now takes a typed `AgentConfig` — one of `SimpleAgentConfig`, `ChainAgentConfig`, `MultiAgentConfig`, `WorkflowAgentConfig`, `CompositeAgentConfig`. The SDK injects the `type` discriminator automatically.
- VERSION constant + User-Agent: `promptrails.VERSION` is available as an import and sent as `User-Agent: promptrails-python/` on every request.
Breaking
- `create_version(config=...)` now requires an `AgentConfig` instance, not a `dict`.
Install
pip install promptrails==0.3.0
v0.2.0
Add Media Studio, Assets, and Media Models support
v0.1.0
Initial release of promptrails Python SDK