PalveronPalveronDocs

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/sdk

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

Python

pip install palveron-sdk

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

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 ADKpip install palveron-google-adkbefore_model_callback + before_tool_callback + after_tool_callback; multimodal & A2A-aware
Pydantic AIpip install palveron-pydantic-aiTyped PalveronDeps for RunContext[PalveronDeps] + structured-output validator
LlamaIndexpip install palveron-llamaindexCallbackHandler + per-chunk PII 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 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).

ToolPackagePattern
palveron-adk-toolpip install palveron-adk-toolExplicit 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

ChannelInstallPurpose
MCP servernpm install -g @palveron/mcp-serverGovern 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 GuardChrome Web StoreGovern ChatGPT, Claude, Copilot & 47 more AI apps directly in the browser; Shadow-AI discovery
Make.comNo 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 UI

See the per-channel guides: MCP setup, n8n integration, Browser Guard installation, 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
AuthenticationError401NoInvalid or expired API key
RateLimitError429YesQuota or RPM limit; contains retryAfterMs
ValidationError400NoMalformed request
TimeoutError408YesGateway didn't respond in time
CircuitOpenError503NoToo 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:

On this page