← Back to Leaderboard
Pghostwright

ghostwright/phantom

A self-hosted Bun AI coworker with persistent memory and extensible MCP tools

Open-Source AI AppQuickstart ↓
Engineering Health (Methodology)
B · 55/100
Maintenance Activity
● Updated 5mo ago
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption17/25
Release Cadence6/20
License Clarity20/20
DockerSelf-HostedMCPAPI
Total Stars
★ 1,499
24h Growth
+0
7d Growth
+3
Forks
195

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

ghostwright/phantom Star History (2026-03-28 - 2026-12-03) ALL-TIME STAR HISTORY (2026-03 – 2026-12) +1.5k in 250d · avg +6/day 1.6k 792 0 2026-03-28: ★ 12026-04-18: ★ 1,2462026-05-09: ★ 1,3892026-05-30: ★ 1,4002026-06-20: ★ 1,4122026-07-11: ★ 1,4282026-08-01: ★ 1,4402026-08-22: ★ 1,4522026-09-12: ★ 1,4592026-10-03: ★ 1,4732026-10-24: ★ 1,4802026-11-09: ★ 1,4892026-12-03: ★ 1,499 ★ 1.5k 2026-03 2026-07 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Phantom is a persistent TypeScript service on Bun, not a library embedded in a client. Slack, web chat, Telegram, email, webhooks, and the CLI feed a shared runtime built around @anthropic-ai/claude-agent-sdk query() and hooks. The prompt assembler combines base instructions, a YAML-defined role, evolved configuration, and retrieved memory. Qdrant holds three collections for tiered vector memory, Ollama provides embeddings, and SQLite is a separate component of the stack.

The runtime also acts as an MCP server. External clients connect over Streamable HTTP to invoke eight universal tools plus role-specific and dynamically registered tools. Dynamic tools persist across restarts, so a newly generated capability can become a lasting integration surface. The package exposes a phantom CLI and a build:chat-ui script; chat-ui/ and the dependencies @modelcontextprotocol/sdk, @slack/bolt, and telegraf reflect the separation between the browser interface, protocol layer, and messaging adapters.

Key Capabilities & Differentiators

Phantom can run recurring work in a dedicated environment, publish authenticated pages, and send reports under its own email identity. Its six-step evolution pipeline proposes changes to agent configuration between sessions, applies five validation gates, can use LLM judges, and records versions for rollback. This changes configuration rather than training model weights. Runtime tool registration is a separate mechanism: it lets Phantom expose a new capability through MCP without waiting for a release.

Model routing is configured in YAML. Anthropic is the default; Z.AI, OpenRouter, Ollama, vLLM, LiteLLM, and custom Anthropic Messages API-compatible endpoints are also supported. The configured provider serves the main agent and any evolution judges. Keeping the tool interface and memory stack in place makes switching backends easier, but it does not establish equivalent tool-use or judging quality. For team workflows, /chat supports SSE streaming, file attachments, and Web Push, while magic-link forms use AES-256-GCM for credential collection.

Trade-offs & Limitations

Compared with a session-based chat assistant, Phantom can keep a workspace, memory, and scheduled jobs alive independently of the user's laptop. Compared with a fixed workflow runner, it can create tools and adjust its configuration as the work changes, but that widens the audit surface. Versioned configuration helps undo behavioral drift; it will not undo an email, a database write, or a service already created. Review generated tools before sharing them and scope outbound integrations to the work they actually need to perform.

The key isolation caveat is the full Compose stack's /var/run/docker.sock mount. It lets Phantom launch sibling containers and gives the process root-equivalent authority over the Docker daemon, so the container is not a strong security boundary for the host. Run that stack on a dedicated VM or host and restrict access to web and MCP endpoints. Self-hosting controls where Phantom runs, not necessarily where inference requests go: hosted models reduce local compute needs, while local models shift capacity and maintenance to the operator.

Hardware & Deployment Guide

Docker is the recommended route. The end-user path uses docker-compose.user.yaml as the Compose file and .env.example as the basis for .env. Configure the selected provider and only the channels you plan to use, launch with docker compose up -d, and check http://localhost:3100/health on the default mapping. The full docker-compose.yaml builds Phantom from the root Dockerfile, maps ${PORT:-3100}:3100, and points memory at http://qdrant:6333 and http://ollama:11434 inside the Compose network.

For a Bun-based setup, bun run phantom init --yes initializes configuration; the memory setup starts Qdrant and Ollama and pulls nomic-embed-text. Hosted generation avoids running a local generation model but does not eliminate the full stack's local embedding workload. For a local-only deployment, account separately for generation, embeddings, and any network-dependent channels or tools. Size for the model, concurrency, and services the agent may start. No latest release is listed; pin a tested revision rather than treating a moving branch as an upgrade baseline.

Runtime: TypeScript on Bun routes channel input into Claude Agent SDK query() and hooks, with YAML-defined roles shaping prompt assembly.
Memory: Three tiers of vector memory use three Qdrant collections and Ollama embeddings; SQLite is also part of the stack.
Extensibility: Streamable HTTP MCP serves universal, role-specific, and dynamically registered tools; dynamic tools survive restarts.
Configuration lifecycle: A six-step evolution pipeline uses five validation gates, optionally invokes LLM judges, and retains versions for rollback.
User interfaces: /chat streams over SSE and supports attachments and Web Push; Slack, Telegram, email, webhooks, and CLI provide additional entrypoints.
Credential handling: Magic-link forms use AES-256-GCM encryption; outbound email can be enabled with RESEND_API_KEY.
Best For

Teams that want an always-on coworker for recurring reports, internal dashboards, or reusable MCP tools, and can operate a dedicated VM and review agent-generated changes.

Skip If

A chat interface or fixed workflow already meets the need, workloads must share a host without Docker-daemon access, or every external action requires centrally enforced approval that you have not verified in deployment.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPAPI
curl -fsSL https://raw.githubusercontent.com/ghostwright/phantom/main/docker-compose.user.yaml -o docker-compose.yaml
curl -fsSL https://raw.githubusercontent.com/ghostwright/phantom/main/.env.example -o .env
# Edit .env - add your ANTHROPIC_API_KEY, Slack tokens, and OWNER_SLACK_USER_ID
docker compose up -d

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
phantom ★1.5k+3TypeScriptApache-2.0A self-hosted Bun AI coworker with persistent memory and extensible MCP tools
TrendRadar64.1k+181TypeScriptGPL-3.0Self-hosted trend monitor for ranked news, RSS, and web search, with MCP and ale
pentagi35.7k+489GoMITSelf-hosted multi-agent penetration testing with logs and reports for human revi
n8n213.1k+787TypeScript—Visual Node.js platform for self-hosted workflows and multi-step AI agents

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/ghostwright/phantom.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

ghostwright/phantom Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about phantom

How do users and external agents connect to Phantom?

Web chat uses SSE at /chat for human interaction. Programmatic clients such as Claude Code can connect to Phantom's MCP server over Streamable HTTP. The server exposes universal, role-specific, and dynamically registered tools; dynamic registrations persist across restarts. Treat MCP access as permission to invoke tools, not merely permission to view chat.

Do I need a GPU, and what should I size for?

Not necessarily. With a hosted generation model, the local stack still needs to run the Bun service, Qdrant, and the Ollama embedding workload if you keep the full Compose memory setup. If you also serve the generation model locally, capacity depends on model size, quantization, context length, and concurrency. Budget separately for any databases, browsers, or sibling containers the agent runs; there is no verified fixed RAM or VRAM requirement.

Can we self-host Phantom for commercial use?

Yes. Apache-2.0 permits commercial use and self-hosting. If you redistribute Phantom or a modified build, meet the applicable license, notice, and change-marking obligations. Model providers and connected services have their own terms. Self-hosting the application does not by itself keep model requests on-premises when the configured backend is external.

When is Phantom a better fit than a chat assistant or a scheduled workflow?

Choose Phantom when you need a long-lived workspace, cross-session memory, and tools that other clients can call over MCP. Use a chat assistant for interactive work that does not need persistent execution, or a fixed scheduler and scripts for workflows with known steps that must remain predictable. Phantom is most useful when the work changes enough to justify reviewing its generated tools and configuration changes.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining ghostwright/phantom? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature ghostwright/phantom on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare