Skip to main content

AgentOS

Open-source TypeScript runtime for autonomous AI agents — unified graph orchestration, cognitive memory, streaming guardrails, voice pipeline, 21 LLM providers.

GitHub stars: 323npm versionTypeScriptLicense
Wilds AI
Join the Wilds AI Discord
Real-time community for AgentOS and Paracosm support and developer onboarding.
Contact the AgentOS team
Partnerships, investment, press, security, hiring — written inquiries to team@frame.dev.
npm install @framers/agentos

Quick Start

import { agent } from '@framers/agentos';

// Personality is six 0-1 trait values. The runtime appends a trait-derived
// directive to the system prompt and modulates three cognitive-memory
// mechanisms (involuntary recall, consolidation, schema encoding) based on
// honesty / emotionality / openness. Default is neutral (0.5) on every axis.
const tutor = agent({
provider: 'openai',
model: 'gpt-4o',
instructions: 'You are a patient programming tutor.',
personality: {
honesty: 0.85, // direct, transparent, no flattery
emotionality: 0.65, // tone-aware without being clinical
extraversion: 0.50,
agreeableness: 0.75, // warm, encouraging
conscientiousness: 0.90, // structured, thorough, follow-through
openness: 0.85, // creative, exploratory framing
},
memory: {
enabled: true, // session history persists automatically
cognitive: true, // Ebbinghaus decay + reconsolidation + 6 more
},
});

// Sessions scope conversation history by ID. Same agent, multiple users,
// no cross-talk — each session has its own memory bag.
const session = tutor.session('user-42');

// The agent remembers across turns. Context from the first message is
// recalled automatically in the second.
await session.send('My exam is on distributed systems next Thursday.');
await session.send('I struggle with consensus algorithms.');
const reply = await session.send('What should I focus on this week?');

console.log(reply.text);
// => "Given Thursday's exam and your block on consensus, lock in Paxos
// and Raft this week. Start with the leader-election proof…"

// Inspect what the session actually carries — full message history +
// token usage. Useful for debugging memory recall or cost.
console.log(session.messages());
const usage = await session.usage();
console.log(`Total tokens: ${usage.totalTokens}`);

System Architecture

Seven cooperating layers. API surface at the top, channels and providers at the floor, cognition and memory in the middle. Click to zoom.

AgentOS layered architecture: 7 cooperating layers from API surface (generateText, streamText, agent, agency, mission) through cognitive substrate (GMI coordinator, PersonaOverlayManager, SentimentTracker, MetapromptExecutor), memory and RAG pipeline (working / episodic / semantic / observational memory, 8 cognitive mechanisms, HyDE, GraphRAG, 7 vector backends), tools and capabilities (ToolOrchestrator, 100+ extension packs, 88 SKILL.md modules, CapabilityDiscovery, ForgeToolMetaTool), guardrails and HITL (GuardrailDispatcher, 4-tier PII redaction, ML classifiers, Grounding Guard, HumanInteract), orchestration (workflow, mission, AgentGraph, CompiledExecutionGraph, CheckpointStore), down to I/O and providers (voice pipeline, channels, media generation, 21 LLM providers, OpenRouter fanout).

Full architecture guide →

Core Features

Multimodal Provider API

Text, images, video, music, SFX, embeddings, and speech from one API. Cloud and local backends share the same surface, with fallback chains and provider preferences for load balancing.

Deep Research Agents

mission() API with Tree of Thought planning, multi-source search, grounding verification, and human-in-the-loop review. 3 autonomy modes, 5 provider strategies, and dynamic graph expansion.

Emergent Capabilities

Agents forge new tools at runtime — compose (chain existing tools) or sandbox (isolated V8 with allowlists). LLM-as-judge safety review, tiered promotion, portable YAML export.

Voice & IVR Pipeline

Full-duplex voice with endpoint detection modes, barge-in handling, diarization, and Twilio/Telnyx/Plivo telephony bridging for production IVR.

Graph Orchestration

Three authoring APIs — AgentGraph, workflow() DSL, mission() — compile to one IR. judgeNode for evaluation, checkpointing for time-travel, streaming events.

Cognitive Memory

8 neuroscience-grounded mechanisms with HEXACO personality modulation. Ebbinghaus decay, spreading activation, Baddeley working memory, GraphRAG retrieval with episodic-to-semantic consolidation.

Streaming Guardrails

5-tier pipeline: PII redaction (regex + NLP + NER + LLM), ML classifiers (ONNX BERT), topicality drift, code safety (OWASP), grounding guard (NLI). Sentence-boundary buffered.

Evaluation Framework

Dataset-driven evals with candidates, graders, and experiments. LLM prompt runner and HTTP endpoint runner. Compare baseline vs challenger. Drizzle ORM with SQLite/Postgres.

Capability Discovery

3-tier semantic discovery: category summaries (150 tokens) → top-5 matches (200 tokens) → full schemas on demand. 89% token reduction. Agents self-discover tools mid-conversation.

Provenance & Audit

Signed event ledger (Ed25519 + SHA-256 hash chain), soft-delete tombstones, revision history, autonomy guard. Merkle anchoring for tamper-evident external verification.

Channels & Social

Telegram, Discord, Slack, WhatsApp, Twitter/X, LinkedIn, Bluesky, Mastodon, and custom adapters. Multi-channel routing, social publishing, browser automation, and adapter APIs.

Immutable Agents

Sealed storage policy, toolset pinning, secret rotation, soft-forget memory. Full provenance audit trail. Deploy agents that cannot be tampered with after initialization.

Video & Audio Generation

generateVideo(), analyzeVideo(), detectScenes(), generateMusic(), generateSFX() APIs. 3 video providers (Runway, Replicate, Fal) + 8 audio providers. Fallback chains, scene detection, RAG indexing.

Curated Skills

SKILL.md prompt modules for research, developer tools, communication, productivity, security, media, and creative workflows. Semantic discovery finds the right skill per turn.

Self-Improving Agents

Bounded self-modification: adapt_personality (HEXACO mutation with per-session budgets), manage_skills, create_workflow, self_evaluate. Ebbinghaus decay ensures unreinforced changes fade.