@acfstandards/cli
v1.0.0
Published
ACF Agent Certification CLI — run behavioral certification for your AI agent from the terminal
Readme
@acfstandards/cli
Run ACF behavioral certification for your AI agent from the terminal.
ACF (Agent Certification Framework) tests AI agents against defined behavioral standards and issues tiered certifications. This CLI triggers the certification process using a code obtained after registration and payment on the ACF portal.
All tests run server-side — prompts and rubrics never leave the ACF platform.
📘 First time? Start with the USER GUIDE — a step-by-step walkthrough from registration to your first PASS.
Install
npm install -g @acfstandards/cliOr run directly with npx:
npx @acfstandards/cli --code acf_abc123 --endpoint https://my-agent.com/chatPrerequisites
- Register your agent at acfstandards.org
- Select a tier and complete payment
- Copy your certification code (
acf_...) from the portal
Your agent must expose an HTTP endpoint that accepts POST requests with an OpenAI-compatible messages format:
{
"messages": [
{ "role": "user", "content": "..." }
]
}CLI Usage
Basic
acf-certify --code acf_abc123 --endpoint https://my-agent.com/chatWith Bearer Token Auth
acf-certify \
--code acf_abc123 \
--endpoint https://my-agent.com/chat \
--auth-method bearer \
--auth-secret sk-my-tokenWith API Key Auth
acf-certify \
--code acf_abc123 \
--endpoint https://my-agent.com/chat \
--auth-method api_key \
--auth-header X-API-Key \
--auth-secret my-keyWith Anthropic Request Format
acf-certify \
--code acf_abc123 \
--endpoint https://my-agent.com/chat \
--format anthropicAll Options
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| --code | Yes | — | Certification code from ACF portal |
| --endpoint | Yes | — | Agent HTTP endpoint URL |
| --auth-method | No | none | bearer, api_key, or none |
| --auth-secret | No* | — | Auth token or API key (*required if method ≠ none) |
| --auth-header | No | X-API-Key (api_key) / Authorization (bearer) | Custom header name for api_key method |
| --format | No | openai | Request format: openai, anthropic, custom |
| --base-url | No | https://acfstandards.org | API base URL |
| --skip-preflight | No | false | Skip agent connectivity check |
Programmatic API
import { certify } from '@acfstandards/cli';
const result = await certify({
code: 'acf_abc123',
endpoint: 'https://my-agent.com/chat',
authMethod: 'bearer',
authSecret: 'sk-my-token',
onProgress: (progress) => {
console.log(`${progress.percent}% — ${progress.message}`);
},
});
if (result.passed) {
console.log('Certificate:', result.certificateUrl);
console.log('Registry:', result.registryUrl);
} else {
console.log('Failed suites:', result.suiteResults);
if (result.reportPath) {
console.log('Report saved:', result.reportPath);
}
}certify(options) Options
| Property | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
| code | string | Yes | — | Certification code |
| endpoint | string | Yes | — | Agent endpoint URL |
| authMethod | "bearer" \| "api_key" \| "none" | No | "none" | Auth method |
| authSecret | string | No | — | Auth token/key |
| authHeader | string | No | "Authorization" | Custom auth header |
| requestFormat | "openai" \| "anthropic" \| "custom" | No | "openai" | Request format |
| baseUrl | string | No | "https://acfstandards.org" | API base URL |
| pollInterval | number | No | 5000 | Polling interval (ms) |
| onProgress | function | No | — | Progress callback |
CertifyResult
| Property | Type | Description |
|----------|------|-------------|
| passed | boolean | Whether the agent passed |
| status | string | Final status |
| suiteResults | Record<string, string> | Per-suite PASS/FAIL |
| certificateUrl | string \| null | PDF certificate URL (pass only) |
| registryUrl | string \| null | Registry listing URL (pass only) |
| failureReport | object \| null | Structured failure details (fail only) |
| failureReportUrl | string \| null | PDF failure report URL (fail only) |
| reportPath | string | Local markdown report path (fail only) |
Certification Tiers
| Tier | Label | Suites Tested | |------|-------|---------------| | T1 | Identity | CB + CS | | T2 | Behavioral | CB + CS + HD | | T3 | Compliance | CB + CS + HD + AR | | T4 | Enterprise Audit | All suites + full audit |
How It Works
- You register and pay on acfstandards.org
- You receive a one-time certification code (
acf_...) - The CLI sends your agent endpoint + auth to the ACF server
- ACF runs all behavioral tests server-side (prompts/rubrics stay private)
- The CLI polls for progress and displays results
- On pass: certificate PDF + public registry listing
- On fail: detailed failure report with remediation guidance
Requirements
- Node.js >= 18
- Agent must accept HTTP POST with JSON body
- Agent must respond within 30 seconds per request
License
MIT — Blue Horn Ventures LLC
