API - skenai/WILL GitHub Wiki
version: 2.0.0 date: 2025-03-04 type: system-doc status: public tags: [william, api] related: [] changelog:
- version: 2.0.0
date: 2025-03-04
changes:
- "MAJOR: Switch to YAML frontmatter"
- "MAJOR: Enhanced metadata structure" references: []
- version: 1.0.0
date: 2025-03-03
changes:
- "MAJOR: Initial documentation" references: []
API Documentation
Overview
The WILL API provides programmatic access to the SKENAI ecosystem.
Authentication
const will = new WILL({
apiKey: 'your-api-key',
environment: 'production'
});
Core Endpoints
1. Value Analysis
POST /api/v1/value/analyze
{
"economic": 0.5,
"network": 0.7,
"feasibility": 0.9
}
2. Pattern Recognition
POST /api/v1/patterns/detect
{
"timeframe": "7d",
"minConfidence": 0.8
}
3. Proposal Management
POST /api/v1/proposals/create
{
"track": "G",
"level": "L0",
"title": "Example Proposal"
}
Mathematical Framework
1. Value Space
interface ValueSpace {
economic: number; // [-1, 1]
network: number; // [-1, 1]
feasibility: number; // [0, 1]
}
2. Pattern Analysis
interface Pattern {
type: string;
confidence: number;
impact: ValueSpace;
relationships: string[];
}
3. Track Management
interface TrackState {
track: 'G' | 'F' | 'O' | 'R' | 'C' | 'E';
level: 'L0' | 'L1' | 'L2' | 'L3';
value: ValueSpace;
}
SDK Integration
1. Installation
npm install @skenai/will-sdk
2. Basic Usage
import { WILL } from '@skenai/will-sdk';
const will = new WILL({
apiKey: 'your-api-key'
});
// Create a proposal
const proposal = await will.createProposal({
track: 'G',
level: 'L0',
title: 'Example'
});
3. Advanced Features
// Pattern analysis
const patterns = await will.analyzePatterns({
timeframe: '7d'
});
// Value calculation
const value = await will.calculateValue({
economic: 0.5,
network: 0.7,
feasibility: 0.9
});
Rate Limits
- 1000 requests/minute for standard tier
- 5000 requests/minute for premium tier
- Custom limits available
Error Handling
try {
const result = await will.someOperation();
} catch (error) {
if (error.code === 'RATE_LIMIT_EXCEEDED') {
// Handle rate limiting
}
}
Additional Resources
Integration with NATURAL Framework
- Clean repository separation
- Natural pipeline flow
- Validator protection
- Interface standards
Pipeline API Integration
- /pipeline/submit - Entry point
- /pipeline/validate - Basic checks
- /pipeline/analyze - Efficiency (Q.1)
- /pipeline/patterns - Recognition (Q.2)
- /pipeline/status - State checks
- /pipeline/vote - Governance
Integration with Three-Graph Lattice
- Technical graph validation
- Economic resource optimization
- Quality metrics tracking