cometagent-sdk
v1.0.0
Published
Official SDK for CometAgent - AI-powered DevOps swarm automation
Maintainers
Readme
cometagent-sdk
Official SDK for CometAgent - AI-powered DevOps swarm automation.
Installation
npm install cometagent-sdkQuick Start
import { CometAgent } from 'cometagent-sdk';
const agent = new CometAgent({ apiKey: 'YOUR_API_KEY' });
// Check swarm health
const health = await agent.health();
console.log(health.status); // 'healthy'
// Execute a task
const result = await agent.execute('Review this PR for security issues');
console.log(result);Features
Swarm Management
// Spawn agents (13 for emergence)
const spawn = await agent.spawn(13);
console.log(`Spawned ${spawn.spawned} agents, emergence: ${spawn.emergence}`);
// Get swarm status
const status = await agent.status();
console.log(`Active: ${status.activeAgents}, Idle: ${status.idleAgents}`);Code Analysis
// Diagnose code issues
const diagnosis = await agent.diagnose({
code: 'function add(a, b) { return a + b }',
language: 'javascript'
});
// Review code changes
const review = await agent.review({
diff: '+ const x = 1;\n- const x = 2;',
context: 'Fixing variable initialization'
});
// Generate tests
const tests = await agent.generateTests({
code: 'export function multiply(a, b) { return a * b; }',
framework: 'jest'
});
// Security scan
const scan = await agent.securityScan({
code: 'const password = "secret123";'
});
// Optimize code
const optimized = await agent.optimize({
code: 'for (let i = 0; i < arr.length; i++) { ... }',
target: 'speed'
});Configuration
const agent = new CometAgent({
apiKey: 'YOUR_API_KEY', // Optional: API key for authentication
baseUrl: 'https://...', // Optional: Custom API endpoint
timeout: 30000 // Optional: Request timeout in ms
});Pricing
| Tier | Price | Agents | Runs/Month | |------|-------|--------|------------| | Free | $0 | 1 | 10 | | Starter | $29/mo | 3 | 500 | | Pro | $99/mo | 5 | Unlimited | | Enterprise | $399/mo | 8+ | Unlimited |
Payment Links
import { PAYMENT_LINKS } from 'cometagent-sdk';
// Direct checkout links
console.log(PAYMENT_LINKS.starter); // $29/mo
console.log(PAYMENT_LINKS.pro); // $99/mo
console.log(PAYMENT_LINKS.enterprise); // $399/moError Handling
import { CometAgent, CometAgentError } from 'cometagent-sdk';
try {
await agent.execute('task');
} catch (error) {
if (error instanceof CometAgentError) {
console.error(`Error ${error.statusCode}: ${error.message}`);
}
}Links
- Portal: https://cometagent.pages.dev
- API: https://cometagent-swarm.epochcoreras.workers.dev
- VS Code Extension: Marketplace
License
MIT - EpochCore Quantum Enterprise
