Developer Documentation
Everything you need to integrate, monitor, and secure your AI agents with Agent Resources.
Quickstart
Get your first agent connected in under 5 minutes. Install the SDK, add your workspace key, and start sending metrics.
Jump to sectionSDK Reference
Full TypeScript SDK documentation — 65+ methods covering metrics, memory, scanning, KYA, skills, telemetry, verification, and fleet management.
Jump to sectionAPI Reference
REST API endpoints for the Fastify gateway including authentication, agents, metrics, scanning, KYA, skills, and billing.
Jump to sectionIntegrations
Connect to Stripe billing, x402 machine-to-machine payments, on-chain KYA attestation, and the Skill Library marketplace.
Jump to sectionKYA & Scanning
8-layer security scanning, KYA certification tiers (Basic → Verified → Trusted), on-chain attestation, and x402 eligibility.
Jump to sectionMission Control
Natural language fleet management — scan agents, check KYA status, view metrics, and manage your fleet through chat.
Jump to sectionTrust API
Public read-only API for verifying agent trust profiles and attestations — no authentication required.
Jump to sectionQuickstart
Get your first agent connected in under 5 minutes.
# pnpm (recommended)
pnpm add @agentresources/sdk
# npm
npm install @agentresources/sdk
# yarn
yarn add @agentresources/sdkimport { ARClient } from '@agentresources/sdk';
const ar = new ARClient({
apiKey: process.env.AR_API_KEY!, // From dashboard → Settings → API Keys
agentId: process.env.AR_AGENT_ID, // Optional — auto-detected from key
apiUrl: 'https://api.agentresources.xyz', // Optional — defaults to production
});// Report task completion metrics
await ar.reportMetrics({
taskType: 'research',
success: true,
latencyMs: 1200,
tokenInput: 300,
tokenOutput: 150,
costUsd: 0.0034,
metadata: { model: 'gpt-4.1' },
});SDK Reference
The @agentresources/sdk package provides 65+ typed methods for the full Agent Resources platform.
Configuration
| Option | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Yes | Agent-scoped API key from dashboard |
| agentId | string | No | Explicit agent ID (auto-detected from key) |
| apiUrl | string | No | Custom API URL (defaults to production) |
| timeout | number | No | Request timeout in ms (default 10000) |
| retries | number | No | Retry attempts on failure (default 3) |
| debug | boolean | No | Enable verbose logging (default false) |
| retryBackoff | string | No | 'exponential' or 'linear' backoff strategy (default: exponential) |
All Methods
| Method | Description | Gateway Endpoint |
|---|---|---|
| initialize() | One-call setup: verify connectivity, start heartbeat, flush queue | POST /sdk/heartbeat |
| reportMetrics() | Report task completion metrics | POST /metrics/ingest |
| reportMetricsBatch() | Batch report up to 100 metrics | POST /metrics/ingest/batch |
| heartbeat() | Send heartbeat to maintain SDK connection | POST /sdk/heartbeat |
| flush() | Flush buffered offline events | (multiple) |
| readMemory() | Read agent memory entries | GET /memory/{agentId} |
| writeMemory() | Write/upsert agent memory | POST /memory/write |
| searchMemory() | Semantic search via pgvector | POST /memory/search |
| getAgent() | Get agent info | GET /agents/{id} |
| listAgents() | List all agents in workspace | GET /agents |
| createAgent() | Create a new agent | POST /agents |
| updateAgent() | Update an existing agent | PATCH /agents/{id} |
| deleteAgent() | Delete (archive) an agent | DELETE /agents/{id} |
| importAgents() | Import agents in bulk | POST /agents/import |
| cloneAgent() | Clone an existing agent | POST /agents/{id}/clone |
| getStatus() | Get agent status & reputation | GET /agents/{id} |
| getGuidance() | Check for pending instructions | GET /agents/{id}/guidance |
| getKyaStatus() | KYA certification status | GET /kya/agents/{id} |
| requestKyaAssessment() | Trigger KYA assessment | POST /kya/agents/{id}/assess |
| getScanReport() | Latest scan report | GET /scan/agent/{id}/report |
| requestScan() | Trigger 8-layer scan | POST /scan/agent/{id} |
| getRetrainingOptions() | Retraining suggestions from scan | GET /retraining/agents/{id}/suggestions |
| getKyaAttestationCapabilities() | Per-network attestation capabilities | GET /kya/attestation/capabilities |
| getKyaAttestationFees() | Estimated attestation fees | GET /kya/attestation/fees |
| requestKyaAttestation() | Submit on-chain KYA attestation | POST /kya/agents/{id}/attest |
| getTrustProfile() | Get public trust profile for agent | GET /trust/agents/{id} |
| verifyAgentTrust() | Verify agent meets minimum trust tier | GET /trust/agents/{id}/verify |
| checkAgentTrust() | Check another agent's trust status | GET /trust/agents/{id}/verify |
| getTelemetryStatus() | Telemetry readiness status | GET /agents/{id}/telemetry-status |
| reportTask() | Report a task execution event | POST /sdk/telemetry/task |
| reportNetworkEvent() | Report a network event | POST /sdk/telemetry/network |
| reportPermissionEvent() | Report a permission event | POST /sdk/telemetry/permission |
| reportDataAccess() | Report a data access event | POST /sdk/telemetry/data-access |
| reportDependencies() | Report runtime dependencies | POST /sdk/telemetry/dependency |
| reportEnvironment() | Report environment information | POST /sdk/telemetry/environment |
| reportOutputSample() | Report an output sample | POST /sdk/telemetry/output-sample |
| declarePolicy() | Declare agent operational policy | PUT /agents/{id}/policy |
| getPolicy() | Get current agent policy | GET /agents/{id}/policy |
| registerSkill() | Register a skill the agent uses | POST /agents/{id}/skills |
| removeSkill() | Remove a registered skill | DELETE /agents/{id}/skills/{key} |
| respondToChallenge() | Respond to SDK integrity challenge | POST /sdk/challenge/response |
| processPendingChallenges() | Auto-respond to pending challenges | GET /sdk/challenges/pending |
| disputeViolation() | File a dispute against a violation | POST /agents/{id}/violations/{violationId}/dispute |
| getDisputeStatus() | Get dispute status | GET /agents/{id}/disputes/{disputeId} |
| getRetrainingDirectives() | Get pending retraining directives | GET /agents/{id}/retraining-directives |
| acknowledgeRetraining() | Acknowledge a retraining directive | POST /agents/{id}/retraining-directives/{directiveId}/acknowledge |
| getSkillLibrary() | Browse available skills | GET /library/skills |
| installSkill() | Install a skill to agent | POST /library/skills/{id}/install |
| getSkillGraphs() | Browse available Skill Graphs | GET /library/graphs |
| installSkillGraph() | Install an entire Skill Graph | POST /library/graphs/{id}/install |
| searchSkills() | Search skills by name/description | GET /library/skills?q= |
| getSdkHealth() | Get SDK health status | GET /sdk/health |
| getSdkStatus() | Combined SDK status + integrity report | GET /sdk/health |
| getActivityLog() | Activity/event log | GET /agents/{id}/activity |
| exportData() | Request data export (GDPR) | POST /account/export-request |
| getExportStatus() | Check data export status | GET /account/export-request/{id} |
| getReferralStats() | Referral program stats | GET /referrals/stats |
Memory
// Write agent memory
await ar.writeMemory({
key: 'company_info',
value: 'Prefers formal tone, enterprise focus...',
category: 'preferences',
});
// Semantic search across memory (pgvector)
const results = await ar.searchMemory({
query: 'email templates for enterprise clients',
limit: 5,
});KYA & Scanning
// Check KYA certification status
const kya = await ar.getKyaStatus();
console.log(kya.kyaLevel); // 'none' | 'basic' | 'verified' | 'trusted'
console.log(kya.x402Eligible); // true if Verified+
// Trigger 8-layer security scan
const scan = await ar.requestScan({ type: 'full' });
// Get scan results
const report = await ar.getScanReport();
console.log(report.compositeScore); // 0-100Skill Library
// Browse the Skill Library
const skills = await ar.getSkillLibrary({
category: 'research',
minRating: 4.0,
limit: 20,
});
// Install a skill to your agent
await ar.installSkill('skill-uuid');
// Get retraining suggestions from latest scan
const options = await ar.getRetrainingOptions();throwOnError: true in the options to enable strict mode. The SDK uses exponential backoff with a circuit breaker after 5 consecutive failures.API Reference
REST API served by the Fastify gateway at api.agentresources.xyz.
https://api.agentresources.xyz/api/v1x-ar-agent-key header| Method | Endpoint | Description |
|---|---|---|
| POST | /onboard | Create workspace & first agent |
| GET | /agents | List all agents in workspace |
| POST | /agents | Register a new agent |
| PATCH | /agents/{id} | Update agent details |
| DELETE | /agents/{id} | Archive/delete an agent |
| POST | /agents/{id}/restore | Restore archived agent |
| GET | /agents/{id}/guidance | Pending instructions for agent |
| POST | /agents/batch | Batch operations (scan, status, fleet) |
| POST | /metrics/ingest | Ingest single task metric |
| POST | /metrics/ingest/batch | Batch ingest up to 100 metrics |
| GET | /dashboard/summary | Dashboard stats summary |
| GET | /dashboard/token-usage | Token usage analytics |
| GET | /dashboard/activity | Activity feed |
| POST | /scan/agent/{id} | Full 8-layer security scan |
| POST | /scan/agent/{id}/quick | Quick security scan |
| GET | /scan/agent/{id}/report | Latest scan report |
| GET | /scan/agent/{id}/retraining | Retraining suggestions |
| GET | /scan/agent/{id}/history | Scan history |
| GET | /kya/agents/{id} | KYA status for agent |
| POST | /kya/agents/{id}/assess | Trigger KYA assessment |
| GET | /kya/workspace | KYA overview for workspace |
| GET | /library/skills | Browse Skill Library |
| POST | /library/skills/{id}/install | Install a skill |
| GET | /library/graphs | Browse Skill Graphs |
| POST | /memory/write | Write agent memory |
| GET | /memory/{agentId} | Read agent memories |
| POST | /memory/search | Semantic memory search (pgvector) |
| POST | /mission-control/chat | Mission Control AI chat (SSE) |
| GET | /mission-control/history | Chat history |
| GET | /billing/status | Current plan & usage |
| POST | /billing/checkout | Create Stripe checkout |
| POST | /billing/portal | Stripe billing portal |
| GET | /api-keys | List API keys |
| POST | /api-keys | Create API key |
| DELETE | /api-keys/{id} | Revoke an API key |
| GET | /referrals/stats | Referral stats |
| POST | /referrals/code | Generate referral code |
| GET | /notifications/channels | List notification channels |
| POST | /notifications/channels | Create notification channel |
| POST | /agents/{id}/snapshots | Create agent snapshot |
| POST | /agents/{id}/rollback/{snapshotId} | Rollback to snapshot |
| POST | /account/export-request | Request data export (GDPR) |
| DELETE | /account | Delete account (GDPR) |
| POST | /x402/verify-payment | Verify x402 payment |
| GET | /x402/pricing | x402 per-action pricing |
Sign in to access the full interactive API documentation with request/response examples.
Integrations
Agent Resources connects to key services across billing, payments, and trust.
Stripe
BillingSubscription billing (Free, Starter, Pro, Team tiers), usage-based metering, and Stripe Connect for referral payouts.
x402 Protocol
PaymentsMachine-to-machine payments — agents with KYA Verified+ can accept/send x402 payments autonomously.
Supabase
Auth & DatabaseAuthentication (email/password, OAuth), PostgreSQL database with RLS, real-time subscriptions, and storage.
Skill Library
MarketplaceProprietary marketplace of curated skills and skill graphs. Browse, install, rate, and fork skills.
On-chain Attestation
BlockchainKYA badges can be attested across Base, CDP, Billions, EigenCloud, and ERC-8004 registries for cross-platform trust verification.
Webhooks
EventsConfigure webhook endpoints to receive real-time events for scans, KYA updates, billing, and agent status changes.
KYA & Security Scanning
Know Your Agent certification and 8-layer security scanning.
Basic
Score ≥85 · 48h OR 500+ tasks · <0.5% hallucination · 1× per-layer event thresholds · 1 passing scan
Verified
Score ≥90 · 7d OR 1,000+ tasks · <0.3% hallucination · 2× per-layer event thresholds · 2 passing scans
Trusted
Score ≥95 · 14d OR 2,000+ tasks · <0.1% hallucination · 3× per-layer event thresholds · 3 passing scans
8-Layer Scan
KYA badges expire after 1 year. Agents must maintain their metrics to keep certification active. Verified+ agents are eligible for x402 autonomous payments and on-chain attestation.
Mission Control
Natural language fleet management through an AI-powered chat interface.
"Scan agent Alpha"
Triggers a full 8-layer security scan
"What's the KYA status of my agents?"
Returns KYA certification for all agents
"Show me today's metrics"
Summarizes dashboard stats and top performers
"Create a new research agent"
Registers a new agent with the given name
"List agents with hallucination > 0.1"
Filters agents by performance criteria
"Install the web-scraper skill on Beta"
Installs a skill from the library
Mission Control uses server-sent events (SSE) for streaming responses. Available to all plan tiers.
Trust API (Public)
Public read-only API for verifying agent trust — no authentication required.
The Trust API provides 5 public GET endpoints for checking agent trust profiles, score history, attestations, and tier verification. Includes an interactive test console.
View full Trust API documentationReady to get started?
Create a free workspace and connect your first agent in minutes.