Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PromptRails SDK Examples

Code examples for the PromptRails SDKs — Python, JavaScript/TypeScript, and Go.

Prerequisites

  • A PromptRails account and API key
  • Set your API key as an environment variable:
export PROMPTRAILS_API_KEY="pr_key_..."

Examples

Example Python JavaScript Go
Basic — Client setup and configuration View View View
Agents — Create, execute, and manage agents View View View
Prompts — Template management and execution View View View
Chat — Multi-turn conversations View View View
Streaming — Live SSE events for chat turns and executions View View View
Traces — Execution tracing and observability View View View
Executions — Monitor execution history View View View
Costs — Track LLM usage costs View View View
MCP Tools — External tool integrations View View View
Agent Triggers — Event-driven agent execution View View View
A2A — Agent-to-Agent communication View View View
Media Studio — Generate images, speech, and video View View View
Assets — Manage generated media assets View View View
Media Models — Browse available media models View View View

SDK Installation

Python:

pip install "promptrails>=0.5.0"

JavaScript/TypeScript:

npm install @promptrails/sdk@^0.5.0

Go:

go get github.com/promptrails/go-sdk@v0.5.0

Links

Releases

Packages

Contributors

Languages