PalveronPalveronDocs

Official SDKs

Install an SDK and verify AI requests in three lines of code. Core SDKs and framework adapters.

Palveron develops 14 official packages: four core SDKs, seven framework adapters, one Flare-AI-Kit FunctionTool, and two automation tools, plus a no-install Make.com HTTP integration. Some packages are not yet published; this is noted for each one below. The core SDKs include retries, a circuit breaker, and typed errors; the framework adapters, palveron-adk-tool, and the MCP server get this from the respective SDK. Pick the package 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/sdk

Zero dependencies. Works on Node.js 18+, Deno, Bun, and edge runtimes (Cloudflare Workers, Vercel Edge).

Python

pip install palveron-sdk

Python 3.8+. Sync and async clients. Fully typed (PEP 561).

Go

go get github.com/palveron/[email protected]

Zero dependencies (stdlib only). Go 1.21+.

Java

The Java SDK is not yet published to a package registry. No dependencies beyond the JDK (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 decision semantics (BLOCKED and PENDING_APPROVAL halt, as do rate-limit errors; MODIFIED and FLAGGED log and pass). If a FLAGGED prompt carries detected personal data or credentials, they are passed on masked (verdict ANONYMIZED or REDACTED); the marking rule stays recorded as an observed policy on the trace.

AdapterPackageHooks into
LangChainpip install palveron-langchainBaseCallbackHandler: every LLM call, tool call, and chain run
CrewAIpip install palveron-crewaiTask.guardrail + Crew.step_callback
OpenAI Agentspip install palveron-openai-agentsInput + output guardrails (GuardrailTripwireTriggered)
Google ADKpalveron-google-adk, not yet published to PyPIbefore_model_callback + before_tool_callback + after_tool_callback; multimodal & A2A-aware
Pydantic AIpalveron-pydantic-ai, not yet published to PyPITyped PalveronDeps for RunContext[PalveronDeps] + structured-output validator
LlamaIndexpalveron-llamaindex, not yet published to PyPICallbackHandler + per-chunk personal-data detection on every retrieved RAG node
Microsoft AGTpip install palveron-agtTwo-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 [email protected]")
# → decision ANONYMIZED: "Personal data was detected in this request and protected before it
#   was passed on. Anonymized: Email address (1)." The call proceeds.

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).

ToolPackagePattern
palveron-adk-toolpalveron-adk-tool, not yet published to PyPIExplicit 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 Flare attestation (Coston2).

Automation, no-code & extensions

ChannelInstallPurpose
MCP servernpm install -g @palveron/mcp-serverAdvisory checks for tool calls made by coding agents (Cursor, Windsurf, Claude Code)
n8n noden8n-nodes-palveron (community node)Drop-in Verify / Trace lookup / Agent status nodes for n8n workflows
Browser GuardAs a package from Palveron for Chrome and Edge; store entries follow after approvalChecks prompts and files in AI chats in the browser before sending; see Browser Guard
Make.comNo install (HTTP module)Pre-built Verify scenario for any Make.com workflow, routing on decision
# MCP server: advisory stdio server; add it to your coding agent's MCP config
PALVERON_API_KEY=pv_live_... npx palveron-mcp

# n8n: install via n8n's Community Nodes UI

See the per-channel guides: MCP setup, n8n integration, and Make.com integration.


Configuration (every SDK)

All SDKs accept the same configuration:

OptionDefaultDescription
apiKeyrequiredYour project API key (pv_live_...)
baseUrlhttps://gateway.palveron.comGateway URL. Set when self-hosting.
timeout30sRequest timeout
maxRetries3Retries on transient errors (5xx, timeout)
retryBaseDelay500msBase delay for exponential backoff
circuitBreakerThreshold5Consecutive failures before the circuit opens
circuitBreakerCooldown30sTime until the circuit transitions to half-open
headers{}Custom headers on every request

Error handling

All SDKs throw / return typed structured errors:

ErrorStatusRetryableDescription
PalveronAuthenticationError401NoInvalid or expired API key
PalveronRateLimitError429NoQuota or RPM limit; the SDK does not retry 429, honour retryAfterMs
PalveronValidationError400NoMalformed request
PalveronTimeoutError408YesGateway didn't respond in time
PalveronCircuitOpenError503NoToo 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

// Calls the gateway's public GET /health liveness endpoint
const health = await palveron.health();
// { status: 'healthy', version: '1.0.0', uptime_seconds: 86400, startup_count: 3 }

Source code

All packages are open source (MIT):

Core SDKs:

Framework adapters:

Specialised tools:

Automation, no-code & extensions:

On this page