Open-source TypeScript runtime for autonomous AI agents — unified graph orchestration, cognitive memory, streaming guardrails, voice pipeline, 21 LLM providers.
npm install @framers/agentos
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}`);
Seven cooperating layers. API surface at the top, channels and providers at the floor, cognition and memory in the middle. Click to zoom.
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.
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.
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.
Full-duplex voice with endpoint detection modes, barge-in handling, diarization, and Twilio/Telnyx/Plivo telephony bridging for production IVR.
Three authoring APIs — AgentGraph, workflow() DSL, mission() — compile to one IR. judgeNode for evaluation, checkpointing for time-travel, streaming events.
8 neuroscience-grounded mechanisms with HEXACO personality modulation. Ebbinghaus decay, spreading activation, Baddeley working memory, GraphRAG retrieval with episodic-to-semantic consolidation.
5-tier pipeline: PII redaction (regex + NLP + NER + LLM), ML classifiers (ONNX BERT), topicality drift, code safety (OWASP), grounding guard (NLI). Sentence-boundary buffered.
Dataset-driven evals with candidates, graders, and experiments. LLM prompt runner and HTTP endpoint runner. Compare baseline vs challenger. Drizzle ORM with SQLite/Postgres.
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.
Signed event ledger (Ed25519 + SHA-256 hash chain), soft-delete tombstones, revision history, autonomy guard. Merkle anchoring for tamper-evident external verification.
Telegram, Discord, Slack, WhatsApp, Twitter/X, LinkedIn, Bluesky, Mastodon, and custom adapters. Multi-channel routing, social publishing, browser automation, and adapter APIs.
Sealed storage policy, toolset pinning, secret rotation, soft-forget memory. Full provenance audit trail. Deploy agents that cannot be tampered with after initialization.
generateVideo(), analyzeVideo(), detectScenes(), generateMusic(), generateSFX() APIs. 3 video providers (Runway, Replicate, Fal) + 8 audio providers. Fallback chains, scene detection, RAG indexing.
SKILL.md prompt modules for research, developer tools, communication, productivity, security, media, and creative workflows. Semantic discovery finds the right skill per turn.
Bounded self-modification: adapt_personality (HEXACO mutation with per-session budgets), manage_skills, create_workflow, self_evaluate. Ebbinghaus decay ensures unreinforced changes fade.