Official SDKs
Install an SDK and verify AI requests in three lines of code. Core SDKs and framework adapters at v1.1.0.
Palveron ships 14 official packages — four core SDKs, seven framework adapters, one Flare-AI-Kit FunctionTool, and two automation tools — plus a browser extension and a no-install Make.com HTTP integration for 16 supported ways to connect. Each package shares the same retry / circuit-breaker / typed-error behavior; pick the one closest to your stack.
Core SDKs
Use a core SDK when you're calling Palveron directly from your code — Python service, Node.js API, Go microservice, Java backend.
TypeScript
npm install @palveron/sdkZero dependencies. Works on Node.js 18+, Deno, Bun, and edge runtimes (Cloudflare Workers, Vercel Edge).
Python
pip install palveron-sdkPython 3.9+. Sync and async clients. Fully typed (PEP 561).
Go
go get github.com/palveron/[email protected]Zero dependencies (stdlib only). Go 1.21+.
Java (Gradle + JitPack)
repositories { maven { url 'https://jitpack.io' } }
dependencies { implementation 'com.github.palveron:sdk-java:v1.0.0' }Zero dependencies (Java 17+ HttpClient). Records and builder pattern.
Basic usage
TypeScript
import { Palveron } from '@palveron/sdk';
const palveron = new Palveron({
apiKey: process.env.PALVERON_API_KEY!,
// baseUrl: 'https://gateway.internal:8080', // on-prem
});
const result = await palveron.verify({ prompt: userInput });
if (result.decision === 'BLOCKED') {
throw new Error(result.reason);
}
// Quick check (shorthand)
const { decision } = await palveron.check('Is this safe?');
// With file attachment
const fileResult = await palveron.verifyWithFile(
'Analyze this document',
'./report.pdf'
);Python
from palveron import Palveron, VerifyRequest, Attachment
client = Palveron(api_key="pv_live_...")
# Text verification
result = client.verify("Check this prompt")
if result.is_blocked:
raise RuntimeError(result.reason)
# With file attachment
result = client.verify_file("Analyze this", "/path/to/doc.pdf")
# Programmatic attachment
result = client.verify(VerifyRequest(
prompt="Check this image",
attachments=[Attachment.from_file("photo.jpg")],
))Async:
from palveron import AsyncPalveron
async with AsyncPalveron(api_key="pv_live_...") as client:
result = await client.verify("Check this")Go
import "github.com/palveron/sdk-go"
client := palveron.NewClient(os.Getenv("PALVERON_API_KEY"),
// palveron.WithBaseURL("https://gateway.internal:8080"), // on-prem
)
result, err := client.Verify(ctx, &palveron.VerifyRequest{
Prompt: userInput,
})
if err != nil {
log.Fatal(err)
}
if result.IsBlocked() {
log.Fatal(result.Reason)
}
// With file
result, err = client.VerifyFile(ctx, "Analyze this", "/path/to/doc.pdf")Java
var client = Palveron.builder(System.getenv("PALVERON_API_KEY"))
// .baseUrl("https://gateway.internal:8080") // on-prem
.build();
var result = client.verify("Check this prompt");
if (result.isBlocked()) {
throw new SecurityException(result.reason());
}
// With file
var fileResult = client.verifyFile("Analyze this", Path.of("report.pdf"));Framework adapters
Use a framework adapter when your code is built on top of an AI framework. The adapter hooks into the framework's lifecycle so you don't have to add explicit verify calls. All adapters share the same api_key / base_url / fail_open / metadata config and the same Sprint-87 decision semantics (BLOCKED, PENDING_APPROVAL, RATE_LIMITED all halt; MODIFIED and FLAGGED log and pass).
| Adapter | Package | Hooks into |
|---|---|---|
| LangChain | pip install palveron-langchain | BaseCallbackHandler — every LLM call, tool call, and chain run |
| CrewAI | pip install palveron-crewai | Task.guardrail + Crew.step_callback |
| OpenAI Agents | pip install palveron-openai-agents | Input + output guardrails (GuardrailTripwireTriggered) |
| Google ADK | pip install palveron-google-adk | before_model_callback + before_tool_callback + after_tool_callback; multimodal & A2A-aware |
| Pydantic AI | pip install palveron-pydantic-ai | Typed PalveronDeps for RunContext[PalveronDeps] + structured-output validator |
| LlamaIndex | pip install palveron-llamaindex | CallbackHandler + per-chunk PII detection on every retrieved RAG node |
| Microsoft AGT | pip install palveron-agt | Two-way policy/evidence bridge with the Microsoft Agent Governance Toolkit |
# LangChain example
from palveron_langchain import PalveronCallbackHandler
from langchain_openai import ChatOpenAI
handler = PalveronCallbackHandler(api_key="pv_live_...")
llm = ChatOpenAI(model="gpt-4o", callbacks=[handler])
result = llm.invoke("Summarize the customer record for John Doe, [email protected]")
# → PalveronGovernanceError: Blocked — PII detected (email address)See the per-framework guides for hooks, configuration, and error handling: LangChain, CrewAI, OpenAI Agents, Google ADK, Pydantic AI, LlamaIndex, and Microsoft AGT.
Specialised tool — Flare AI Kit
For agents built on flare-ai-kit, Palveron also ships an explicit governance tool. Unlike the Google ADK adapter, this one is not wired via callbacks — the agent calls it as a regular ADK FunctionTool when content needs to be verified (before signing a SparkDEX swap, before posting to X, before forwarding an A2A message).
| Tool | Package | Pattern |
|---|---|---|
| palveron-adk-tool | pip install palveron-adk-tool | Explicit ADK FunctionTool — agent invokes during reasoning; complements the Google ADK callback adapter |
See the Flare AI Kit integration guide for architecture, use cases (DeFi, social, RAG, FDC), and Coston2 / Flare mainnet attestation.
Automation, no-code & extensions
| Channel | Install | Purpose |
|---|---|---|
| MCP server | npm install -g @palveron/mcp-server | Govern tool calls made by coding agents (Cursor, Windsurf, Claude Code) |
| n8n node | n8n-nodes-palveron (community node) | Drop-in Verify / Trace lookup / Agent status nodes for n8n workflows |
| Browser Guard | Chrome Web Store | Govern ChatGPT, Claude, Copilot & 47 more AI apps directly in the browser; Shadow-AI discovery |
| Make.com | No install (HTTP module) | Pre-built Verify scenario for any Make.com workflow — route on decision |
# MCP server — point your coding agent at this URL
npx @palveron/mcp-server --api-key pv_live_...
# n8n — install via n8n's Community Nodes UISee the per-channel guides: MCP setup, n8n integration, Browser Guard installation, and Make.com integration.
Configuration (every SDK)
All SDKs accept the same configuration:
| Option | Default | Description |
|---|---|---|
apiKey | required | Your project API key (pv_live_...) |
baseUrl | https://gateway.palveron.com | Gateway URL. Set when self-hosting. |
timeout | 30s | Request timeout |
maxRetries | 3 | Retries on transient errors (5xx, timeout) |
retryBaseDelay | 500ms | Base delay for exponential backoff |
circuitBreakerThreshold | 5 | Consecutive failures before the circuit opens |
circuitBreakerCooldown | 30s | Time until the circuit transitions to half-open |
headers | {} | Custom headers on every request |
Error handling
All SDKs throw / return typed structured errors:
| Error | Status | Retryable | Description |
|---|---|---|---|
AuthenticationError | 401 | No | Invalid or expired API key |
RateLimitError | 429 | Yes | Quota or RPM limit; contains retryAfterMs |
ValidationError | 400 | No | Malformed request |
TimeoutError | 408 | Yes | Gateway didn't respond in time |
CircuitOpenError | 503 | No | Too many consecutive failures; wait for cooldown |
Retryable errors are handled by the SDK with exponential backoff and jitter up to maxRetries. You only see the error if every attempt is exhausted.
Multi-modal attachments
All SDKs accept files alongside prompts — see the Multi-Modal guide.
const result = await palveron.verifyWithFile('Analyze this', './photo.jpg');MCP / agentic context
When verifying requests originating from tool-calling agents or MCP servers, include the context:
const result = await palveron.verify({
prompt: agentOutput,
context: {
mcpServer: 'https://mcp.salesforce.com/sse',
toolName: 'query_contacts',
chainDepth: 2,
sourceSystem: 'cursor-ide',
},
});Health check
const health = await palveron.health();
// { status: 'healthy', version: '1.0.0', uptime: 86400 }Source code
All packages are open source (MIT):
Core SDKs:
Framework adapters:
Specialised tools:
Automation, no-code & extensions: