Guides, references, and resources for DCYFR Labs tools and packages.
All DCYFR Labs packages are published to npm under the @dcyfr scope and available on GitHub.
Portable TypeScript AI agent framework with plugin architecture, multi-provider routing and fallback, delegation v2, built-in telemetry, and quality gates.
Command-line tools for AI-powered workflows. Config init, validation, and project scaffolding for teams building with @dcyfr/ai.
Retrieval-Augmented Generation library for semantic search and document grounding. Pluggable vector store adapters, plugs directly into the @dcyfr/ai plugin system.
Structured code generation with quality gates and Zod-validated output. Integrates with the @dcyfr/ai validation framework for guaranteed compliance.
Install the core framework and start building in minutes.
import {
AgentRuntime,
ProviderRegistry,
TelemetryEngine,
ValidationFramework,
getMemory,
loadConfig,
} from '@dcyfr/ai';
// Zero-config setup: auto-detects .dcyfr.yaml, .dcyfr.json or package.json
const config = await loadConfig();
// Providers, with a fallback chain
const providers = new ProviderRegistry({
primaryProvider: 'anthropic', // or 'github-models', 'ollama'
fallbackChain: ['anthropic', 'ollama'],
autoReturn: true,
healthCheckInterval: 60_000,
});
// Agent name, providers, memory, telemetry
const runtime = new AgentRuntime('assistant', providers, getMemory(), new TelemetryEngine());
// Current limitation: execute() runs the loop but does not call a model yet.
// Its output is a placeholder. See Known Limitations in the @dcyfr/ai README.
const result = await runtime.execute({ task: 'Explain this codebase' });
console.log(result.success ? result.output : `Failed (${result.outcome}): ${result.error}`);
// Run quality gates before shipping
const validation = new ValidationFramework({ gates: config.validation.gates });
const report = await validation.validate({
projectRoot: config.project.root,
files: config.project.include,
config: config.agents,
});
console.log(`Quality gates: ${report.valid ? '✓ PASS' : '✗ FAIL'}`);