Overview How It Works Security Integrations Wave Classification Shadow Mode API Reference Credential Portability Scoring Independence Detection Hierarchy

Technical Documentation

Everything you need to understand how Surfit works, how your credentials are protected, and how to connect your systems.

Surfit is the decision layer for AI agent actions. It sits between your agents and the systems they act on — evaluating every action in business context before it reaches any system.

Your agent proposes an action. Surfit evaluates it. Low-risk actions execute automatically. High-risk actions are held for review. Everything gets a tamper-evident receipt.

Surfit is not an orchestrator (it doesn't decide what agents should do), not a guardrail (it doesn't filter model outputs), and not a permissions layer (it doesn't manage who can access what). Surfit decides whether a specific action should happen right now, in this context, with these consequences.

The stack:

Layer 1: Model — make agents smart (Guardrails AI, CTGT, NeMo)

Layer 2: Runtime — make agents safe (IronCurtain, Cisco, CrowdStrike)

Layer 3: Decision — make agents correct (Surfit)

Layer 4: Systems — where agents act (Slack, GitHub, AWS, X, etc.)

How Surfit Works

From agent action to execution in seconds.

Agent proposes action Surfit API (ingest) Wave Engine evaluates System risk · Action type · Destination · Context → Wave Score (1-5) Wave 1-3: Auto-execute Logged + receipt Wave 4-5: Hold Dashboard notification → Review → System (Slack, GitHub, etc.) Approve → Execute | Reject → Block

Every action follows the same path:

  1. Your agent calls Surfit's API instead of calling the target system directly. One line change — replace the system API URL with Surfit's ingest endpoint.
  2. Surfit's Wave engine evaluates the action. Risk is computed from four factors: the system being targeted, the action type, the destination sensitivity, and the current context.
  3. Low-risk actions (Wave 1-3) execute automatically. Your agent doesn't slow down. The action is logged with a tamper-evident receipt.
  4. High-risk actions (Wave 4-5) are held. The designated reviewer gets notified. They review the action in the dashboard and approve or reject. On approval, Surfit executes the action.
  5. Every action gets a hash-chained receipt with full context: what happened, why, when, who authorized it, and cryptographic proof of integrity.

Key point: The agent never controls execution directly. Surfit controls the execution path. The agent cannot bypass Surfit because it doesn't have direct access to system credentials.

Security Architecture

How Surfit protects your credentials and your systems.

Credential Management

Surfit uses a split-authority model. Your credentials are encrypted and managed by Surfit — whether stored in Surfit's credential store or integrated with your own vault. The agent never has access to them.

  • AES-256 encryption with per-tenant derived keys
  • Master encryption key stored as an environment variable, never in code or database
  • Per-tenant key derivation via HKDF — compromising one tenant's data does not expose another's credentials
  • Credentials decrypted ONLY at execution time, inside the function that makes the API call, and immediately discarded after use
  • Credentials never appear in logs, dashboards, API responses, or error messages

Audit Trail

Every credential access and every action execution is recorded in a hash-chained, append-only audit log.

  • Each log entry contains the hash of the previous entry
  • Any modification to the log breaks the chain and is cryptographically detectable
  • Log entries record: which credential, which tenant, which action, what time, what outcome
  • Audit chain integrity can be verified at any time

Access Control

  • Operator 2FA (TOTP) required for all administrative write operations
  • Per-tenant isolation — customers can only access their own data
  • Customers can view credential metadata (connected systems, last used, access count) but never the credential values

Revocation

  • Instant credential revocation — hard delete, not soft delete
  • When a customer disconnects a system, the encrypted credential is permanently removed
  • Credential rotation tracking with 90-day warnings

Emergency Controls

Global Kill Switch: Halts all execution across all tenants immediately. One command stops everything. No new actions execute until manually re-enabled.

Shadow Mode: Per-tenant evaluate-only mode. Surfit processes every action but executes nothing. Full visibility, zero risk. Learn more →

Incident Response

  • Documented incident response plan with severity levels
  • P1 (credential exposure): Kill switch activated, affected credentials revoked, customers notified within 4 hours
  • Forensic audit via hash-chained logs to determine scope of any incident

Compliance Direction

Surfit's architecture is designed toward SOC 2 Type II compliance:

  • Encryption at rest (CC6.1)
  • Access controls (CC6.2, CC6.3)
  • Audit logging (CC7.1, CC7.2)
  • Incident response (CC7.3, CC7.4)

We are not SOC 2 certified yet. Our architecture follows its control requirements.

Supported Integrations

Connect your agents to the systems they already use.

Slack — Full execution

Slash commands, channel monitoring, bot posting. Classification by channel type, sensitivity, visibility. Auto-execute for routine team posts, hold for announcements.

POST /api/v1/ingest/slack

GitHub — Evaluation + classification

Webhook integration for PR events. Classification by target branch and repo sensitivity. PRs to main/production held. Feature branch PRs auto-logged.

POST /api/v1/ingest/github (webhook)

X — Full execution

OAuth 1.0a posting via encrypted credentials. Classification by content risk (keywords, URLs, length). Trusted agent sources score lower for routine posts.

POST /api/v1/ingest/x

Notion — Evaluation + classification

Page and database action governance. Classification by action type and target sensitivity. Creates auto-execute, deletes on sensitive pages held.

POST /api/v1/ingest/notion

Gmail — Evaluation + classification

Email governance by recipient and content sensitivity. Internal emails auto-send, external with sensitive content held.

POST /api/v1/ingest/gmail

Outlook — Evaluation + classification

Same classification as Gmail plus calendar governance. Meeting scheduling, email sending, forwarding.

POST /api/v1/ingest/outlook

AWS — Evaluation + classification

Infrastructure action governance. IAM modifications and resource deletions always held. Lambda deploys and S3 updates auto-logged. Production region detection.

POST /api/v1/ingest/aws

Wave Classification System

How Surfit scores risk and makes decisions.

Every action receives a Wave score from 1 to 5. The score determines whether the action executes automatically or requires review.

WaveLevelHandlingExample
1AutonomousExecute immediately, loggedAgent posts status update to #eng-platform
2LoggedExecute with enhanced loggingAgent creates a Notion page for sprint planning
3CheckedExecute after context evaluationAgent deploys Lambda function to staging
4Review RequiredHeld for reviewAgent opens PR targeting main on payments repo
5CriticalEscalated reviewAgent attempts to modify IAM permissions in production

How Risk Is Computed

Wave = System Baseline + Action Modifier + Destination Modifier + Context Modifiers

1. System Baseline

Each system has a base risk level: Slack = 1, GitHub = 2, X = 2, Gmail = 2, AWS = 3

2. Action Modifier

Specific actions add or subtract risk: post_message = +0, merge_pr = +1, modify_iam = +2, draft_email = -1

3. Destination Modifier

Where the action targets matters: team channel = +0, company announcement = +2, production branch = +2

4. Context Modifiers

Environmental factors: external visibility = +2, sensitive data = +1, irreversible = +1, financial impact = +2

The final score is clamped to 1-5. Every decision is deterministic and explainable. Every receipt includes the full breakdown of factors.

Shadow Mode

Full evaluation, zero execution. See every decision before going live.

Shadow mode lets you connect a system to Surfit and watch it evaluate your agent's actions — without Surfit executing anything.

How It Works

  1. Connect your system normally (provide credentials, configure agent)
  2. Shadow mode is enabled for your tenant
  3. Your agent sends actions to Surfit as usual
  4. Surfit evaluates every action through the full Wave engine
  5. Instead of executing, Surfit logs what it would have done
  6. You see in your dashboard: "Wave 2 — would have auto-executed" or "Wave 5 — would have held"

What You See

  • Every action your agent takes, classified and scored
  • The exact wave level and decision Surfit would make
  • Full context: why this wave, what factors contributed
  • Zero impact on your systems — nothing executes

Going Live

When you're comfortable with Surfit's decisions, shadow mode is disabled. Same architecture, same evaluation, same policies — now Surfit executes. No configuration change needed. Just flip the switch.

Why this matters: Shadow mode eliminates the trust leap. You don't have to believe us — you watch the product make decisions on your real workflow, verify it's correct, and then go live when you're ready.

API Reference

Integrate your agent in minutes.

Authentication

All requests include a customer ID header:

X-Customer-ID: your-customer-id

Base URL

https://your-tenant.surfit.ai/api/v1

Core Endpoints

Health Check

Request
GET /api/v1/health
Response
{"status": "healthy", "version": "3.1.1", "customer_id": "..."}

Ingest Action (per system)

POST /api/v1/ingest/slack POST /api/v1/ingest/github POST /api/v1/ingest/x POST /api/v1/ingest/notion POST /api/v1/ingest/gmail POST /api/v1/ingest/outlook POST /api/v1/ingest/aws

Example: Slack

Request
POST /api/v1/ingest/slack Content-Type: application/json X-Customer-ID: acme { "channel": "eng-platform", "action": "post_message", "content": "Deployment v3.1 rolled out to staging", "user": "deploy-bot" }
Response
{ "id": "slack-a1b2c3d4", "wave": 2, "decision": "log", "action": "post_message", "system": "slack" }

Example: X

Request
POST /api/v1/ingest/x Content-Type: application/json X-Customer-ID: acme { "content": "Post text here", "actor_id": "marketing-agent", "source": "openclaw_agent" }

Governance Evaluate

Request
POST /api/v1/governance/evaluate { "system": "github", "action": "merge_pr", "destination": "main", "content": "Merge payments refactor", "context": {"visibility": "company_wide"} }

Pending Actions

GET /api/v1/pending — List pending actions POST /api/v1/pending/{action_id}/approve — Approve action POST /api/v1/pending/{action_id}/reject — Reject action

Status & Credentials

GET /api/v1/actions — List recent actions GET /api/v1/execution-status — Execution state (live/shadow/killed) GET /api/v1/credentials — Connected systems (metadata only) GET /api/v1/credentials/rotation-warnings — Credentials older than 90 days POST /api/v1/credentials/revoke — Revoke system credentials

Integration Examples

Python
import requests SURFIT = "https://acme.surfit.ai/api/v1" HEADERS = {"Content-Type": "application/json", "X-Customer-ID": "acme"} def surfit_action(system, payload): resp = requests.post(f"{SURFIT}/ingest/{system}", headers=HEADERS, json=payload) result = resp.json() if result["decision"] == "approve": return {"status": "held", "wave": result["wave"]} return {"status": "executed", "wave": result["wave"]}
JavaScript
const SURFIT = "https://acme.surfit.ai/api/v1"; const HEADERS = {"Content-Type": "application/json", "X-Customer-ID": "acme"}; async function surfitAction(system, payload) { const res = await fetch(`${SURFIT}/ingest/${system}`, { method: "POST", headers: HEADERS, body: JSON.stringify(payload) }); return await res.json(); }
curl
curl -X POST https://acme.surfit.ai/api/v1/ingest/slack \ -H "Content-Type: application/json" \ -H "X-Customer-ID: acme" \ -d '{"channel": "general", "action": "post_message", "content": "Hello"}'

Credential Portability

How to migrate on or off Surfit

No Vendor Lock-in

Surfit holds your system credentials in an AES-256 encrypted store with per-tenant key derivation. However, Surfit is designed so that migrating off is straightforward.

Moving Off Surfit

If you decide to stop using Surfit, the migration path is simple:

  • Agent code change: Replace the Surfit ingest endpoint URL with the target system's native API URL. This is one line per system in your agent code.
  • Credentials: Re-enter your system credentials directly in your agent or secret manager. Surfit does not export credentials (by design), so you rotate or re-enter them.
  • Data export: Download your compliance reports and audit trails before termination. These are available via the compliance report API endpoint.

Your agents construct native API payloads — Surfit does not abstract or normalize the payload format. The agent's integration logic remains the same whether Surfit is in the path or not.

Credential Revocation

You can revoke any credential at any time through the dashboard or API. Revocation is immediate and permanent — hard delete, not soft delete. The encrypted data is purged from the database, not flagged as inactive.

Key point: Surfit is an execution boundary, not an abstraction layer. Your agent code speaks native system APIs. Surfit evaluates and executes — removing Surfit means your agent calls the system directly instead of through Surfit. The integration logic doesn't change.

Scoring Independence

How Wave scoring, trust scores, and anomaly detection relate

Wave Scoring is Deterministic and Independent

The Wave engine scores every action using a deterministic formula:

Wave = System Baseline + Action Modifier + Destination Modifier + Context Modifiers (clamped 1-5)

This score is computed from the action's metadata — system, action type, destination, and context. It does not use an LLM, does not call an external API, and does not perform inference. The scoring is pure arithmetic.

Trust Scores Do Not Influence Wave Classification

Agent trust scores track an agent's historical behavior — approval rate, longevity, action volume, rejection rate. A high trust score means the agent has been reliable over time.

However, trust scores never lower the Wave classification of an action. A trusted agent with a score of 95 still receives Wave 5 on modify_iam in production. Wave 5 is Wave 5 regardless of who the agent is.

Trust scores affect:

  • Budget gates: Higher trust may allow higher daily action limits
  • Session thresholds: Trusted agents may have more lenient rate limits

Trust scores do not affect:

  • Wave score calculation
  • Whether an action is held for approval
  • The handling decision (auto/log/check/approve)

Why this matters: This prevents "long con" attacks where an agent builds trust over time and then uses that trust to bypass governance on a high-risk action. The deterministic boundary is never softened by behavioral history.

Detection Hierarchy

How individual scoring, anomaly detection, and correlation rules work together

Three Layers of Evaluation

Surfit evaluates agent behavior at three levels. These layers are hierarchical — they escalate, they do not compete.

Layer 1: Wave Scoring (Per Action)

Every individual action receives a deterministic Wave score. This is the primary evaluation. Actions scoring Wave 1-3 auto-execute. Wave 4-5 actions are held for operator review.

Layer 2: Anomaly Detection (Per Agent)

Surfit monitors agent behavior patterns over time. Anomaly detection flags:

  • Burst activity: Agent performing significantly more actions than its baseline
  • Unusual hours: Agent active outside its normal operating window
  • Cross-system spread: Agent suddenly touching systems it hasn't used before
  • High rejection rate: Agent repeatedly proposing actions that get rejected

When an anomaly is detected, it surfaces as an alert to the operator. It does not automatically block actions. The Wave engine continues to score normally — the anomaly detection provides additional context for the operator's decision.

Layer 3: Cross-System Correlation (Pattern Detection)

Correlation rules detect patterns that span multiple systems. Individual actions may each look safe, but the pattern reveals intent. For example: an agent merges a PR (GitHub), then modifies IAM permissions (AWS), then sends an external email (Gmail) — each action may be Wave 2-3 individually, but the cross-system pattern triggers an escalation.

When a correlation rule fires, the involved actions are escalated to the rule's configured Wave level regardless of their individual scores.

No governance deadlock: These layers do not compete. Wave scoring evaluates individual actions. Anomaly detection surfaces patterns to the operator. Correlation rules escalate specific cross-system sequences. The operator always has final authority — Surfit surfaces information, operators make decisions.