Skip to main content

Lilith v5.0

A dark-fantasy CLI agent that runs entirely on your hardware. Hybrid memory, swarm intelligence, MCP protocol, multi-provider LLM, batch mode, skills with hot-reload, and real-time dashboard. No cloud lock-in. No subscription. Control your PC from Telegram or the terminal.

$ cd Asgard/Lilith
$ cp .env.example .env # Configure your API keys
$ lilith # Run from anywhere

Why local-first?

Lilith is built on a simple belief: your data should stay on your machine. The LLM runs through LM Studio (localhost:1234). Memory is stored in local SQLite. Files never leave your drive. Telegram is just the remote control — the brain is at home.

:::info Key Facts

  • No API keys required for the core. LM Studio serves the model locally. Kimi available as remote fallback.
  • Works offline once LM Studio is loaded. Telegram needs internet, but the agent brain doesn't.
  • 48GB RAM + RTX 3060 can run models up to ~27B parameters with CPU offload.
  • Multi-provider — automatic fallback from LM Studio to Kimi to any OpenAI-compatible API.
  • Model auto-detection — "auto" in config picks the best loaded model from LM Studio.
  • 838 tests passing — Core, Memory, Swarm, MCP, Dashboard, CLI, TOML Config, Batch, E2E.

:::

How it works

Lilith v5.0 is organized in Six Realinos — each a module with its own law, all nourished by the same roots. The Orchestrator coordinates Skills, Memory, LLM Providers, Swarm, MCP, and Tools through a unified TOML configuration.

You (Telegram App) → Telegram Bot (Vanaheim) → [HTTP] → Gateway (FastAPI :8000) → Lilith (Orchestrator) → LM Studio (Local LLM)

The Gateway

The Gateway is the single point of contact for all external interfaces. It exposes REST endpoints for Telegram, file system operations, scheduler tasks, agents, plugins, memory, swarm, skills, and MCP.

EndpointMethodPurpose
/api/telegram/chatPOSTMain chat endpoint for Telegram messages
/api/telegram/pregunta_rapidaPOSTQuick questions (no context persistence)
/api/telegram/confirmPOSTHuman-in-the-loop confirmation
/api/pc/fsGET/POSTFile system operations
/api/scheduler/tasksGET/POSTList or create scheduled tasks
/api/agentsGET/POSTList or spawn sub-agents
/api/pluginsGETList available plugins and tools
/api/memory/*VariousVector memory read/write/search
/api/swarm/*GET/POSTSwarm management: spawn, status, kill, save, load, history
/api/skillsGET/POSTList registered skills, trigger, hot-reload
/api/mcpGET/POSTMCP server connection status and management

Core Components

🧠 Hybrid Memory (FASE 2)

Three-layer memory: vector embeddings (sentence-transformers), knowledge graph (NetworkX), and full-text search (FTS5). Auto-compression, entity extraction, session search, and context injection into every prompt. The agent remembers who you are and what you did.

🔮 Multi-Provider LLM (FASE 7)

LM Studio for local inference, Kimi (Moonshot) for remote, and any OpenAI-compatible provider. Automatic fallback when the primary provider fails. Model auto-detection via /models. Zero-config startup — just start LM Studio and go.

🤖 Swarm Intelligence (FASE 9)

Spawn LLM-powered specialist agents — researcher, coder, writer, critic — each with its own context and tool access. File locking prevents conflicts. Code shift notifications keep agents aware. Persistent sessions via SQLite. /swarm spawn, /swarm status, /swarm history.

⚡ Skills & MCP (FASE 8)

Hot-reloadable skill packs with auto-trigger. Skills inject context into prompts when relevant. MCP (Model Context Protocol) connects external tool servers dynamically. 35+ native tools for files, system, network, browser, desktop, coding, and more.

📅 Task Scheduler

Cron-like scheduling with persistent SQLite storage. Create, list, run, and delete tasks via REST or CLI. The scheduler wakes up the agent at the right time to execute background jobs.

📊 Real-time Dashboard (FASE 10)

Web dashboard with WebSocket live updates, multi-pane layout, terminal widget, and system monitoring. Watch agent activity, memory recall, swarm coordination, and tool invocations as they happen. Dark fantasy aesthetic throughout.

🔌 Plugin Architecture

Hot-pluggable tools with dynamic discovery. Enable/disable plugins at runtime. Custom tools registered by dropping a Python file in the plugins directory. Dynamic Tool Registry integrates MCP and native tools seamlessly.

📖 RAG Pipeline

Document ingestion with chunking, embedding via sentence-transformers, and semantic retrieval. Build a personal knowledge base the agent queries in real time. Index with /index, search with /search.

🖥️ PC Control

35+ native tools: file system, process management, Windows automation, browser interaction, coding assistant, network operations, desktop control. The agent can literally use your computer.

📜 TOML Config & Resilience (FASE 10)

Unified configuration in ~/.lilith/config.toml. Priority: TOML > env vars > defaults. Circuit breaker for provider failures, graceful shutdown, error tracking, and automatic recovery.

CLI & Telegram Commands

Control Lilith through the terminal CLI or remotely via Telegram. Both interfaces share the same Orchestrator, memory, and tools.

CommandDescription
/startInitialize the bot and show welcome message
/statusCheck Gateway health, memory stats, and active agents
/memoryInject a memory entry into the vector database
/recallSearch memories by semantic similarity
/tasksList scheduled tasks (via Gateway scheduler API)
/agentsList active sub-agents and their stats
/swarm spawn <task>Spawn a swarm of specialist agents for parallel work
/swarm statusShow active swarm agents and their progress
/swarm historyList past swarm sessions from SQLite
/skillsList registered skill packs and their status
/mcpShow MCP server connection status and available tools
/recall <query>Semantic search across all memories (vector + graph + FTS5)
/compactCompress old memories to free context window
/index <path>Index files/folder for RAG semantic search
/search <query>Search indexed documents semantically
/dashboardStart/stop the real-time web dashboard
/streamToggle streaming mode on/off
/pluginsList available plugins and tools
/batch <prompt>Run Lilith in batch mode with no interactive session
(any text)Sent to Lilith for processing with full context

Lilith is designed to run on consumer hardware. You don't need a data center.

MinimumRecommendedReference Build
RAM16GB32GB+48GB DDR4
CPUAny modern6+ coreAMD Ryzen 5 5500 (6c/12t)
GPUNVIDIA 12GB+ VRAMNVIDIA RTX 3060 12GB
Disk~10GB freeSSDDual SSD setup
Models7B params (Q4)13-27B params27B comfortably
ExperienceSlow but functionalFast responses, good contextSmooth