Skip to content

Latest commit

 

History

History

README.md

PrysmAI Python SDK Examples

These examples mirror the three main ways to use PrysmAI:

  1. Proxy path for application traffic
  2. MCP path for agent runtimes
  3. Unified session path for correlated runs across requests and governance evidence

They also include framework-oriented examples for developers who want Prysm to plug into an orchestration layer instead of building telemetry wiring by hand.

Setup

Set your Prysm credentials:

export PRYSM_API_KEY="sk-prysm-..."
export PRYSM_BASE_URL="http://localhost:3000/api/v1"

Then run any example:

python examples/proxy_chat.py
python examples/mcp_agent_runtime.py
python examples/unified_session.py
python examples/langgraph_monitor.py
python examples/agent_framework_monitor.py

Files

  • proxy_chat.py

    • Smallest application example
    • Routes an OpenAI-style request through Prysm
  • mcp_agent_runtime.py

    • MCP-oriented example
    • Shows how to derive MCP connection config and record external runtime events
  • unified_session.py

    • Best example of the current Prysm product shape
    • Correlates model traffic, decisions, tools, and file changes under one run
  • langgraph_monitor.py

    • LangGraph callback example
    • Starts governance, wires Prysm as a graph callback, and closes cleanly
  • agent_framework_monitor.py

    • Agent Framework middleware example
    • Shows where Prysm wraps agent execution, tool activity, and chat-model calls