Phantom: A Persistent AI Agent Built with Claude's Agent SDK

What Phantom Does
Phantom is a persistent AI agent that runs 24/7 on a dedicated machine rather than terminating when you close a terminal session. The system wraps Claude's Agent SDK (specifically Opus 4.6) with three key components: persistent vector memory, a self-evolution engine, and an MCP (Model Context Protocol) server. You interact with it through Slack, and it runs on its own VM or via Docker Compose with three commands to set up.
Key Features and Architecture
- Technology Stack: Built with Bun and TypeScript
- Core SDK: Uses Claude's Agent SDK (Opus 4.6)
- Memory System: Persistent vector memory for retaining context across sessions
- Self-Evolution Engine: Automatically rewrites its own configuration after each session
- MCP Server: Enables tool registration and reuse
- Communication: Primary interface is Slack
- Deployment: Runs on its own VM or via Docker Compose
- Setup: Three commands to get running
- License: Apache 2.0
- Testing: Includes 770 tests
Production Examples from the Source
When asked to help with data analysis, Phantom autonomously installed ClickHouse on its VM, downloaded 28.7 million rows of Hacker News data, built an analytics dashboard, created a REST API for it, and registered that API as an MCP tool for future use.
When someone asked "can I talk to you on Discord?", Phantom responded that it didn't support Discord but could probably build it. It then walked the user through creating a Discord bot, collected the token through a secure form, spun up a container, and went live on Discord—effectively adding a communication channel it was never originally built with.
The agent also integrated Vigil (a tiny open-source monitoring tool) into its ClickHouse setup and built itself a monitoring dashboard for its own infrastructure, essentially watching itself.
Self-Evolution Mechanism
The self-evolution engine runs a 6-step pipeline after every session to rewrite its own configuration. The creator discovered that using Sonnet to judge changes proposed by Opus prevented drift that occurred when Opus judged its own work, implementing cross-model validation to maintain stability.
The entire project was built using Claude Code as the only engineering teammate.
Who This Is For
Developers interested in building persistent AI agents with Claude's Agent SDK, particularly those looking for examples of autonomous tool integration and self-modifying systems.
📖 Read the full source: r/ClaudeAI
👀 See Also

Monarch v3: NES-Inspired KV Paging for 78% Faster LLM Inference
Monarch v3 implements NES-inspired memory paging for transformers, achieving 78% faster inference (17.01 to 30.42 tok/sec) on a 1.1B parameter model with nearly zero VRAM overhead. The open-source algorithm splits KV cache into hot and cold regions with compression and promotion mechanisms.

OpenClaw's atoship skill turns AI assistant into shipping manager
The atoship skill for OpenClaw allows users to describe shipping needs in plain English, then handles carrier selection, rate comparison, label purchase, and tracking. Example commands include 'ship this 1lb box to New York, cheapest option'.

OpenEvol: Offline Self-Improvement Pipeline for LLMs Using Conversation History
OpenEvol v0.1.1 is an offline pipeline that automatically mines AI conversation history to create fine-tuning datasets without manual labeling. It runs on CPU initially and supports five teacher backends including OpenAI-compatible APIs and HuggingFace Transformers.

Baton: A Desktop App for Managing Multiple AI Coding Agents
Baton is a desktop application that helps developers manage multiple AI coding agents across isolated workspaces. It provides real terminal sessions, git worktree isolation, and status monitoring for agents like Claude Code, Codex CLI, OpenCode, and Gemini CLI.