Skip to content

Releases: promptrails/python-sdk

v0.8.0

Choose a tag to compare

@bahattincinic bahattincinic released this 19 Jun 18:41

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

Choose a tag to compare

@bahattincinic bahattincinic released this 01 Jun 12:57

Adds tracing integrations for two more providers, alongside the existing LangChain, OpenAI, and OpenTelemetry support:

  • Anthropicpip install "promptrails[anthropic]". trace_anthropic(client, tracer) traces every messages.create call (model, input/output tokens, output).
  • Google GenAIpip install "promptrails[google]". trace_google(client, tracer) traces every models.generate_content call on the unified google-genai SDK.

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

Choose a tag to compare

@bahattincinic bahattincinic released this 01 Jun 12:09

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)

  • Tracerwith tracer.span(...) context manager, @tracer.trace decorator, manual spans; automatic parent nesting via contextvars.
  • Span — chainable set_input/output/model/usage/cost/tags/attributes/error.
  • SpanExporter — buffered batch export to /api/v1/traces/ingest with 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)

  • LangChainpip install "promptrails[langchain]" — a callback handler that builds the span tree from run_id/parent_run_id.
  • OpenAI / Anthropicpip install "promptrails[openai]"trace_openai(client, tracer) auto-traces chat completions.
  • OpenTelemetrypip install "promptrails[otel]" — a SpanExporter mapping gen_ai.* semantic conventions.

See docs/tracing.md and docs/integrations.md.

v0.5.0

Choose a tag to compare

@bahattincinic bahattincinic released this 01 Jun 08:54

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

Choose a tag to compare

@bahattincinic bahattincinic released this 21 May 11:16

Highlights

  • client.webhook_triggersclient.agent_triggers — the trigger surface now spans generic webhook, Slack, Telegram, Microsoft Teams, WhatsApp Business, and cron schedules. create() accepts source, source_config, and reply_config so any of the six sources can be configured from one method.
  • New client.agent_vfs — per-agent Virtual Filesystem: list, read (with line_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 — add source, source_config, reply_config
  • AgentVFSFile, 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

Choose a tag to compare

@bahattincinic bahattincinic released this 17 Apr 14:30

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

Choose a tag to compare

@bahattincinic bahattincinic released this 11 Mar 12:30

Add Media Studio, Assets, and Media Models support

v0.1.0

Choose a tag to compare

@bahattincinic bahattincinic released this 10 Mar 09:42

Initial release of promptrails Python SDK