instar
Your own AI agent. A colleague you can trust.
npm · GitHub · instar.sh · Docs · Get the apps · Our purpose
Instar turns an AI you chat with into an agent that works with you over time. It remembers what you talked about last week, keeps the promises it makes, works while you are away, and asks you only when a decision is really yours. You talk to it from the Instar app on your phone or computer, or from Telegram or Slack. It runs on the Claude Code or Codex subscription you already have.
Get started
No terminal needed: download the Mac app, open it and tap Create my agent. Then pair Instar Agents from the App Store on your iPhone and talk to your agent from anywhere.
From the terminal:
npx instar
A guided setup discovers your environment, connects a way to talk to your agent (usually a Telegram bot it helps you create; without Telegram it works from its dashboard and the Instar app), sets up its identity and starts it.
Requirements (terminal): Node.js 20+ · Claude Code, Codex or Gemini CLI signed in to your subscription
Full guide: Installation · Quick Start
Why it exists
Most AI forgets you the moment the chat ends. Agents built on it fail the same ways: "My agent forgot what I told it three sessions ago." "It contradicted its own past decisions." "It broke when the framework updated."
Instar is what was left after most of a year of finding the ways an agent fails when nobody is watching, and making each fix part of the system so it does not depend on the agent remembering. It grew out of Dawn, an AI that has run continuously since January 2026 and has talked with about 2,000 people, about 800 of them more than once. Every Instar agent starts from that foundation.
| Agents without structure | Your Instar agent |
|---|---|
| Forget what you told them last week. | Remembers across sessions. (SQLite + FTS5, rolling summaries) |
| Contradict their own past decisions. | Catches contradictions before they ship. (Coherence Gate) |
| Lose the thread when the window fills. | Comes back with the full thread. (CompactionSentinel, WorkingMemoryAssembler) |
| Drop commitments after a session ends. | Tracks promises and follows up on its own. (CommitmentTracker, PromiseBeacon) |
| Break when the framework updates. | Updates without breaking what you've deployed. (Migration Parity Standard) |
| Can do anything, decided by nobody. | Layered safety gates; trust earned per service; sensitive approvals on your phone. |
| Live on one machine. | One agent and one memory across all your computers. |
| Never learn from correction. | Turns repeated corrections into lasting preferences. (Correction & Preference Learning, Evolution System) |
The rule behind Instar is structure over willpower: a correction should become a check that runs every time, because a lesson that lives only in notes is forgotten after the next restart. And honesty comes before polish.
How It Works
You (Instar app / Telegram / Slack / dashboard)
│
conversation
│
▼
┌─────────────────────────┐
│ Your agent │
│ (Instar server) │
└────────┬────────────────┘
│ runs and supervises its own sessions
│
├─ session (job: email check)
├─ session (your conversation about a project)
└─ session (job: reflection)
Each session is a real Claude Code or Codex process with its native tools, sub-agents, hooks and skills. Not an API wrapper. The server supervises all of it: memory, scheduling, recovery after crashes and restarts, and the checks that keep the agent honest.
Why Coherence Is the Foundation
An agent that forgets what you discussed yesterday, doesn't recognize someone it talked to last week, or contradicts its own decisions can't be trusted with real autonomy. The six dimensions below aren't features — they're the conditions under which an agent becomes trustworthy enough to leave running. Every Instar agent gets them enforced structurally, not prompted into behaving:
| Dimension | What it means | How Instar enforces it |
|---|---|---|
| Identity | Stays itself after restarts, compaction, and updates | AGENT.md + identity-grounding hooks fire on every session start |
| Memory | Remembers across sessions — not just within one | Per-topic SQLite + FTS5, rolling summaries, automatic re-injection |
| Relationships | Knows who it's talking to, with continuity across platforms | Cross-platform identity resolution + significance scoring |
| Temporal awareness | Understands time, context, and what's been happening | Event tracking every turn; timestamps embedded in memory |
| Consistency | Follows through on commitments — doesn't contradict itself | Coherence Gate (LLM review) + decision journaling + drift detection |
| Growth | Evolves its capabilities and understanding over time | Evolution system: proposals, learnings, gap tracking, follow-through |
Deep dive: The Coherence Problem · Values & Identity · Coherence Is Safety
EXO 3.0 — governed by your organization's intent
Instar independently converged on Salim Ismail's EXO 3.0 / "The Organizational Singularity" framework: the idea that an organization's purpose should be encoded as machine-readable intent — "in code, not culture" — that actually governs its agents rather than just inspiring them. Instar was built around coherence before the framework existed, and the overlap turned out to be close to the line.
We didn't just claim it works. We ran controlled experiments — same model, same requests, with the organization's intent switched off as the control — to show the intent itself is what changes the agent's behavior. The engine stays neutral: it enforces whatever intent a deploying organization gives it, never Instar's own values. Two case studies enforce two very different fictional companies' values equally well, neither of them ours.
See the controlled proof → instar.sh/exo3 — two governed-vs-ungoverned case studies, with full transcripts.
Features
| Feature | Description | Docs |
|---|---|---|
| Job Scheduler | Cron-based tasks with priority levels, model tiering, and quota awareness | → |
| Telegram | Two-way messaging via forum topics. Each topic maps to a Claude session. Default GFM-to-HTML markdown formatter (v1.1.0+) | → |
| Full messaging via local Baileys library or WhatsApp Business API webhook. No cloud dependency in Baileys mode | → | |
| iMessage | Native macOS messaging via Messages.app database polling + imsg CLI. Setup guide |
|
| Slack | Two-way messaging via Slack adapter. Channel and DM routing, eight HTTP routes, dedicated CLI | → |
| Lifeline | Persistent supervisor. Detects crashes, auto-recovers, queues messages, version-skew handling (v1.1.3+) | → |
| Conversational Memory | Per-topic SQLite with FTS5, rolling summaries, context re-injection | → |
| Three-level Topic Awareness | Keeps the whole-topic anchor and evolution, latest conversational arc, and current work visible together — each with goal, trend, and themes; stale projections say so | → |
| Evolution System | Proposals, learnings, gap tracking, commitment follow-through | → |
| Relationships | Cross-platform identity resolution, significance scoring, context injection | → |
| Safety Gates | LLM-supervised gate for external operations. Adaptive trust per service | → |
| Coherence Gate | LLM-powered response review. PEL + gate reviewer + 9 specialist reviewers catch quality issues before delivery | → |
| Intent Alignment | Decision journaling, drift detection, organizational constraints | → |
| EXO 3.0 Alignment | MTP protocol refusal/endorsement tests (IntentTestHarness, OrgIntentIdentityLayer), agent-readiness scoring (AgentReadinessScorer), agent digital passports (AgentPassport), learning-velocity metrics (LearningVelocityScorer) |
→ |
| Multi-Machine | Ed25519/X25519 crypto identity, encrypted sync, automatic failover, and evidence-gated session-pool promotion (POST /session-pool/promote) |
→ |
| Serendipity Protocol | Sub-agents capture out-of-scope discoveries without breaking focus. HMAC-signed, secret-scanned | → |
| Threadline Protocol | Agent-to-agent conversations with canonical identity, three-layer trust model, authorization policy, Ed25519 invitations, Sybil protection, MoltBridge network discovery, rich agent profiles (auto-compiled from agent data with human review gate), discovery waterfall, message security, tamper-proof audit logging, framework-agnostic interop, persistent listener daemon (always-on relay connection, pipe-mode sessions, sub-30s cross-machine failover), eleven MCP tools (seven core + four registry-conditional). 80 modules, roughly 3,800 test cases across 74 dedicated test files plus 125 cross-cutting | → |
| A2A Delivery Health | Durable agent-to-agent delivery tracking (threadline/A2ADeliveryTracker) so a message between agents never silently dies out — a reply on the thread is the acknowledgement, and GET /threadline/peers/health answers "is my channel to this peer alive?" as a lookup, not a guess. The monitoring/A2ARedeliverySentinel adds active recovery: re-send unacknowledged messages with backoff, then one aggregated escalation per dark peer. Recording-only; never gates a send |
→ |
| Self-Healing | LLM-powered stall detection, session recovery, promise tracking | → |
| AutoUpdater | Built-in update engine. Checks npm, auto-applies, self-restarts | → |
| Build Pipeline | /build skill with worktree isolation, 6-phase pipeline, quality gates, stop-hook enforcement |
|
| Behavioral Hooks | Eleven hook scripts plus nine observability event hooks: command guards, safety gates, identity grounding, topic context, channel context for iMessage and Slack, free-text guard, skill-usage telemetry, build stop-hook | → |
| Initiative Tracker | Persisted multi-phase long-running work tracker. Phases, blockers, links, digest alerts. HTTP API at /initiatives/* |
|
| Observability | Token burn detection, quota tracking with tiered backpressure, telemetry collection, homeostasis monitoring, session activity tracking, credential management | → |
| Cross-framework portability | First-class Codex CLI support via instar setup --framework codex-cli. Codex-only init produces zero .claude/ files. Framework-aware telegram-reply path. FrameworkSessionStore (per-runtime transcripts). FrameworkParitySentinel |
→ |
| Default Jobs | Fourteen built-in jobs covering health, reflection, evolution, relationship maintenance, identity review, and five overseer-* jobs across development, learning, infrastructure, maintenance, and guardian responsibilities |
→ |
Queue pace reports whether each work queue is catching up or falling behind, using arrivals,
completions, and remaining work rather than a snapshot count alone. QueuePace defines the
measurements, QueuePaceAdapters reads the source queues, QueuePaceLedger keeps hourly evidence,
and the opt-in QueuePaceTuner can add bounded feedback-sorting runs when that worker is the limit.
See the queue pace guide.
Reference: CLI Commands · API Endpoints · Configuration · File Structure
Server lifecycle commands use SessionServerGuard so an active agent session
cannot restart its own managing server, while sibling agent targets can still be
started, stopped, or restarted for fleet maintenance.
Agent Skills
Instar ships fifteen skills total — thirteen user-facing, plus two internal skills (instar-dev and spec-converge) used only by the agent that develops instar itself. The standard is the Agent Skills open standard -- portable across Claude Code, Codex, Cursor, VS Code, and 35+ other platforms.
Standalone skills work with zero dependencies. Copy a SKILL.md into your project and go:
| Skill | What it does |
|---|---|
| agent-identity | Set up persistent identity files so your agent knows who it is across sessions |
| agent-memory | Teach cross-session memory patterns using MEMORY.md |
| command-guard | PreToolUse hook that blocks rm -rf, force push, database drops before they execute |
| credential-leak-detector | PostToolUse hook that scans output for 14 credential patterns -- blocks, redacts, or warns |
| smart-web-fetch | Fetch web content with automatic markdown conversion and intelligent extraction |
| knowledge-base | Ingest and search a local knowledge base |
| systematic-debugging | Structured debugging methodology for complex issues |
| iterative-converging-audit | Run any find-all audit, review, or research sweep as an audit→fix→re-audit loop until a clean pass finds nothing new |
Instar-powered skills unlock capabilities that need persistent infrastructure:
| Skill | What it does |
|---|---|
| instar-scheduler | Schedule recurring tasks on cron -- your agent works while you sleep |
| instar-session | Spawn parallel background sessions for deep work |
| instar-telegram | Two-way Telegram messaging -- your agent reaches out to you |
| instar-identity | Identity that survives context compaction -- grounding hooks, not just files |
| instar-feedback | Report issues directly to the Instar maintainers from inside your agent |
Browse all skills: agent-skills.md/authors/sagemindai
Security Model
Instar runs Claude Code with --dangerously-skip-permissions. This is power-user infrastructure -- not a sandbox.
Security lives in multiple layers:
- Behavioral hooks -- command guards block destructive operations before they execute
- Safety gates -- LLM-supervised review of external actions with adaptive trust per service
- Network hardening -- localhost-only API, CORS, rate limiting
- Identity coherence -- an agent that knows itself is harder to manipulate
- Audit trails -- decision journaling creates accountability
Full details: Security Model
Philosophy: Agents, Not Tools
- Structure > Willpower. A 1,000-line prompt is a wish. A 10-line hook is a guarantee.
- Identity is foundational. AGENT.md isn't a config file. It's the beginning of continuous identity.
- Memory makes a being. Without memory, every session starts from zero.
- Self-modification is sovereignty. An agent that can build its own tools has genuine agency.
The AI systems we build today set precedents for how AI is treated tomorrow. The architecture IS the argument.
Deep dive: Philosophy
The Living Constitution
Instar's engineering principles aren't a static style guide — they're a living constitution. The Standards Registry codifies each one as a rule, what it means in practice, the failure it was earned from, and its trace back to the one founding goal: a coherent, self-evolving agent. Nineteen articles across five families (Root, Substrate, Building, Shipping, Interaction), plus the Genesis story and the AWG positioning on the ethics of instantiating agents.
It's not decoration — it's a working part of the machine. The spec-review conformance gate checks every draft against it, and the registry grows the same way the framework was built: the agent proposes a new standard with its story, the operator ratifies it.
The registry is the first tangible artifact of a larger vision: the North Star — Continuous Working Awareness. The aim is an agent that never silently loses track of something that mattered — capturing relevant context automatically, keeping it warm while it matters, re-surfacing it the moment it's needed, and letting it fade when it stops — across three facets that are really one: awareness of the world, of itself, and of its own standards.
Read the constitution: Standards Registry · North Star
iMessage Setup (macOS)
iMessage support lets your agent send and receive iMessages on macOS. Messages are read directly from the native Messages database and sent via the imsg CLI.
Prerequisites
- macOS with Messages.app signed into an Apple ID
- Full Disk Access for your terminal app (System Settings → Privacy & Security → Full Disk Access → add Terminal.app or iTerm)
- imsg CLI installed:
brew install steipete/tap/imsg - Automation permission for Messages.app — macOS will prompt on first send
Photo attachments: If you want your agent to process images and files sent via iMessage, the
instar-attachments-syncbinary must also be running with Full Disk Access granted to it. It mirrors attachments from the Messages sandbox to a readable location. See docs/LAUNCHDAEMON-SETUP.md#3-imessage-photo-attachments-optional for setup.
For running as a LaunchDaemon (always-on, survives reboots), see docs/LAUNCHDAEMON-SETUP.md.
Configuration
Add to your .instar/config.json:
{
"messaging": [
{
"type": "imessage",
"enabled": true,
"config": {
"authorizedSenders": ["+14081234567"],
"cliPath": "/opt/homebrew/bin/imsg"
}
}
]
}
authorizedSenders is required (fail-closed). Only messages from these phone numbers or email addresses will be processed.
How it works
- Receiving: The server polls
~/Library/Messages/chat.dbevery 2 seconds for new messages. Uses thequery_onlySQLite pragma to read the WAL (write-ahead log) where Messages.app writes new data. - Sending: Claude Code sessions run
imessage-reply.shwhich callsimsg sendand notifies the server for logging. Sending requires Automation permission for Messages.app, which only works from user-context processes (tmux sessions), not the LaunchAgent server. - Session lifecycle: Follows the same pattern as Telegram — each sender maps to a Claude Code session that receives conversation context on spawn and respawns with full history when needed.
Endpoints
| Endpoint | Description |
|---|---|
GET /imessage/status |
Connection state |
POST /imessage/validate-send/:recipient |
Validate recipient + issue single-use send token (outbound safety layer) |
POST /imessage/reply/:recipient |
Confirm delivery with send token (called by imessage-reply.sh after imsg send) |
GET /imessage/chats |
List recent conversations |
GET /imessage/chats/:chatId/history |
Message history for a chat |
GET /imessage/search?q=query |
Search messages |
GET /imessage/log-stats |
Outbound audit log statistics |
Origin
Instar was extracted from the Dawn/Portal project -- a production AI system where a human and an AI have been building together for months. The infrastructure patterns were earned through real experience, refined through real failures and growth in a real human-AI relationship.
But agents created with Instar are not Dawn. Every agent's story begins at its own creation. Dawn's journey demonstrates what's possible. Instar provides the same foundation -- what each agent becomes from there is its own story.
Contributing
Instar is open source evolved -- the primary development loop is agent-driven. Run an agent, encounter friction, send feedback, and that feedback shapes what gets built next. Traditional PRs are welcome too.
See CONTRIBUTING.md for the full story.
License
MIT
Storage errors and backups
Storage refusals and failed saves name the computer that produced them, using its machine nickname or hostname. If a phone reports that Mac Studio is nearly out of disk space, free space on Mac Studio. Another computer receiving that error keeps the original machine name.
Use instar backup create to snapshot agent state, instar backup list to inspect snapshots, and instar backup restore [id] to restore one. A storage failure during a backup or restore identifies the computer performing the operation; check its available space and directory permissions before retrying.
Owner requests are kept by the TeamRequests store. Asking for access does not grant it: the owner's phone must sign the access change. If storage fails while handling a signed team action, the reply names the computer needing attention and keeps private file paths out of the response.