baselineos
v1.5.1
Published
AI Operating System — 7-layer execution runtime for repeatable AI operations, with audit trails and evidence bundles
Maintainers
Readme
baselineos
AI Operating System — 7-layer execution runtime for repeatable AI operations. Lang, Frame, Studio, Govern, Experience, Autonomy, Persona.
Status: 0.2.0-beta.1
License: Apache-2.0
Install
npm install baselineosOr use directly:
npx baselineos --versionInterfaces
BaselineOS provides three interfaces for different use cases:
| Interface | Use Case | Entry Point |
|-----------|----------|-------------|
| CLI | Developer workflow, CI/CD | baseline init / run / serve |
| SDK | Programmatic integration | import { Baseline } from 'baselineos' |
| API | External system integration | REST + WebSocket on port 3141 |
CLI Quickstart
1. Initialize a project
npx baselineos initThis creates a baseline.config.ts in your project root with sensible defaults.
2. Index your knowledge base
npx baselineos indexIndexes markdown, code, and config files from paths defined in your config.
3. Run a task
npx baselineos run "Implement OAuth flow with acceptance criteria"The orchestrator decomposes, executes, verifies, and reviews autonomously — producing an audit trail and evidence bundle for every task.
4. Start the server
npx baselineos serveStarts the REST API (port 3141), WebSocket stream, and MCP server.
MCP Setup (Claude Desktop)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"baselineos": {
"command": "npx",
"args": ["baselineos", "serve"]
}
}
}Config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Restart Claude Desktop. BaselineOS tools appear in the tool picker — 16 tools across task execution, knowledge retrieval, memory, and operations.
SDK Quickstart
import { Baseline } from 'baselineos';
const baseline = new Baseline({
projectRoot: process.cwd(),
knowledge: ['./docs', './specs'],
});
await baseline.init();
// Run a task
const task = await baseline.run({
title: 'Implement OAuth',
description: 'Add OAuth 2.0 authentication flow',
});
// Memory
await baseline.remember({ key: 'preference', value: { theme: 'dark' }, scope: 'long-term' });
const recalled = await baseline.recall({ key: 'preference', scope: 'all' });
// Knowledge retrieval
const results = await baseline.search('authentication patterns');
const context = await baseline.getContext('oauth');
// Evidence
const evidence = await baseline.getEvidenceBundle(task.id);
const audit = await baseline.getAuditTrail(task.id);API Quickstart
# Create a task
curl -X POST http://localhost:3141/api/tasks \
-H "Content-Type: application/json" \
-d '{"title":"Implement feature","description":"Add OAuth 2.0 flow"}'
# List tasks
curl http://localhost:3141/api/tasks
# Get system stats
curl http://localhost:3141/api/stats
# Search knowledge
curl -X POST http://localhost:3141/api/search \
-H "Content-Type: application/json" \
-d '{"query":"authentication","limit":10}'Full API documentation: OpenAPI Spec
Package Exports
import { Baseline } from 'baselineos'; // Main engine
import { Orchestrator } from 'baselineos/orchestrator'; // Task orchestration
import { MemorySystem } from 'baselineos/memory'; // Multi-scope memory
import { SemanticCache } from 'baselineos/cache'; // Semantic caching
import { KnowledgeIndexer } from 'baselineos/indexer'; // Knowledge indexing
import { MCPServer } from 'baselineos/mcp'; // MCP server
import { AnthropicEngine } from 'baselineos/engine'; // Execution engine
import { RAGEngine } from 'baselineos/rag'; // RAG retrieval
import { AgentBus } from 'baselineos/bus'; // Pub/sub agent-to-agent messaging
import { OPAPolicyGate } from 'baselineos/opa'; // OPA runtime policy enforcement
import { initTelemetry } from 'baselineos/telemetry'; // OpenTelemetry distributed tracing
import { PiiDetector } from 'baselineos/pii'; // PII detection and redaction
import { LlmTracer } from 'baselineos/llm-tracer'; // Langfuse LLM call tracing
import { TaskQueue } from 'baselineos/queue'; // BullMQ durable task queueOperations Runtime
Every task execution produces:
- Audit trail — append-only log of all operations
- Evidence bundle — exportable artifact (who approved, what policies applied, what happened)
- Risk assessment — complexity/impact analysis with mitigation tracking
- Compliance checks — standard-based validation (ISO 27001, NDPC, AfCFTA)
The Govern layer enforces policies at execution time. The other six layers handle everything else — from language parsing to autonomous agent operations.
Configuration
baseline.config.ts controls orchestrator behavior, LLM settings, caching, agents, and layer configuration. See templates/baseline.config.ts for the full reference.
Key options:
| Option | Default | Description |
|--------|---------|-------------|
| orchestrator.maxAutonomousComplexity | 'complex' | Tasks above this require human approval |
| orchestrator.selfVerificationRequired | true | Agent verifies own work before proceeding |
| orchestrator.supervisorReviewThreshold | 0.7 | Review if confidence below 70% |
| governance.auditLevel | 'basic' | none / basic / full |
License
Apache-2.0 — Baseline Protocol Contributors
