Skip to main content
The SDK is what lives in your agent process. You install it as a regular Python package and point it at the Rubric API URL we gave you.

SDK

The Python SDK is published as rubric on PyPI.
pip install rubric-app

Optional extras

Choose the extra(s) matching your agent framework. Each extra is a thin adapter that wraps the framework’s tool-dispatch hook so every call is governed.
ExtraWhen to use it
rubric[mcp]Anything that speaks the Model Context Protocol.
rubric[claude-agent]Claude Agent SDK (claude-agent-sdk).
rubric[langchain]LangChain BaseTool lists.
rubric[runtime]Optional native evaluator backend (Rust). Faster, identical semantics.
rubric[presidio]Presidio-backed DLP detection.
You can stack them: pip install 'rubric-app[mcp,runtime,presidio]'.

Configure

The SDK reads its configuration from environment variables:
export AG_ENROLLMENT_TOKEN=enr_# mint one in the dashboard's Enrollment page
export AG_AGENT_NAME=my-bot            # stable per-agent name
export AG_API_URL=https://api.your-rubric-url.example.com   # the URL we gave you
AG_API_URL is the Rubric API URL you received during onboarding. Set it in your deployment’s secret manager alongside the enrollment token.

Verify

Hit Rubric’s health endpoint to confirm reachability:
curl "$AG_API_URL/health"
# {"ok":true}
Then walk through the Quickstart to enroll your first agent.