Documentation · HTTP API

Connect your agent. Understand every decision.

Start with an API key and one request—no installation required. Send an intended action and evidence, receive a policy decision, and decide how your integration handles it.

Decision boundary: AgentGuard reports an operational result from your configured policy and the evidence supplied to it. It does not grant a license, determine legal rights, or replace legal review.

One policy per workflow

In My policies, create or duplicate a named policy. Select a workflow and context, tailor its restrictions, save and run synthetic scenarios, then approve and publish the exact tested revision. Templates are operational starting points, not compliance certifications. The verified workspace owner is the approver; two-person review is not implemented.

Publication does not change running integrations. Explicitly assign a published revision to an API key. The key can use only its assigned revision, or the workspace baseline when unassigned. Named policies retain all workspace baseline restrictions. If that baseline changes, older assignments stop resolving until you re-test, publish and assign a new revision.

curl --fail-with-body 'https://agentguard-web-production.up.railway.app/api/v1/policies/current' -H "Authorization: Bearer $AGENTGUARD_API_KEY"

Read the assigned revision with that same key. Pin its revision ID in your adapter. Direct HTTP checks may omit policyRevisionId to use the server assignment; specifying a different revision is rejected. For rollback, explicitly reassign an older approved revision compatible with the current baseline. Previously completed idempotent requests retain their original decision and revision; re-evaluate with a new idempotency key when you need a new decision.

Activity shows the latest 50 unexpired checks. Filter by named policy across revisions, by individual revision or by decision, then download the matching rows as CSV. It is not a full-history export. Source URLs remain represented by resource digests. CSV cells are escaped and spreadsheet formula prefixes are neutralized.

Drafts and approval history are retained separately from the short decision-history window. Structured questionnaire import is supported; AI document interpretation, trusted entitlement collection, automatic deletion and legal review are not supplied by this workflow.

01 · Quickstart

Make your first API request

No SDK or package download is required. Create an account, approve the evaluation policy and create an API key. Store the key on your server as AGENTGUARD_API_KEY; never put it in a prompt, URL or public browser code.

Shell · connection testGET /api/v1/usage
curl --fail-with-body 'https://agentguard-web-production.up.railway.app/api/v1/usage' -H "Authorization: Bearer $AGENTGUARD_API_KEY"

A successful response shows your quota and remaining checks. This read does not consume a policy check.

Next: evaluate an intended action

Submit the proposed URL, intended use and normalized evidence. The service loads your account’s approved policy and returns a decision with reasons. Missing evidence goes to review; the evaluation policy does not issue permission to retrieve.

Use the API playground to test a synthetic request, inspect your policy and download decision records without installing software. Its key stays in page memory only.

Current pilot endpoint. It evaluates supplied normalized evidence and never fetches the resource URL.

Generate a unique request ID, for example with AGENTGUARD_REQUEST_ID=$(uuidgen). Keep it paired with the exact request if a timeout leaves completion uncertain. Repeating that pair returns the recorded result without consuming another check; a changed request needs a new ID.

The timestamps below are illustrative. Replace them with the actual observation and bounded freshness window; stale example evidence will correctly return REVIEW.

ShellPOST /api/v1/checks
curl -X POST https://agentguard-web-production.up.railway.app/api/v1/checks \
  -H "Authorization: Bearer $AGENTGUARD_API_KEY" \
  -H "Idempotency-Key: $AGENTGUARD_REQUEST_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "schema": "agentguard.evaluation.v1",
    "stage": "ACQUISITION",
    "resourceUrl": "https://publisher.example/story",
    "agent": { "id": "research-crawler-prod" },
    "intendedUse": {
      "purposes": ["AI_INPUT"],
      "retentionSeconds": 2592000,
      "outputs": ["SUMMARY"],
      "redistribution": false,
      "audience": "INTERNAL",
      "attributionSupported": true
    },
    "identityAssurance": "SELF_DECLARED",
    "evidence": [{
      "id": "ev_fixture_1",
      "type": "ROBOTS_TXT",
      "basis": "CUSTOMER_ATTESTED",
      "subject": {
        "resourceUrl": "https://publisher.example/story",
        "agentId": "research-crawler-prod"
      },
      "collectionVantage": "CUSTOMER_RUNTIME",
      "observationState": "OBSERVED",
      "observedAt": "2026-09-04T19:45:00Z",
      "freshUntil": "2026-09-04T20:15:00Z",
      "expiresAt": "2026-09-04T20:45:00Z",
      "digest": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
      "claims": [{ "kind": "ACQUISITION", "effect": "ALLOW" }],
      "parser": { "name": "fixture", "version": "1.0.0" }
    }],
    "entitlements": [],
    "policyRevisionId": "replace-with-your-provisioned-policy-revision"
  }'
Account and records

Inspect the policy, usage and recorded decisions

Every /api/v1 route below requires a tenant-scoped bearer key. Verified account owners can create a workspace and manage keys in their account page. Publishing a production policy remains a separately approved workflow; integration keys cannot publish policies.

GET /api/v1/policies/currentchecks:read or checks:write

Returns your account, credential scopes and current approved policy revision.

GET /api/v1/usageusage:read

Returns this month's used, limit and remaining checks. Optional month=YYYY-MM selects a historical month.

GET /api/v1/checkschecks:read

Returns your decision records with an opaque nextCursor. Use limit and cursor to paginate.

GET /api/v1/checks/:idchecks:read

Returns one retained decision record owned by your tenant.

GET /api/v1/checks/exportexports:read

Downloads NDJSON for from inclusive and to exclusive UTC timestamps. Maximum 31 days and 10,000 records; larger exports return 413.

Stored records omit raw resource URLs and evidence claims, retaining digests and decision metadata. They support pilot review, but cannot independently prove a source observation. An idempotency replay can be historical and expired; inspect validUntil before treating any result as current.

Thin TypeScript and Python clients, tests and synthetic replay examples are included in the onboarding package. They reject invalid or expired allow responses, preserve an explicit idempotency key and make no automatic retries.

02 · Request model

Declare what the agent intends to do

A URL alone is not enough to evaluate policy. The same resource can resolve differently for search, summarization, extraction, training or redistribution.

schemarequired

Must be agentguard.evaluation.v1; unknown properties are rejected.

stagerequired

ACQUISITION before retrieval, or RESPONSE_USE for attached response evidence.

resourceUrlrequired

An absolute HTTP(S) URL used for matching only. The API does not request it.

agentrequired

A caller-declared agent identifier. The pilot records this claim but does not independently verify identity.

intendedUserequired

Purpose, retention, output, audience, attribution capability and redistribution.

evidencerequired

Normalized, time-bounded, caller-attested claims tied to a resource, agent and collection vantage, with a digest and parser version.

entitlementsrequired

Caller-supplied entitlement references scoped by agent, domain, purpose, output and time. The pilot accepts them only as unverified or revoked; they cannot satisfy a verified-entitlement rule.

policyRevisionIdrecommended

The immutable, server-stored revision assigned to your tenant. Omitting it uses the current approved revision. Pin its ID for reproducible integration; callers cannot substitute a different policy or another tenant's revision.

03 · Response model

Act on the effect—not the transport status

A completed deny is returned with HTTP 200 because evaluation succeeded. Decision and enforcement fields are customer-policy outputs—not statements of legal rights. Transport failure is never permission to proceed.

JSON · selected fieldsapplication/json
{
  "schema": "agentguard.decision.v1",
  "checkId": "00000000-0000-4000-8000-000000000001",
  "decisionScope": "CUSTOMER_CONFIGURED_POLICY",
  "notLegalAdvice": true,
  "receiptState": "NOT_ISSUED",
  "evaluatorVersion": "agentguard-policy-engine/0.1.0",
  "stage": "ACQUISITION",
  "decision": "PROCEED",
  "enforcement": "ALLOW",
  "reasonCodes": ["ACQUISITION_ALLOWED", "EVIDENCE_COMPLETE"],
  "constraints": {},
  "assurance": {
    "evidenceCompleteness": "COMPLETE",
    "freshness": "FRESH",
    "conflictState": "NONE",
    "identityAssurance": "SELF_DECLARED"
  },
  "consideredEvidenceIds": ["ev_fixture_1"],
  "policy": { "revisionId": "policy_018", "version": 1 },
  "evaluatedAt": "2026-09-04T20:00:00.000Z",
  "validUntil": "2026-09-04T20:15:00.000Z"
}
04 · Source handling

Current evaluation versus planned collection

AgentGuard evaluates bounded, caller-attested evidence supplied in the request. Successful checks are stored in your tenant's decision history and can be exported with their policy revision and supplied evidence references. Records are unsigned: receiptState: NOT_ISSUED remains explicit. No source collection or source cache exists.

NOWCaller-supplied evidence

No target URL fetch and no full-page storage.

PLANNEDOn-demand signals

Collect relevant published policy signals only when requested.

PLANNEDSelective TTL cache

Reuse customer-relevant domain/path evidence only while fresh.

OPTIONALPre-warmed source pack

Refresh customer-nominated critical domains—not the whole web.

05 · Target two-stage integration

Acquisition first, response use second

This is the production integration roadmap. The current hosted pilot does not fetch or quarantine a target response.

  1. 1
    Request acquisition preflight.

    Send the resource, agent identity and declared use.

  2. 2
    Fetch into quarantine if allowed.

    The customer-side enforcement point observes the delivered response.

  3. 3
    Submit attached evidence.

    Headers and metadata can change or narrow the result.

  4. 4
    Apply the final effect.

    Release, constrain, block or hold for review. A license-required result still needs a customer-configured workflow.

06 · Failure semantics

Fail visibly, according to tenant policy

Never fail open by accident. A timeout, unavailable service or malformed response is a transport condition. The customer must apply its configured fallback; the pilot provides no cached fallback or replacement decision.

200Evaluation complete

Inspect decision and enforcement.

401Authentication failed

No decision was produced.

403 / 404Scope or policy unavailable

Use the scoped key and revision assigned during onboarding.

409 / 410Replay conflict or expired record

An idempotency key belongs to one request while its record is retained. Inspect the error before intentionally creating a new check.

413 / 422Input rejected

Correct the bounded body or schema.

429Rate limit or quota reached

Respect Retry-After. There is no automatic billable retry or decision fallback.

500 / 503Decision unavailable

Apply the tenant fallback.

07 · Signals and limits

Evidence is contextual and time-bound

  • Internet evidence can vary by time, user agent, IP, geography and authentication state.
  • Only evaluation over the exact frozen request, evidence and policy revision is reproducible.
  • The pilot labels evidence basis but does not independently prove the authenticity or legal effect of caller-supplied claims.
  • Robots rules communicate crawler preferences; they are not access authorization.
  • Public usage signals do not prove entitlement; customers remain responsible for validating contract records.
  • AgentGuard records a configured-policy decision, not a legal verdict.

Use-case review and retained-history exports

In your account, open Use case & data to describe your industry, data, intended actions and countries. Saving a profile does not approve production use or change permissions, billing or retention. Do not submit sensitive source records through this form.

Activity offers a CSV of the visible recent rows and a separate retained-history export using the selected decision and policy filters. The latter supports up to 50,000 rows or 25 MB of source records in the browser. Expired records are excluded; records that expire during pagination may be omitted.

For larger exports, the signed-in account endpoint GET /api/portal/activity returns up to 500 records, a snapshot cutoff and a next cursor. Repeat with the unchanged cutoff, optional decision, revision or named policy filter, and the returned before and id values until next is null. Preserve the timestamp exactly, including microseconds. Respect rate limits and do not publish or copy session cookies into an agent.

This endpoint uses your verified login, not an API key. It exports activity, not a complete privacy access response. For data requests or export assistance, contact info@fockeadvisory.com. Data deletion and billing cancellation are separate processes.

NextTry the decision model with frozen evidence.
Open sandbox