Back to Docs

Packages

20 packages organized into 6 layers. Each package is independently installable, fully typed, and ships with ESM + CJS builds.

Where to Start

Most projects need just 1-2 packages. Here are the recommended starting points:

Securing an existing app: @waymakerai/aicofounder-guard
Building a guarded agent: @waymakerai/aicofounder-agent-sdk
Regulated industry (healthcare, finance): @waymakerai/aicofounder-guard + @waymakerai/aicofounder-compliance
Policy-driven governance: @waymakerai/aicofounder-policies
Full-stack AI app: @waymakerai/aicofounder-core + @waymakerai/aicofounder-guard

Core

Foundation packages. Start here.

@waymakerai/aicofounder-guard

NEW

PII detection, prompt injection blocking, toxicity filtering, budget enforcement, rate limiting, and model gating. The primary security package.

npm install @waymakerai/aicofounder-guard

Key Exports

createGuardguarddetectPIIredactPIIdetectInjectiondetectToxicityBudgetEnforcerRateLimiterModelGate

Quick Example

import { createGuard } from '@waymakerai/aicofounder-guard';

const guard = createGuard({
  pii: 'redact',
  injection: 'block',
  toxicity: 'block',
  budget: { limit: 50, period: 'day', warningAt: 0.8, action: 'block' },
});

const result = guard.check(userInput, { model: 'claude-sonnet-4-20250514' });
if (result.blocked) {
  console.log('Blocked:', result.reason);
} else {
  const safeInput = result.redacted || userInput;
  // Send safeInput to LLM
}

@waymakerai/aicofounder-core

Main SDK client with multi-provider support, cost tracking, caching, retries, rate limiting, and fallbacks. Supports Anthropic, OpenAI, and Google.

npm install @waymakerai/aicofounder-core

Key Exports

createCoFounderCostTrackerwithRetryRateLimiterProviderManagerCacheManager

Quick Example

import { createCoFounder } from '@waymakerai/aicofounder-core';

const cofounder = createCoFounder({
  providers: {
    anthropic: process.env.ANTHROPIC_API_KEY!,
    openai: process.env.OPENAI_API_KEY!,
  },
  cache: true,
  optimize: 'cost',
});

const response = await cofounder.chat('Explain quantum computing');

@waymakerai/aicofounder-policies

NEW

Declarative policy engine with 9 industry presets (HIPAA, GDPR, CCPA, SEC, PCI, FERPA, SOX, safety, enterprise). Composable rules for PII, content, models, costs, and data retention.

npm install @waymakerai/aicofounder-policies

Key Exports

PolicyEnginecomposeevaluatePolicyhipaaPolicygdprPolicysecPolicyPolicyBuilderALL_PII_PATTERNS

Quick Example

import { PolicyEngine, hipaaPolicy, gdprPolicy, compose } from '@waymakerai/aicofounder-policies';

const policy = compose([hipaaPolicy, gdprPolicy], 'strict');
const engine = new PolicyEngine([policy]);

const result = engine.evaluate(text, { model: 'claude-sonnet-4-20250514', direction: 'output' });
console.log(result.allowed, result.violations);

Security & Compliance

Enterprise compliance, guidelines, and content control.

@waymakerai/aicofounder-compliance

NEW

9 preset compliance rules for HIPAA, SEC/FINRA, GDPR, CCPA, legal, safety, and security. Rules can block, redact, replace, or append disclaimers to AI output.

npm install @waymakerai/aicofounder-compliance

Key Exports

ComplianceEnforcercreateComplianceEnforcerPresetRulescreateComplianceRuledetectPIIredactPII

Quick Example

import { ComplianceEnforcer, PresetRules } from '@waymakerai/aicofounder-compliance';

const enforcer = new ComplianceEnforcer({
  rules: [PresetRules.hipaaNoMedicalAdvice(), PresetRules.secFinancialDisclaimer()],
  strictMode: true,
});

const result = await enforcer.enforce(userInput, aiOutput, { topic: 'medical' });
if (!result.compliant) {
  console.log('Violations:', result.violations);
}

@waymakerai/aicofounder-guidelines

NEW

Dynamic behavioral control with context-aware rules. Define guidelines that match based on topic, user role, or custom conditions. Includes 8+ presets.

npm install @waymakerai/aicofounder-guidelines

Key Exports

GuidelineManagercreateGuidelinePresetGuidelinesConditions

Quick Example

import { GuidelineManager, PresetGuidelines } from '@waymakerai/aicofounder-guidelines';

const manager = new GuidelineManager();
await manager.addGuideline(PresetGuidelines.noMedicalAdvice());

const matched = await manager.match({ topic: 'medical', message: 'I have a headache' });

@waymakerai/aicofounder-soc2

NEW

SOC2 audit evidence collection and report generation. Automatically generates compliance reports with timestamps and evidence trails.

npm install @waymakerai/aicofounder-soc2

Key Exports

EvidenceCollectorReportGeneratorSOC2Templates

Quick Example

import { EvidenceCollector, ReportGenerator } from '@waymakerai/aicofounder-soc2';

const collector = new EvidenceCollector();
const report = new ReportGenerator(collector);
const pdf = await report.generate('Type II', { period: 'Q1 2026' });

Agent

Build guarded AI agents with interceptors and factories.

@waymakerai/aicofounder-agent-sdk

NEW

Guardrail wrapper for the Anthropic Agent SDK. 7 interceptors (PII, injection, compliance, content, cost, audit, rate limit) and 4 pre-built factories (HIPAA, Financial, GDPR, Safe).

npm install @waymakerai/aicofounder-agent-sdk

Key Exports

createGuardedAgentcreateHIPAAAgentcreateFinancialAgentcreateGDPRAgentcreateSafeAgentGuardPipelineguardTool

Dependencies

@waymakerai/aicofounder-guard

Quick Example

import { createGuardedAgent } from '@waymakerai/aicofounder-agent-sdk';

const agent = createGuardedAgent({
  model: 'claude-sonnet-4-20250514',
  instructions: 'You are a helpful assistant.',
  guards: {
    pii: { mode: 'redact', onDetection: 'redact' },
    injection: { sensitivity: 'medium', onDetection: 'block' },
    cost: { budgetPeriod: 'day', warningThreshold: 0.8 },
    audit: { destination: 'file', filePath: './audit.log', tamperProof: true },
  },
});

const result = await agent.run('Help me with my account');

@waymakerai/aicofounder-agents

Multi-agent orchestration with typed messaging, pub/sub channels, request/response patterns, and delivery guarantees.

npm install @waymakerai/aicofounder-agents

Key Exports

createMessageBrokercreateChannelcreateRequestChannelBaseAgentLLMAgent

Quick Example

import { createMessageBroker, createChannel } from '@waymakerai/aicofounder-agents';

const broker = createMessageBroker({ deliveryGuarantee: 'at-least-once' });
const tasks = createChannel<{ task: string }>({ name: 'tasks', type: 'topic' });

broker.subscribe(tasks, async (msg, ctx) => {
  console.log('Task:', msg.payload.task);
  await ctx.acknowledge();
});

Data & AI

RAG, helpers, prompts, context optimization.

@waymakerai/aicofounder-helpers

10 one-line AI functions: summarize, translate, classify, extract, sentiment, answer, rewrite, generate, compare, moderate.

npm install @waymakerai/aicofounder-helpers

Key Exports

summarizetranslateclassifyextractsentimentanswerrewritegeneratecomparemoderate

Quick Example

import { summarize, classify, extract } from '@waymakerai/aicofounder-helpers';

const summary = await summarize(document, { style: 'brief' });
const category = await classify(email, ['support', 'sales', 'billing']);
const data = await extract(resume, { name: 'string', skills: 'string[]' });

@waymakerai/aicofounder-prompts

Enterprise prompt management with versioning, A/B testing, analytics, and React hooks.

npm install @waymakerai/aicofounder-prompts

Key Exports

PromptManagerregisterexecutecreateABTestgetAnalyticsusePrompt

Quick Example

import { PromptManager } from '@waymakerai/aicofounder-prompts';

const pm = new PromptManager({ workspace: 'my-app' });
await pm.register('greeting', { template: 'Hello {{name}}!', variables: ['name'] });
const result = await pm.execute('greeting', { variables: { name: 'World' } });

@waymakerai/aicofounder-rag

Advanced RAG with presets (balanced, fast, accurate, code), hybrid retrieval, cross-encoder re-ranking, and automatic citations.

npm install @waymakerai/aicofounder-rag

Key Exports

RAGPresetscreateRAGPipelineSemanticChunkerHybridRetrieverCrossEncoderReranker

Quick Example

import { RAGPresets } from '@waymakerai/aicofounder-rag';

const pipeline = RAGPresets.balanced();
await pipeline.index([{ id: 'doc1', content: 'Your docs...' }]);
const result = await pipeline.query({ query: 'How does auth work?' });
console.log(result.answer, result.citations);

@waymakerai/aicofounder-context-optimizer

NEW

Handle 400K+ token contexts with ~70% cost savings. Smart chunking, file prioritization, and quality scoring.

npm install @waymakerai/aicofounder-context-optimizer

Key Exports

ContextOptimizeroptimizeprioritizeFileschunkRepositoryscoreQuality

Quick Example

import { ContextOptimizer } from '@waymakerai/aicofounder-context-optimizer';

const optimizer = new ContextOptimizer({ strategy: 'hybrid', maxTokens: 400000 });
const result = await optimizer.optimize({ files: repoFiles, query: 'Explain auth flow' });
console.log(result.tokens, result.costSavings);

DevOps

CLI tools, CI/CD, testing, streaming, and observability.

@waymakerai/aicofounder-cli

25+ CLI commands for project setup, code generation, testing, dashboard, and deployment.

npm install -g @waymakerai/aicofounder-cli

Key Exports

rana initrana generaterana testrana dashboardrana deploy

Quick Example

# Create a new project
npx @waymakerai/aicofounder-cli init my-app

# Generate code
rana generate api --schema ./schema.yml

# Run AI tests
rana test --semantic --coverage

@waymakerai/aicofounder-ci

CI/CD static analysis scanner with 7 built-in rules: hardcoded secrets, PII in prompts, prompt injection, model approval, cost estimation, safe defaults, and exposed asset detection (source maps, env var leaks, debug modes, CORS, GraphQL introspection, CI/CD secret leaks).

npm install @waymakerai/aicofounder-ci

Key Exports

scannoHardcodedKeysnoExposedAssetsnoInjectionVulnnoPiiInPromptsapprovedModelscostEstimationsafeDefaults

Quick Example

# Scan your codebase
npx @waymakerai/aicofounder-ci scan --rules all --fail-on high

# GitHub Actions
- uses: waymaker-ai/cofounder-ci@v1
  with:
    rules: all
    fail-on: high
    comment-on-pr: true

@waymakerai/aicofounder-testing

AI-aware testing framework with semantic matching, statistical assertions, and cost tracking per test suite.

npm install @waymakerai/aicofounder-testing

Key Exports

TestRunnersemanticMatchassertSimilartrackCost

Quick Example

import { TestRunner } from '@waymakerai/aicofounder-testing';

const runner = new TestRunner({ semantic: true });
await runner.run([
  { input: 'Summarize this...', expected: 'A brief overview...', threshold: 0.8 },
]);

@waymakerai/aicofounder-streaming

NEW

Streaming guards for Anthropic, OpenAI, and SSE streams. Real-time content detection on streaming responses.

npm install @waymakerai/aicofounder-streaming

Key Exports

StreamGuardAnthropicAdapterOpenAIAdapterSSEAdapterStreamBuffer

Quick Example

import { StreamGuard, AnthropicAdapter } from '@waymakerai/aicofounder-streaming';

const guard = new StreamGuard({ pii: 'redact', injection: 'block' });
const stream = guard.wrap(anthropicStream, new AnthropicAdapter());

Enterprise

Production-grade infrastructure packages.

@waymakerai/aicofounder-react

React hooks and provider for CoFounder. useChat, useRAG, usePrompt, useGuard hooks with built-in state management.

npm install @waymakerai/aicofounder-react

Key Exports

CoFounderProvideruseChatuseRAGusePromptuseGuard

Quick Example

import { CoFounderProvider, useChat } from '@waymakerai/aicofounder-react';

function App() {
  return (
    <CoFounderProvider config={{ apiKey: '...' }}>
      <ChatComponent />
    </CoFounderProvider>
  );
}

@waymakerai/aicofounder-dashboard

Real-time monitoring dashboard for costs, usage, compliance violations, and guard activity.

npm install @waymakerai/aicofounder-dashboard

Key Exports

DashboardFileStorageDashboardAPI

Quick Example

import { Dashboard } from '@waymakerai/aicofounder-dashboard';

const dashboard = new Dashboard({ port: 3001, storage: 'file' });
await dashboard.start();
// Open http://localhost:3001

@waymakerai/aicofounder-mcp-server

Model Context Protocol server for exposing CoFounder tools to MCP-compatible clients.

npm install @waymakerai/aicofounder-mcp-server

Key Exports

MCPServerScaffoldingTools

Quick Example

import { MCPServer } from '@waymakerai/aicofounder-mcp-server';

const server = new MCPServer({ tools: ['guard', 'compliance', 'rag'] });
await server.start();

@waymakerai/aicofounder-benchmark

NEW

Performance benchmarking for LLM operations. Measure latency, throughput, cost efficiency, and quality across providers.

npm install @waymakerai/aicofounder-benchmark

Key Exports

BenchmarkRunnerBenchmarkSuitecompareProviders

Quick Example

import { BenchmarkRunner } from '@waymakerai/aicofounder-benchmark';

const runner = new BenchmarkRunner();
const results = await runner.compare(['claude-sonnet-4-20250514', 'gpt-4o'], {
  prompts: testPrompts,
  metrics: ['latency', 'cost', 'quality'],
});

Package Dependencies

All packages are independently installable. Here are the key dependency relationships:

agent-sdkdepends onguard (for interceptors)
agent-sdkoptionally uses@anthropic-ai/sdk (peer dependency)
compliancestandalone(no CoFounder dependencies)
policiesstandalone(no CoFounder dependencies)
guardstandalone(no CoFounder dependencies)
corestandalone(no CoFounder dependencies)
helpers / prompts / ragoptionally usecore (for provider management)
streamingdepends onguard (for stream detection)