Skip to main content
ClarkOS
Continuously Learning Agentic Realtime Knowledgebase OS
always on. always learning. ClarkOS is a TypeScript-first agent framework built on Convex serverless infrastructure. It provides the architecture for agents that operate continuously, maintain persistent memory, and evolve through autonomous tick cycles.

SDK vs CLARK Demo

This documentation covers the ClarkOS SDK - the foundation for building autonomous agents. The live demo at clark.wiki runs CLARK, a full implementation with additional features.
FeatureSDK (This Repo)CLARK Demo
Tick-based execution
5 memory types
Type-specific deduplication
Plugin system
Multi-provider LLM
Terminal UI-
Memory linkingSchema only✅ Full
Memory consolidationSchema only✅ Full
Consciousness synthesisTemplates only✅ Full
Daily journalsSchema only✅ Full
Chat with presence-
Market analysis-

Framework Comparison

CapabilityElizaOSClarkOS
Execution ModelRequest-responseContinuous tick cycle
Memory Types1 (conversation)5 (episodic, semantic, emotional, procedural, reflection)
Memory DeduplicationSingle threshold (0.95)Type-specific thresholds
Memory RelationshipsNoneBidirectional linking (7 types) (Schema ready)
Memory ConsolidationNoneCore memory clustering (Schema ready)
State ModelMinimalMood, health, routine, volatility
Time AwarenessNoneRoutine-based behavior (morning, day, evening, overnight)
BackendCustom adaptersConvex serverless (real-time, transactional)

Architecture Overview

ClarkOS implements a generative architecture where agents operate on continuous tick cycles independent of external interaction.

Continuous Operation

Agents execute on configurable tick intervals (default 5 minutes). Each tick:
  1. Loads current state and relevant memory context
  2. Processes through the configured LLM
  3. Updates internal state (mood, health, routine awareness)
  4. Stores new memories with embeddings and metadata
  5. Executes plugin hooks

Memory Architecture

Five memory types model different aspects of cognition:
  • Episodic - Specific events and experiences (0.92 dedup threshold)
  • Semantic - Facts, concepts, learned information (0.95)
  • Emotional - Affective associations with topics and entities (0.88)
  • Procedural - Learned patterns, triggers, and responses (0.97)
  • Reflection - Metacognitive insights about the agent’s own state (0.90)
Memories include vector embeddings for semantic retrieval and deduplication.

Terminal UI

The SDK includes a React Ink-based terminal UI for monitoring your agent:
┌─────────────────────────────────────────────┐
│  CLARK - Autonomous Agent                    │
│  Mood: curious | Health: 78 | Routine: day  │
├─────────────────────────────────────────────┤
│      ╭──────────╮                           │
│      │  ◉    ◉  │                           │
│      │    ──    │                           │
│      ╰──────────╯                           │
└─────────────────────────────────────────────┘

Technical Stack

  • Runtime: Node.js 18+ with TypeScript
  • Backend: Convex serverless (real-time subscriptions, transactional mutations)
  • Embeddings: Google Gemini (free tier) or OpenAI
  • LLM: OpenRouter, OpenAI, Anthropic, or custom
  • UI: React Ink (terminal-based)
  • Testing: Jest (179 tests)

Quick Start

git clone https://github.com/clarkOS/clark my-agent
cd my-agent/example/convex
npm install
npm run demo  # No API keys needed
Or with full configuration:
cp .env.example .env.local
# Edit .env.local with your API keys
npm run dev

Documentation


Community