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

GitHub Repository Guard

Create the Repository Guard workflow with GitHub OIDC and no broad APort API key in workflow secrets.

GitHub Repository Guard
npx @aporthq/aport-agent-guardrails github
Shell

Claude Code Guardrails

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

Claude Code Guardrails
npx @aporthq/aport-agent-guardrails 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.
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.