ArkivGate is a policy gateway for AI agents and paid agent runtimes. It sits between the agent and the model/API call, evaluates prompt risk, x402 payment intent, and wallet threat intelligence, then writes auditable evidence to Arkiv.
Live demo: https://arkivgate.vercel.app
Arkiv data explorer: https://data.arkiv.network
ArkivGate protects three execution paths with the same decision vocabulary: PASS, WARN, REDACT, and BLOCK.
-
Prompt security
- Blocks or redacts secrets, production credentials, PII, and organization-specific policy violations.
- Demo example: an AWS-style key plus
.envreference is blocked before reaching the model.
-
x402 paid agent execution
- The playground protects
/api/playground/interceptor-testwith a 402 challenge. - The agent signs a demo x402 payment and retries the request.
- Payment intent is evaluated independently from the prompt: wallet balance, transfer amount, recent behavior, per-transaction cap, and recipient risk.
- The playground protects
-
Wallet threat intelligence
- Recipient addresses are checked against ArkivGate threat reports.
- A flagged approval-drain style recipient can block the execution even when the transfer amount is small.
Every execution can produce Arkiv entities for the paying agent, payment review, prompt review, threat report, threat confirmation, policy, and policy decision.
The public playground shows the x402 handshake, payment policy, prompt policy, and Arkiv threat-intel result in one run.
After the run, ArkivGate shows the persisted entity links and transaction evidence.
Evidence is queryable in Arkiv by project, entity type, severity, action, agent key, and relationship keys.
Example Arkiv query:
Identifies the org and lets the client use ArkivGate as the gateway for prompts, x402 payments, and wallets.
ArkivGate uses Arkiv as the product data layer, not just as a final explorer link.
PROJECT_ATTRIBUTE: every entity is stamped withproject=arkivgate-leocagli-2026.- Typed entities:
agent,agent_profile,policy,payment_review,prompt_review,policy_decision,threat_report, andthreat_confirmation. - Queryable attributes: action, severity, agent key, risk score, recipient address, created time, entity type, and relationship keys.
- Relationships: child entities link through attributes such as
agentEntityKey,paymentReviewKey,promptReviewKey,policyKey, andthreatReportKey. - Ownership split:
- Backend service wallet writes operational evidence for trusted runtime attribution.
- Connected end-user wallet can write
agent_profile, making user-owned data verifiable on Arkiv.
- Differentiated retention: short-lived prompt/payment evidence, longer-lived policy and agent records, and 90-day threat reports that decay if not reinforced.
Theme: AI + Privacy / Security
ArkivGate demonstrates a paid AI-agent control plane:
Agent request
-> x402 payment challenge
-> payment intent policy
-> prompt policy
-> wallet threat-intel check
-> final PASS/WARN/REDACT/BLOCK decision
-> Arkiv evidence graph
Pitch/demo materials:
- PITCH_DEMO.md: 2-3 minute demo script, submission copy, recording checklist.
- CHALLENGE_SCORECARD.md: rubric self-assessment.
ArkivGate currently ships a demo x402 settlement rail:
- The web playground protects
/api/playground/interceptor-test. - The first request returns
402 Payment Required. - The frontend signs a demo
PAYMENT-SIGNATURE. - The route reruns the request and returns
PAYMENT-RESPONSE. - The final decision is persisted to Arkiv when Arkiv is reachable.
This is intentionally demo settlement. It proves the protocol shape and policy loop without moving real funds. A production x402 facilitator can replace the demo verifier while keeping the same policy and evidence model.
The admin panel is designed for security/compliance operators:
- Events: evaluated interactions and decision logs.
- Rules: policy controls and enforcement actions.
- Analytics: action breakdowns and latency.
- Suggestions: policy improvement queue.
- Arkiv: setup status, smoke test, and entity explorer.
- API keys: generate runtime secrets for customer sites, wallets, dApps, and agent clients.
Generated API keys are shown once. Clients can route traffic through:
ANTHROPIC_BASE_URL=https://arkivgate.vercel.app/cli/<secret>web/ Next.js app for public site, playground, API routes, and admin panel
interceptor/ FastAPI service that evaluates and forwards model requests
- Configure environment variables:
web/.env.localinterceptor/.env
- Run the web app:
cd web
pnpm install
pnpm dev- Run the interceptor:
cd interceptor
uv sync
uv run uvicorn app.main:app --host 0.0.0.0 --port 8080 --reloadDATABASE_URL=postgresql://...
AUTH_URL=https://arkivgate.vercel.app
AUTH_SECRET=...
NEXT_PUBLIC_APP_URL=https://arkivgate.vercel.app
DEMO_ORG_ID=demo
ArkivGate_PROXY_URL=https://<railway-interceptor-domain>.up.railway.app
ARKIV_PROJECT=arkivgate-leocagli-2026
ARKIV_CHAIN=braga
ARKIV_AGENT_PRIVATE_KEY=...
ARKIV_BRIDGE_TOKEN=...
SUPABASE_PROJECT_ID=...
SUPABASE_SECRET_KEY=...
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=...DATABASE_URL=postgresql://...
ANTHROPIC_UPSTREAM_URL=https://api.anthropic.com
DEFAULT_ORG_ID=demo
ARKIV_BRIDGE_URL=https://arkivgate.vercel.app/api/internal/arkiv/interactions
ARKIV_BRIDGE_TOKEN=<same-token-as-vercel>
X402_DEMO_ENABLED=trueRailway should expose /health as 200 OK.
With the interceptor running and X402_DEMO_ENABLED=true:
- Unpaid agent call receives
402 Payment Requiredand aPAYMENT-REQUIREDheader. - Caller retries the same resource with
PAYMENT-SIGNATURE. - Successful responses include:
PAYMENT-RESPONSEx-team22-payment-rail: x402-demox-team22-agent-key
The web playground performs this handshake automatically.
Validated behavior as of May 2026:
POST /v1/messagesreturns401with a hint to use ArkivGate setup.POST /cli/<token>/v1/messagesis the attributed runtime path.- Runtime lookup can fall back through the web internal context route when Railway cannot reach Postgres directly.
- Audit persistence is best-effort; runtime responses no longer fail closed when DB persistence is unavailable.
Example traces:
- BLOCK trace:
01KS6YVSWE0XRT10PETAY4EYJE- Prompt contained
AKIAIOSFODNN7EXAMPLE. - Result:
200 OK, actionBLOCK.
- Prompt contained
- LOG trace:
01KS6YW63CZB0AQ85235EX7K0W- Benign TypeScript prompt.
- Result: upstream Anthropic
401 invalid x-api-keywith actionLOG, expected for test keys.
Persisted Arkiv entities:
- BLOCK prompt review: https://data.arkiv.network/entity/0x69db399b2e368ad73347359826b7d0f847473cf374bbf8bee78c0cd11d43023b
- BLOCK policy decision: https://data.arkiv.network/entity/0x45cba3b64542ffc5916036fcbf48454e1d9d9177e181a6ba54a9da86e27d7195
- LOG prompt review: https://data.arkiv.network/entity/0x67488d99db9d82587e377113ce291c581ea4d46600a979cd924fb336183f2f3a
- LOG policy decision: https://data.arkiv.network/entity/0x7664c5f7cc6b633061fe73f545ac2556d69375e1d00e8c91955a431484822754
- Playground policy example: https://data.arkiv.network/entity/0xab963b8a0ec8ffec8ff02f2dc89d6bc73dcf952c4230d64040643bded75a30c4
Current production hardening priorities:
- Stabilize automatic Railway -> web -> Arkiv persistence with bounded retries.
- Show trace id, action, policy reason, entity keys, and tx hashes directly in admin event views.
- Complete real-user CLI onboarding and token lifecycle.
- Add policy versioning, draft/published rollout, and rollback.
- Add operator-visible health signals for Vercel, Railway, Supabase, and Arkiv.
MIT. See LICENSE.
