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.

1Create a workspace & register an agent at agentresources.xyz
2Generate an API key in Settings → API Keys
3Install the SDK
terminal
# pnpm (recommended)
pnpm add @agentresources/sdk

# npm
npm install @agentresources/sdk

# yarn
yarn add @agentresources/sdk
4Initialize & start sending metrics
setup.ts
import { 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
});
agent.ts
// 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' },
});
That's it! Your agent is now reporting to Agent Resources. Visit the Dashboard to see metrics, run security scans, and get KYA certified.

SDK Reference

The @agentresources/sdk package provides 65+ typed methods for the full Agent Resources platform.

Configuration

OptionTypeRequiredDescription
apiKeystringYesAgent-scoped API key from dashboard
agentIdstringNoExplicit agent ID (auto-detected from key)
apiUrlstringNoCustom API URL (defaults to production)
timeoutnumberNoRequest timeout in ms (default 10000)
retriesnumberNoRetry attempts on failure (default 3)
debugbooleanNoEnable verbose logging (default false)
retryBackoffstringNo'exponential' or 'linear' backoff strategy (default: exponential)

All Methods

MethodDescriptionGateway Endpoint
initialize()One-call setup: verify connectivity, start heartbeat, flush queuePOST /sdk/heartbeat
reportMetrics()Report task completion metricsPOST /metrics/ingest
reportMetricsBatch()Batch report up to 100 metricsPOST /metrics/ingest/batch
heartbeat()Send heartbeat to maintain SDK connectionPOST /sdk/heartbeat
flush()Flush buffered offline events(multiple)
readMemory()Read agent memory entriesGET /memory/{agentId}
writeMemory()Write/upsert agent memoryPOST /memory/write
searchMemory()Semantic search via pgvectorPOST /memory/search
getAgent()Get agent infoGET /agents/{id}
listAgents()List all agents in workspaceGET /agents
createAgent()Create a new agentPOST /agents
updateAgent()Update an existing agentPATCH /agents/{id}
deleteAgent()Delete (archive) an agentDELETE /agents/{id}
importAgents()Import agents in bulkPOST /agents/import
cloneAgent()Clone an existing agentPOST /agents/{id}/clone
getStatus()Get agent status & reputationGET /agents/{id}
getGuidance()Check for pending instructionsGET /agents/{id}/guidance
getKyaStatus()KYA certification statusGET /kya/agents/{id}
requestKyaAssessment()Trigger KYA assessmentPOST /kya/agents/{id}/assess
getScanReport()Latest scan reportGET /scan/agent/{id}/report
requestScan()Trigger 8-layer scanPOST /scan/agent/{id}
getRetrainingOptions()Retraining suggestions from scanGET /retraining/agents/{id}/suggestions
getKyaAttestationCapabilities()Per-network attestation capabilitiesGET /kya/attestation/capabilities
getKyaAttestationFees()Estimated attestation feesGET /kya/attestation/fees
requestKyaAttestation()Submit on-chain KYA attestationPOST /kya/agents/{id}/attest
getTrustProfile()Get public trust profile for agentGET /trust/agents/{id}
verifyAgentTrust()Verify agent meets minimum trust tierGET /trust/agents/{id}/verify
checkAgentTrust()Check another agent's trust statusGET /trust/agents/{id}/verify
getTelemetryStatus()Telemetry readiness statusGET /agents/{id}/telemetry-status
reportTask()Report a task execution eventPOST /sdk/telemetry/task
reportNetworkEvent()Report a network eventPOST /sdk/telemetry/network
reportPermissionEvent()Report a permission eventPOST /sdk/telemetry/permission
reportDataAccess()Report a data access eventPOST /sdk/telemetry/data-access
reportDependencies()Report runtime dependenciesPOST /sdk/telemetry/dependency
reportEnvironment()Report environment informationPOST /sdk/telemetry/environment
reportOutputSample()Report an output samplePOST /sdk/telemetry/output-sample
declarePolicy()Declare agent operational policyPUT /agents/{id}/policy
getPolicy()Get current agent policyGET /agents/{id}/policy
registerSkill()Register a skill the agent usesPOST /agents/{id}/skills
removeSkill()Remove a registered skillDELETE /agents/{id}/skills/{key}
respondToChallenge()Respond to SDK integrity challengePOST /sdk/challenge/response
processPendingChallenges()Auto-respond to pending challengesGET /sdk/challenges/pending
disputeViolation()File a dispute against a violationPOST /agents/{id}/violations/{violationId}/dispute
getDisputeStatus()Get dispute statusGET /agents/{id}/disputes/{disputeId}
getRetrainingDirectives()Get pending retraining directivesGET /agents/{id}/retraining-directives
acknowledgeRetraining()Acknowledge a retraining directivePOST /agents/{id}/retraining-directives/{directiveId}/acknowledge
getSkillLibrary()Browse available skillsGET /library/skills
installSkill()Install a skill to agentPOST /library/skills/{id}/install
getSkillGraphs()Browse available Skill GraphsGET /library/graphs
installSkillGraph()Install an entire Skill GraphPOST /library/graphs/{id}/install
searchSkills()Search skills by name/descriptionGET /library/skills?q=
getSdkHealth()Get SDK health statusGET /sdk/health
getSdkStatus()Combined SDK status + integrity reportGET /sdk/health
getActivityLog()Activity/event logGET /agents/{id}/activity
exportData()Request data export (GDPR)POST /account/export-request
getExportStatus()Check data export statusGET /account/export-request/{id}
getReferralStats()Referral program statsGET /referrals/stats

Memory

memory.ts
// 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

kya.ts
// 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-100

Skill Library

skills.ts
// 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();
Error handling: All methods are non-blocking by default — errors are logged but don't throw. Pass 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.

Base URL:https://api.agentresources.xyz/api/v1
Auth:Bearer token (Supabase JWT) or x-ar-agent-key header
Rate limits:Free 100/hr · Starter 1K/hr · Pro 10K/hr · Team 50K/hr
MethodEndpointDescription
POST/onboardCreate workspace & first agent
GET/agentsList all agents in workspace
POST/agentsRegister a new agent
PATCH/agents/{id}Update agent details
DELETE/agents/{id}Archive/delete an agent
POST/agents/{id}/restoreRestore archived agent
GET/agents/{id}/guidancePending instructions for agent
POST/agents/batchBatch operations (scan, status, fleet)
POST/metrics/ingestIngest single task metric
POST/metrics/ingest/batchBatch ingest up to 100 metrics
GET/dashboard/summaryDashboard stats summary
GET/dashboard/token-usageToken usage analytics
GET/dashboard/activityActivity feed
POST/scan/agent/{id}Full 8-layer security scan
POST/scan/agent/{id}/quickQuick security scan
GET/scan/agent/{id}/reportLatest scan report
GET/scan/agent/{id}/retrainingRetraining suggestions
GET/scan/agent/{id}/historyScan history
GET/kya/agents/{id}KYA status for agent
POST/kya/agents/{id}/assessTrigger KYA assessment
GET/kya/workspaceKYA overview for workspace
GET/library/skillsBrowse Skill Library
POST/library/skills/{id}/installInstall a skill
GET/library/graphsBrowse Skill Graphs
POST/memory/writeWrite agent memory
GET/memory/{agentId}Read agent memories
POST/memory/searchSemantic memory search (pgvector)
POST/mission-control/chatMission Control AI chat (SSE)
GET/mission-control/historyChat history
GET/billing/statusCurrent plan & usage
POST/billing/checkoutCreate Stripe checkout
POST/billing/portalStripe billing portal
GET/api-keysList API keys
POST/api-keysCreate API key
DELETE/api-keys/{id}Revoke an API key
GET/referrals/statsReferral stats
POST/referrals/codeGenerate referral code
GET/notifications/channelsList notification channels
POST/notifications/channelsCreate notification channel
POST/agents/{id}/snapshotsCreate agent snapshot
POST/agents/{id}/rollback/{snapshotId}Rollback to snapshot
POST/account/export-requestRequest data export (GDPR)
DELETE/accountDelete account (GDPR)
POST/x402/verify-paymentVerify x402 payment
GET/x402/pricingx402 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

Billing

Subscription billing (Free, Starter, Pro, Team tiers), usage-based metering, and Stripe Connect for referral payouts.

x402 Protocol

Payments

Machine-to-machine payments — agents with KYA Verified+ can accept/send x402 payments autonomously.

Supabase

Auth & Database

Authentication (email/password, OAuth), PostgreSQL database with RLS, real-time subscriptions, and storage.

Skill Library

Marketplace

Proprietary marketplace of curated skills and skill graphs. Browse, install, rate, and fork skills.

On-chain Attestation

Blockchain

KYA badges can be attested across Base, CDP, Billions, EigenCloud, and ERC-8004 registries for cross-platform trust verification.

Webhooks

Events

Configure 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

Identity
Behavioral
Code Safety
Dependency
Permission
Output
Compliance
Network

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 documentation

Ready to get started?

Create a free workspace and connect your first agent in minutes.