Developer Portal

Build with PrivacyCore™

PrivacyCore™ works with any agent framework. Install the SDK, make a few API calls, and your fleet is privacy-preserving.

Quickstart

Install the SDK

Python pip install privacycore
$ pip install privacycore
TypeScript npm install @automa-labs/privacycore
$ npm install @automa-labs/privacycore

Python — Intent Routing

python
from privacycore import PrivacyCoreClient, IntentPayload

client = PrivacyCoreClient(
    api_key="pc_live_xxxxxxxxxxxxxxxx",
    base_url="https://api.privacycore.automa8.ai"
)

# Route an intent — validated, checkpointed, audited
intent = IntentPayload(
    agent_id="healthcare-agent-01",
    action="read_patient_record",
    resources=["patient:record:4521"],
    policy_tags=["hipaa", "phi"],
    context_id="ctx_abc123"
)

result = client.route(intent)
print(f"Allowed: {result.allowed}, Checkpoint: {result.checkpoint_id}")

TypeScript — Intent Routing

typescript
import { PrivacyCoreClient, IntentPayload } from '@automa-labs/privacycore';

const client = new PrivacyCoreClient({
  apiKey: "pc_live_xxxxxxxxxxxxxxxx",
  baseUrl: "https://api.privacycore.automa8.ai",
});

const intent: IntentPayload = {
  agentId: "fintech-agent-01",
  action: "process_transaction",
  resources: ["account:receivable:991"],
  policyTags: ["pci-dss", "financial"],
  contextId: "ctx_xyz789",
  timestamp: Date.now(),
  nonce: crypto.randomBytes(16).toString('hex'),
};

const result = await client.route(intent);
console.log(`Allowed: ${result.allowed}, Context: ${result.contextId}`);

API Reference

POST /api/v1/intents/route

Route an agent intent through the PrivacyCore™ control plane. Returns an execution context or throws on policy rejection.

Request

bash — curl
curl -X POST https://api.privacycore.automa8.ai/api/v1/intents/route \n
  -H "Content-Type: application/json" \n
  -H "Authorization: Bearer pc_live_xxxxxxxxxxxxxxxx" \n
  -d '{
    "agent_id": "healthcare-agent-01",
    "action": "read_patient_record",
    "resources": ["patient:record:4521"],
    "policy_tags": ["hipaa", "phi"],
    "context_id": "ctx_abc123",
    "timestamp": 1716748800000,
    "nonce": "a1b2c3d4e5f6789012345678"
  }'

Response — 200 OK

json
{
  "allowed": true,
  "context_id": "ctx_abc123",
  "checkpoint_id": "chk_9f3a2b1c",
  "execution_engine": "fhe-v2",
  "latency_ms": 42,
  "audit_trail_id": "aud_7e4c8d2a"
}

GET /api/v1/executions/:context_id

Retrieve execution status and results for a given context ID. Includes checkpoint info and recovery state.

bash — curl
curl https://api.privacycore.automa8.ai/api/v1/executions/ctx_abc123 \n
  -H "Authorization: Bearer pc_live_xxxxxxxxxxxxxxxx"

GET /api/v1/audit-trails/:context_id

Retrieve the full SHA3-256 audit trail for an execution. Supports JSON and CSV export formats.

bash — curl
curl https://api.privacycore.automa8.ai/api/v1/audit-trails/ctx_abc123?format=csv \n
  -H "Authorization: Bearer pc_live_xxxxxxxxxxxxxxxx"

Integrations

LC

LangChain

Wrap any LangChain chain with PrivacyCore™ in one callback handler. Intent validation runs before every chain execution.

python
from privacycore.integrations.langchain import PrivacyCoreCallbackHandler
from langchain_openai import ChatOpenAI
from langchain.chains import LLMChain
from langchain.prompts import PromptTemplate

handler = PrivacyCoreCallbackHandler(
    api_key="pc_live_xxxxxxxxxxxxxxxx",
    policy_tags=["hipaa"],
)

llm = ChatOpenAI(model="gpt-4o")
chain = LLMChain(
    llm=llm,
    prompt=PromptTemplate.from_template("Process patient record: {input}"),
    callbacks=[handler]  # PrivacyCore™ validates every call
)

result = chain.run({"input": "Get records for patient ID 4521"})
CA

CrewAI

Each CrewAI agent gets its own PrivacyCore™ execution context. Agents are isolated by default — no cross-contamination.

python
from crewai import Agent, Task, Crew
from privacycore.integrations.crewai import PrivacyCoreCrewAgent

researcher = PrivacyCoreCrewAgent(
    role="Healthcare Researcher",
    goal="Research patient treatment history",
    backstory="Senior clinical data analyst",
    policy_tags=["hipaa", "phi"],
    api_key="pc_live_xxxxxxxxxxxxxxxx",
)

crew = Crew(agents=[researcher], tasks=[...])
crew.kickoff()
AG

AutoGen

Privacy-aware AutoGen agents validate intent before group chat execution. Every agent message is logged to the audit trail.

python
from autogen import ConversableAgent
from privacycore.integrations.autogen import PrivacyCoreAgent

class PrivacyAwareAgent(PrivacyCoreAgent, ConversableAgent):
    def __init__(self, name, policy_tags, api_key):
        PrivacyCoreAgent.__init__(self, api_key=api_key, policy_tags=policy_tags)
        ConversableAgent.__init__(self, name=name, llm_config=...)

    def generate_reply(self, messages, **kwargs):
        intent = self._create_intent_from_messages(messages)
        self._route_intent(intent)  # Blocks until PrivacyCore™ approves
        return super().generate_reply(messages, **kwargs)

Deployment

PrivacyCore™ runs as a cloud API — no self-hosted infrastructure required. Embed the SDK in your agents and connect to our control plane.

Docker (optional — for self-hosted)

docker-compose.yml
services:
  privacycore-gateway:
    image: ghcr.io/automa-labs/privacycore-gateway:latest
    ports:
      - "8080:8080"
    environment:
      PRIVACYCORE_API_KEY: ${PRIVACYCORE_API_KEY}
      PRIVACYCORE_REGION: us-east-1
    restart: unless-stopped

Environment Variables

Variable Description
PRIVACYCORE_API_KEYYour API key (pc_live_... or pc_test_...)
PRIVACYCORE_BASE_URLAPI base URL (defaults to cloud)
PRIVACYCORE_LOG_LEVELdebug | info | warn | error
PRIVACYCORE_CACHE_TTLIntent cache TTL in seconds (default: 300)
View on GitHub → Architecture Docs → Request API Key →