@aixord/sdk
v1.1.0
Published
AIXORD SDK - Developer SDK for AI governance enforcement
Maintainers
Readme
@aixord/sdk
Developer SDK for AIXORD AI governance enforcement. Integrates with Claude, ChatGPT, and other LLM providers.
Installation
npm install @aixord/sdkFeatures
- Provider Adapters — Claude (Anthropic), OpenAI, and custom providers
- State Management — Local, web app, or custom backends
- Gate Enforcement — Automatic gate checking and progression
- Session Tracking — Phase management and handoff generation
Quick Start
import { AIXORDClient } from '@aixord/sdk';
// Initialize with Claude
const client = new AIXORDClient({
provider: 'claude',
apiKey: process.env.ANTHROPIC_API_KEY
});
// Pass a gate
await client.passGate('LIC');
// Get current state
const state = await client.getState();
console.log(state.session.phase); // 'SETUP'With Web App Backend
Connect to the AIXORD Web App for persistent state:
const client = new AIXORDClient({
provider: 'claude',
apiKey: process.env.ANTHROPIC_API_KEY,
stateBackend: {
type: 'webapp',
webappUrl: 'https://aixord-webapp.peoplemerit.workers.dev',
webappApiKey: 'your-webapp-api-key',
projectId: 'your-project-id'
}
});Provider Configuration
Claude (Anthropic)
const client = new AIXORDClient({
provider: 'claude',
apiKey: process.env.ANTHROPIC_API_KEY,
model: 'claude-3-5-sonnet-20241022' // optional
});OpenAI
const client = new AIXORDClient({
provider: 'openai',
apiKey: process.env.OPENAI_API_KEY,
model: 'gpt-4-turbo' // optional
});API Reference
AIXORDClient
passGate(gateId: GateId): Promise<void>
Mark a gate as passed.
getState(): Promise<AIXORDState>
Get current governance state.
setPhase(phase: Phase): Promise<void>
Update the current phase.
createHandoff(): Promise<string>
Generate a handoff document.
Gate IDs
Setup Phase: LIC, DIS, TIR, ENV, OBJ, RA
Work Phase: FX, PD, PR, BP, MS, VA, HO
Phases
BRAINSTORM → PLAN → BLUEPRINT → EXECUTE → VERIFY
Peer Dependencies
Install the provider SDK you need:
# For Claude
npm install @anthropic-ai/sdk
# For OpenAI
npm install openaiRelated Packages
- @aixord/core — Core types and validation
License
MIT
