Elpis is a self-hosted, single-agent runtime built around one programmable tool: JavaScript executed in a persistent sandbox.
It gives an agent a durable home rather than a stateless chat session: one continuous conversation across Discord rooms and a local web console, a filesystem-backed identity and memory, restart-safe transcripts, scheduled and autonomous wakes, a dependency-aware work graph, and the ability to inspect and maintain its own runtime.
Security model: Full-capability Elpis is designed for a dedicated machine or VM operated for one trusted agent. The sandbox is a coordination boundary, not a hostile-code boundary. The agent can deliberately shell out, use passwordless sudo when provisioned by the installer, edit the harness, and restart services. The official restricted container is a separate non-root, read-only-harness profile with a narrower capability surface.
- One agent, one thread. Inputs from configured Discord rooms and the console enter one causally ordered history. Every message retains room provenance.
- Programmable action with scoped context. The resident model receives
run(code)plus an on-demandskill(names)loader. JavaScript can call namespaced capabilities such aselpis.channel,elpis.schedule,elpis.mind,elpis.browser, andelpis.computer; nearest-scopeAGENTS.mdinstructions interrupt supported file tools before first access. - Persistent working state. Top-level JavaScript bindings survive tool calls within the process. Long-lived state belongs in the data directory.
- Durable identity and memory.
SOUL.md,MEMORY.md,people/,ponder/, transcripts, andelpis-data/elpis.dbsurvive restarts and model changes. - Context without silent deletion. Provider requests are projections of the durable record: completed-turn display reasoning and untrusted opaque state may be omitted, while transcripts remain complete. Compaction writes a marked summary and preserves the original record on disk.
- Self-maintenance. The agent can inspect source, edit files, run tests, commit changes, and deploy a verified build.
- Local extensions. Trusted flat modules and npm-shaped package directories in the private data directory can add frozen
elpis.ext.*APIs and deterministic boot-time prompt blocks without hardcoding inhabitant-specific tools into core. - Autonomous operation. Heartbeats, scheduled tasks, background-job completion, and reminders can wake the same continuing agent.
- Bounded coding collaboration. An opt-in authenticated MCP adapter lets external coding agents work through the canonical Mind graph and task-bound correspondence without becoming parallel copies of the resident agent.
| Surface | Purpose |
|---|---|
| Discord | Conversation, ambient rooms, attachments, slash commands, moderation, and outbound messages |
| Elpis Console | Thread, live streaming, context inspection, logs, usage, chat ingress, and Mind UI |
| Elpis Gateway | Optional authenticated multi-resident control plane over the existing Console dashboard |
| JavaScript sandbox | Persistent programmable tool environment |
| Data-directory extensions | Trusted local APIs and deterministic prompt additions under elpis.ext.* |
| Mind | Dependency-aware projects, tasks, ideas, questions, comments, tags, and reminders |
| Coding-agent MCP | Opt-in authenticated adapter over Mind plus task-bound correspondence with the resident agent |
| Browser / computer | Stateful Playwright sessions and a persistent Linux desktop |
| Workers | Mind-rooted bounded worker episodes |
- A fresh dedicated Debian 13 VM or machine is the supported deployment target.
- Node.js 22.12 or newer; the installer provisions Node.js 24.
- A Discord application and bot token.
- One configured LLM provider.
- For the full desktop surface, a VM with a virtual display supported by Xorg.
The installer provisions system packages, a dedicated service user, Node.js, the checkout, dependencies, the build, systemd units, and a private config.yaml.
git clone https://github.com/avafloww/elpis.git
cd elpis
sudo ./deploy/install.shThe installer is intended for a new dedicated host. Read docs/install.md before using it on an existing system.
For a restricted container deployment, use ghcr.io/avafloww/elpis:latest and follow docs/container.md. For the namespaced Kubernetes lifecycle broker, see docs/kubernetes.md. For the optional multi-resident control plane, see docs/gateway.md.
For a manual development checkout:
npm ci
cp config.example.yaml config.yaml
chmod 600 config.yaml
# edit config.yaml
npm run build
npm startConfiguration reference: docs/config.md. Context resources: docs/context-resources.md. Extensions: docs/extensions.md. Coding-agent MCP: docs/mcp.md.
llm:
provider_type: openai-compatible
api_key: ${OPENAI_API_KEY}
base_url: https://api.openai.com/v1
model: gpt-4o
context_size: 128000
discord:
bot_token: ${DISCORD_BOT_TOKEN}
guilds:
- id: '111111111111111111'
slug: home
tier: home
channels:
- id: '222222222222222222'
name: general
tier: direct
paths:
data_directory: ../dataconfig.yaml is ignored by Git and should remain mode 0600. OAuth credentials and structured state are stored in DATA_DIRECTORY/elpis-data/elpis.db; transcripts and private diagnostic bundles live under DATA_DIRECTORY/elpis-data/.
- OpenAI-compatible APIs through Chat Completions or Responses.
- Anthropic Messages through the optional subscription OAuth adapter.
- OpenAI Codex Responses through the optional ChatGPT device-code adapter.
The subscription adapters use provider-internal or product-specific contracts rather than ordinary public API keys. Read their trust and compatibility notes before enabling them:
npm run build
npm run test:unit # deterministic, no-network suite
npm test # includes environment-sensitive integration tests
npm run bench:checkThe repository is intentionally source-first: TypeScript tests import src/ through tsx; production runs the built dist/ tree.
Read AGENTS.md before changing load-bearing loop, persistence, compaction, prompt, or sandbox code.
docs/architecture.md— runtime and data flowdocs/container.md— restricted non-root GHCR deploymentdocs/kubernetes.md— namespaced restricted restart broker and target three-Pod boundarydocs/gateway.md— optional multi-resident Console control planedocs/context.md— monocontext and request assemblydocs/compaction.md— background folding and quality gatesdocs/persistence.md— files, SQLite, transcripts, and custodydocs/sandbox.md— JavaScript execution and capability surfacedocs/extensions.md— trusted data-directory APIs and prompt blocksdocs/console.md— web consoledocs/mind.md— work graphdocs/workers.md— native Mind-rooted workersdocs/testing.md— test strategySECURITY.md— threat model and vulnerability reporting
Elpis is a living personal-agent runtime, not a multi-tenant platform or hardened remote-code-execution service. Interfaces may evolve with the needs of the inhabitant. Releases should preserve data compatibility or document migrations explicitly.
MIT licensed. See LICENSE.