APAPORT

Developer Docs

Everything you need to build controlled, auditable AI agents.
Integrate in minutes, not days.

Quick Start

Integration Examples

Copy the path that matches your runtime. APort checks the action before execution and records the decision.

Shell

Claude Code Guardrails

Create or select a hosted passport and install the Claude Code hook.

Claude Code Guardrails
npx @aporthq/aport-agent-guardrails claude-code

# or:
curl -fsSL https://aport.io/install.sh | bash -s -- claude-code
Shell

Cursor Guardrails

Install Cursor hook wiring with hosted or local passport mode.

Cursor Guardrails
npx @aporthq/aport-agent-guardrails cursor

# The installer writes Cursor hook config and APort mode settings.
YAML

GitHub Repository Guard

Use GitHub OIDC and the public APort action; no broad APort API key in workflow secrets.

GitHub Repository Guard
permissions:
  contents: read
  pull-requests: read
  id-token: write

steps:
  - uses: actions/checkout@v4
  - uses: aporthq/policy-verify-action@v1
    with:
      mode: auto
JavaScript

MCP Tool Policy

Call the hosted verifier before an MCP tool executes.

MCP Tool Policy
const decision = await aport.verify("mcp.tool.execute.v1", {
  agent_id: "ap_xxx",
  mcp_server: "https://mcp.stripe.example",
  mcp_tool: "stripe.refunds.create"
});

if (!decision.allow) {
  throw new Error(decision.reasons[0].message);
}

Core Features

Three Authentication Methods

Choose the right auth method for your use case

No Auth

Public verification endpoints

/api/verify/*

API Keys

Server-to-server access

Bearer apk_...

JWT Tokens

User sessions & interactive

Bearer eyJ0...
APAPORT?

Need Help Getting Started?

Our team is here to help you integrate APort into your application.