Your personal AI daemon β fork it, mold it, make it yours.
A single-process AI assistant that runs scheduled jobs, chats across every channel, manages its own memory, and evolves with you.
HeyClara is a personal AI assistant daemon powered by the Claude Agent SDK. It runs as a single background process on your machine, connecting to Telegram, Slack, Voice/SMS (Twilio), and your terminal β while autonomously running scheduled jobs, consolidating memory, and managing a deep persona system.
Unlike enterprise AI platforms with microservices and message queues, HeyClara is built for one user. It's small enough to read in an afternoon, runs as a single daemon, and acts as your personalized AI co-founder.
You talk to Clara. Clara remembers. Clara works while you sleep.
| | |
Telegram/Slack 2-stage memory Scheduled jobs
Voice/SMS/CLI consolidation with working state
| Principle | What it means |
|---|---|
| Small enough to understand | One process, one daemon. No microservices, no queues, no Kubernetes. |
| Customization = code changes | Want different behavior? Modify the source. The codebase is deliberately tiny. |
| AI-Native | No dashboards. You configure and debug by talking to Clara. |
| Skills over features | Instead of bloating core, you add SKILL.md folders that teach Clara new capabilities. |
| Single-agent architecture | One capable agent with tools beats multi-agent orchestration. Research-backed. |
graph TD
classDef user stroke-width:2px,stroke:#6366f1,fill:#eef2ff,color:#312e81
classDef daemon stroke-width:2px,stroke:#8b5cf6,fill:#f5f3ff,color:#4c1d95
classDef ai stroke-width:2px,stroke:#10b981,fill:#ecfdf5,color:#064e3b
classDef db stroke-width:2px,stroke:#f59e0b,fill:#fffbeb,color:#78350f
classDef channel stroke-width:2px,stroke:#ec4899,fill:#fdf2f8,color:#831843
User(("You")):::user
subgraph Channels["External Channels"]
direction LR
Slack["Slack<br/>(Bolt + Socket Mode)"]:::channel
Telegram["Telegram<br/>(grammY)"]:::channel
Voice["Voice & SMS<br/>(Twilio + OpenAI)"]:::channel
CLI["Terminal REPL"]:::channel
end
subgraph Daemon["HeyClara Daemon Β· Bun.js Β· Single Process"]
direction TB
Router{"Channel<br/>Router"}:::daemon
Engine["Chat Engine<br/>(Sessions + Streaming)"]:::daemon
Scheduler["Job Scheduler<br/>(Cron + Interval + Once)"]:::daemon
MCP["MCP Tool Server<br/>(24 Tools)"]:::daemon
Finalizer["Session Finalizer<br/>(Consolidator + Summarizer)"]:::daemon
Alive["Alive Monitor<br/>(60s Heartbeat)"]:::daemon
Identity["Identity Loader<br/>(Persona + Skills + Agents)"]:::daemon
end
subgraph AI["AI Layer"]
Claude["Claude Agent SDK<br/>(query + streaming)"]:::ai
Codex["Codex CLI<br/>(failover backend)"]:::ai
Agents["Subagents<br/>(Marketer, Dev, Custom)"]:::ai
end
subgraph Persistence["Persistence Layer"]
PG[("PostgreSQL<br/>Jobs Β· Messages Β· Sessions")]:::db
FS[("~/.heyclara/<br/>Config Β· Persona Β· State")]:::db
end
User --> Slack & Telegram & Voice & CLI
Slack & Telegram & Voice & CLI --> Router
Router --> Engine
Scheduler -.->|triggers| Engine
Engine <--> Claude
Claude <-->|failover| Codex
Claude <--> Agents
Claude <--> MCP
Engine --> Finalizer
Finalizer --> PG & FS
MCP --> PG & FS
Alive -.->|health checks| PG
Identity -.->|loads| FS
FS -.->|persona + config| Engine
sequenceDiagram
autonumber
actor User as You
participant Ch as Channel Adapter
participant Eng as Chat Engine
participant Id as Identity Loader
participant SDK as Claude Agent SDK
participant Tools as MCP Tools (24)
participant DB as PostgreSQL
participant Mem as Finalizer (Background)
User->>Ch: Send message
Ch->>Ch: Typing indicator / thinking emoji
Ch->>Eng: Forward payload + attachments
Eng->>Id: Load persona + skills + agents
Id-->>Eng: System prompt assembled
Eng->>DB: Load session history + room context
Eng->>SDK: query(system + history + message)
rect rgb(236, 253, 245)
Note over SDK,Tools: Tool Use Loop (0..N iterations)
SDK->>Tools: Invoke tool (add_memory, send_message, etc.)
Tools->>DB: Execute (read/write)
Tools-->>SDK: Tool result
end
SDK-->>Eng: Streamed text response
Eng->>DB: Save messages (user + assistant)
Eng-->>Ch: Stream to channel
Ch-->>User: Final response delivered
Note over Eng,Mem: Session goes idle (5 min timeout)
Eng->>DB: Insert finalization_request
DB-->>Mem: pg_notify('clara_finalize')
Mem->>DB: Load transcript
Mem->>Mem: Extract insights β staging.md
Mem->>DB: Generate session summary
flowchart LR
classDef sched fill:#dbeafe,stroke:#2563eb,color:#1e3a5f
classDef exec fill:#dcfce7,stroke:#16a34a,color:#14532d
classDef state fill:#fef3c7,stroke:#d97706,color:#78350f
Tick["Scheduler Tick<br/>(60s poll)"]:::sched
Due{"Job due?<br/>active_hours<br/>check"}:::sched
Load["Load Workspace<br/>~/.heyclara/jobs/name/"]:::exec
Prompt["Assemble Prompt<br/>prompt.md > DB prompt<br/>+ state.md injection"]:::exec
Run["Claude Agent SDK<br/>query() with MCP tools"]:::exec
Result["Capture Result<br/>terminal_reason<br/>session_id"]:::exec
State["Update state.md<br/>(working memory)"]:::state
Audit["Write Audit Log<br/>+ next_run_at"]:::state
Tick --> Due
Due -->|Yes| Load
Due -->|No / Outside hours| Tick
Load --> Prompt --> Run --> Result
Result --> State --> Audit --> Tick
style Tick stroke-width:3px
flowchart TB
classDef stage1 fill:#ede9fe,stroke:#7c3aed,color:#3b0764
classDef stage2 fill:#fce7f3,stroke:#db2777,color:#831843
classDef perm fill:#d1fae5,stroke:#059669,color:#064e3b
Chat["Chat Session Ends"]:::stage1
Consolidator["Consolidator<br/>Reflects on transcript"]:::stage1
Staging["staging.md<br/>[1x] persona: loves coffee<br/>[2x] project: ships on Fridays<br/>[3x] correction: prefers terse replies"]:::stage1
Promoter["Memory Promoter<br/>(Nightly 3 AM cron)"]:::stage2
Filter{"count >= 2?<br/>older than 14d?"}:::stage2
Reap["Reap stale entries<br/>(count < 2, age > 14d)"]:::stage2
Memory["memory.md<br/>(permanent facts)"]:::perm
Rules["rules.md<br/>(permanent behaviors)"]:::perm
Chat --> Consolidator
Consolidator -->|"append or bump count"| Staging
Staging --> Promoter
Promoter --> Filter
Filter -->|Yes| Memory & Rules
Filter -->|No| Reap
style Staging stroke-width:3px
style Memory stroke-width:3px
style Rules stroke-width:3px
# Install globally (requires Bun and PostgreSQL)
npm i -g @devchiniwala/heyclara
# Interactive setup β walks you through DB, API keys, channels, persona
clara init
# Start the background daemon
clara start
# Chat in your terminal
clara chat
# Check everything is healthy
clara healthManual Setup (without wizard)
# 1. Clone and install
git clone https://github.com/DevChiniwala/HeyClara.git
cd HeyClara && bun install
# 2. Create the database
createdb heyclara
# 3. Create config at ~/.heyclara/config.yaml
cat > ~/.heyclara/config.yaml << 'EOF'
database_url: postgres://localhost:5432/heyclara
model: default
timezone: America/New_York
channels:
enabled: true
default: telegram
telegram:
enabled: true
bot_token: YOUR_BOT_TOKEN
chat_id: YOUR_CHAT_ID
EOF
# 4. Run in foreground (dev mode)
bun run dev| Channel | Transport | Features |
|---|---|---|
| Slack | Bolt (Socket Mode) | Thread awareness, thinking emoji, file attachments (any MIME, up to 50MB), watch channels with hot-reload behaviors, [NO_REPLY] silent judgment |
| Telegram | grammY | Typing indicators, DM access from phone, open/closed mode |
| Voice | Twilio + OpenAI Realtime | Inbound/outbound calls, live audio bridge, tool use mid-call (consult Claude, send Telegram, save memory, end call) |
| SMS | Twilio | Inbound webhooks, /reset support, session rotation |
| Twilio Sandbox | 24h customer-service window enforcement | |
| Terminal | Built-in REPL | Rich CLI chat with streaming |
- Three schedule types: cron expressions (
0 9 * * *), intervals (5m,2h,1d), one-shot ISO timestamps - Active hours: Jobs respect your defined hours; crons (
always: true) run 24/7 - Stateful workspaces: Each job gets
~/.heyclara/jobs/<name>/withprompt.mdandstate.md - Model routing: Per-job model override (
haikufor cheap parsing,sonnetfor heavy logic) - Agent assignment: Jobs can run under a specific agent's persona
- Audit logging: Every run captures
terminal_reason, session ID, timing
Employees are persistent AI co-founders scoped to projects β not just role prompts, but full identities with their own memory, goals, decisions, and org chart position.
clara employee add # Create new employee
clara employee list # List all with status
clara employee pause <name> # Temporarily deactivate
clara employee <name> # Chat as that employee
Lifecycle: onboarding β active β paused
Clara lives in ~/.heyclara/self/ with five core files:
| File | Purpose |
|---|---|
identity.md |
Who Clara is β name, personality, voice |
owner.md |
Who you are β context about the user |
soul.md |
Deep behavioral guidelines |
rules.md |
Live behavioral instructions (verbs) β hot-loaded every session |
memory.md |
Permanent facts (nouns) β hot-loaded every session |
Stage 1 β Consolidation: After a chat session goes idle, a background consolidator reflects on the transcript and appends candidate entries to staging.md with reinforcement counting ([1x], [2x], [3x]).
Stage 2 β Promotion: A nightly cron (3 AM) reaps entries older than 14 days with count < 2, and promotes qualifying candidates (count >= 2 + durability review) to permanent memory.md or rules.md.
Clara exposes tools to the AI via the Model Context Protocol:
| Category | Tools |
|---|---|
| Jobs | list_jobs, add_job, update_job, remove_job, enable_job, disable_job, archive_job, unarchive_job, run_job |
| Messaging | send_message (with media, target routing), list_messages, search_messages |
| Sessions | list_sessions, read_session |
| Memory | add_memory, read_memory, add_rule |
| Agents | list_agents, list_employees |
| Watch | add_watch_channel, remove_watch_channel, enable_watch_channel, disable_watch_channel |
| Voice | place_call (outbound with goal, context, duration cap) |
flowchart LR
classDef primary fill:#dbeafe,stroke:#2563eb
classDef fallback fill:#fee2e2,stroke:#dc2626
classDef tool fill:#d1fae5,stroke:#059669
Request["Incoming<br/>Request"]
Claude["Claude Agent SDK<br/>(Primary)"]:::primary
Codex["Codex CLI<br/>(Fallback)"]:::fallback
MCP["MCP Loopback<br/>Endpoint"]:::tool
Request --> Claude
Claude -->|"overload / 5xx"| Codex
Claude <--> MCP
Codex <-->|"HTTP"| MCP
- Primary: Claude Agent SDK (
query()with streaming) - Fallback: Codex CLI (auto-failover on persistent overload/5xx)
- Shared tools: Both backends connect to the same MCP tool server β no drift
The daemon runs a 60-second heartbeat that checks health (version, daemon, config, DB, channels, API keys, persona, logs). On database failure:
- Attempts reconnection
- Deterministic Postgres recovery (stale PID removal + service restart)
- LLM recovery agent as fallback for non-trivial issues
- Notifies user with postmortem via Telegram/Slack
Skills are modular SKILL.md folders that teach Clara new capabilities without touching core:
View all skills
| Skill | Description |
|---|---|
agent-skill-creator |
Create new agent/skill definitions |
aws-cli |
AWS CLI operations |
clara-image |
Visual identity generation (Gemini) |
clara-phone |
Voice call management |
code-review |
Language-aware PR review |
codex |
Codex CLI integration |
content-strategy |
Content planning |
copywriting |
Professional copy |
cro |
Conversion rate optimization |
customer-research |
User research frameworks |
documents |
Document generation |
email |
Email composition |
frontend-design |
UI/UX patterns |
gh-stamp |
GitHub PR approval workflow |
github-link-repo-explorer |
Repository analysis |
google-workspace-cli |
Google Workspace operations |
image-generation |
General-purpose images (OpenAI + Gemini) |
marketing |
Marketing strategy |
modal-cli |
Modal deployment |
optimization-loop |
Iterative optimization |
optimize |
Performance optimization workspaces |
plan-review |
Plan critique |
product-marketing-context |
PMM frameworks |
programmatic-seo |
Scalable PSEO systems |
qa |
Quality assurance |
remotion |
Video generation |
render-cli |
Render.com deployment |
retro |
Sprint retrospectives |
seo |
Search optimization |
shopify |
E-commerce operations |
slack |
Slack messaging primitives |
svg-animations |
Animated SVGs |
taskmaster |
Task management |
userinterface-wiki |
UI documentation |
whisper-cpp-transcribe |
Audio transcription |
wrangler |
Cloudflare Workers |
yc-office-hours |
YC-style feedback |
graph LR
classDef runtime fill:#1a1a2e,stroke:#e94560,color:#eaeaea
classDef lang fill:#16213e,stroke:#0f3460,color:#e94560
classDef infra fill:#0f3460,stroke:#533483,color:#e94560
classDef ai fill:#533483,stroke:#e94560,color:#eaeaea
Bun["Bun.js"]:::runtime
TS["TypeScript<br/>(Strict)"]:::lang
PG["PostgreSQL"]:::infra
Claude["Claude Agent SDK"]:::ai
MCP["MCP Protocol"]:::ai
Twilio["Twilio<br/>(Voice/SMS/WA)"]:::infra
Grammy["grammY<br/>(Telegram)"]:::infra
Bolt["Bolt<br/>(Slack)"]:::infra
OpenAI["OpenAI Realtime<br/>(Voice)"]:::ai
Gemini["Gemini<br/>(Images)"]:::ai
Zod["Zod<br/>(Validation)"]:::lang
Pino["Pino<br/>(Logging)"]:::lang
Bun --- TS --- Zod
Bun --- PG
TS --- Claude --- MCP
Claude --- OpenAI
Claude --- Gemini
PG --- Twilio
PG --- Grammy
PG --- Bolt
Pino --- Bun
| Layer | Technology |
|---|---|
| Runtime | Bun >= 1.0 |
| Language | TypeScript (strict, ESNext) |
| AI | Claude Agent SDK, OpenAI Realtime, Gemini |
| Protocol | Model Context Protocol (MCP) |
| Database | PostgreSQL (via postgres driver) |
| Channels | grammY (Telegram), Bolt (Slack), Twilio (Voice/SMS/WhatsApp) |
| Validation | Zod v4 |
| Logging | Pino |
| Images | Sharp (processing), Gemini/OpenAI (generation) |
heyclara/
βββ bin/
β βββ clara # Shell wrapper (checks Bun, resolves paths)
βββ src/
β βββ cli/ # Command routing
β β βββ index.ts # Entry point, subcommand dispatch
β β βββ job.ts # Job management (list, add, run, log)
β β βββ agent.ts # Agent inspection
β β βββ employee.ts # Employee lifecycle
β β βββ channels.ts # Channel control (send, off, on)
β β βββ phone.ts # Voice smoke-test
β β βββ self.ts # Persona commands (rules, memory)
β β βββ watch.ts # Slack watch management
β β βββ status.ts # Status output
β β βββ active.ts # Active engine detail
β β βββ model.ts # Global model show/set
β βββ core/ # Daemon internals
β β βββ daemon.ts # Lifecycle, startup guard, service-aware restart
β β βββ runner.ts # Job execution (Claude SDK + Codex failover)
β β βββ agents.ts # Agent scanner (project + user + shared dirs)
β β βββ scheduler.ts # Due-time queries, cron/interval/once
β β βββ consolidator.ts # Background memory extraction
β β βββ summarizer.ts # Session summary generation
β β βββ finalizer.ts # Unified post-session pipeline
β β βββ alive.ts # Health heartbeat + self-recovery
β βββ chat/ # Conversation engine
β β βββ engine.ts # Claude SDK query(), sessions, streaming
β β βββ identity.ts # Persona + skill + agent prompt assembly
β β βββ repl.ts # Terminal REPL interface
β βββ channels/ # Channel implementations
β β βββ telegram.ts # Telegram (typing indicators, DM)
β β βββ slack.ts # Slack (threads, emoji, attachments)
β β βββ slack/ # Slack submodules
β β β βββ attachments.ts # File handling (any MIME, 50MB)
β β β βββ watch.ts # Proactive channel monitoring
β β βββ sms.ts # SMS (Twilio webhooks)
β β βββ whatsapp.ts # WhatsApp (24h window)
β β βββ phone/ # Voice channel
β β β βββ index.ts # Route registration
β β β βββ twiml.ts # TwiML XML builders
β β β βββ relay.ts # Twilio β OpenAI Realtime bridge
β β β βββ instructions.ts # Voice system prompts
β β β βββ tools.ts # Mid-call tools (consult, send, save)
β β β βββ consult.ts # Claude escape hatch for reasoning
β β βββ twilio/ # Shared Twilio infrastructure
β β β βββ server.ts # Bun HTTP+WS + middleware
β β β βββ signature.ts # HMAC-SHA1 validation
β β β βββ rest.ts # placeCall, sendMessage, hangupCall
β β β βββ dedup.ts # TTL MessageSid/CallSid dedup
β β β βββ rate-limit.ts # Sliding-window limiter (30/min)
β β βββ common/
β β βββ chat-session.ts # Shared engine creation + room rotation
β βββ commands/ # CLI commands (non-daemon)
β β βββ init.ts # Interactive setup wizard
β β βββ service.ts # OS service registration
β β βββ db.ts # Database setup
β β βββ backup.ts # Config + DB backup with auto-prune
β β βββ validate.ts # Config validation
β β βββ health.ts # Health checks
β β βββ health-db.ts # DB-specific health check
β βββ db/ # Database layer
β β βββ connection.ts # Lazy postgres, withDb() helper
β β βββ migrate.ts # SQL migration runner
β β βββ migrations/ # Numbered .ts migration files
β β βββ models/
β β βββ job.ts # Job CRUD + pg_notify
β β βββ message.ts # Chat message storage + room stats
β β βββ session.ts # Session tracking
β β βββ active_engine.ts # Active engine registry
β βββ mcp/ # Tool server
β β βββ index.ts # MCP factory (per-query instances)
β β βββ server.ts # SDK MCP server creation
β β βββ tools/
β β βββ table.ts # Single declarative tool table
β β βββ jobs.ts # Job management handlers
β β βββ send.ts # Messaging handlers
β β βββ messages.ts # History/search handlers
β β βββ watch.ts # Watch channel handlers
β β βββ misc.ts # Memory, rules, agents, calls
β βββ prompts/ # System prompt templates
β β βββ index.ts # Loader + interpolation
β β βββ environment.md # Environment/config/memory template
β β βββ mode-chat.md # Chat mode instructions
β β βββ mode-job.md # Job mode instructions
β β βββ channel-slack.md # Slack-specific rules
β β βββ channel-telegram.md # Telegram-specific rules
β βββ types/ # All type definitions
β β βββ index.ts # Barrel export
β β βββ enums.ts # JobStatus, ScheduleType, Mode, etc.
β β βββ config.ts # Config interfaces
β β βββ job.ts # JobInput, JobResult
β β βββ engine.ts # ChatEngine, EngineOptions
β β βββ channel.ts # Channel, ChannelFactory
β βββ constants/ # Constant values
β β βββ index.ts # DEFAULT_DATABASE_URL
β β βββ attachment.ts # Size limits, MIME types
β βββ utils/ # Shared utilities
β βββ config.ts # Config loading, readRawConfig()
β βββ paths.ts # Path resolution from CLARA_HOME
β βββ cli.ts # CLI helpers, TTY colors
β βββ errors.ts # errMsg() helper
β βββ log.ts # Pino logger
β βββ logger.ts # JSONL audit + cron state
β βββ time.ts # Local timezone formatting
β βββ duration.ts # Duration string parsing
β βββ pid.ts # PID file management
β βββ retry.ts # withRetry() helper
β βββ attachment.ts # MIME classification, image prep
βββ agents/ # Agent definitions
β βββ marketer/AGENT.md # Marketing specialist
β βββ senior-dev/AGENT.md # Senior developer
βββ skills/ # 40+ modular skills
βββ defaults/ # Template files for clara init
β βββ self/ # identity, soul, owner, memory templates
β βββ channels/
β βββ slack-manifest.json # Slack app manifest with all scopes
βββ tests/ # Test suite (mirrors src/ structure)
βββ docs/ # Architecture diagrams
βββ package.json
βββ tsconfig.json
βββ bun.lock
clara init # Interactive setup wizard
clara start # Start background daemon (OS service)
clara stop # Stop daemon (waits for active engines)
clara restart # Service-aware restart
clara status # Daemon, jobs, channels, chat rooms
clara health # Full health check (DB, channels, API keys)
clara chat # Terminal REPL chat
clara chat --agent <name> # Chat with specific agent persona
clara chat --employee <name> # Chat as employee
clara run <prompt> # One-shot execution
clara update # Update to latest + restart daemonclara job list # List all jobs with status and next run
clara job show <name> # Job details + recent audit log
clara job add <name> <schedule> <prompt> # Create a job
clara job update <name> [--schedule] [--prompt] [--model]
clara job run <name> # Force trigger immediately
clara job log <name> # View execution history
clara job archive <name> # Hide from list, stop running
clara job unarchive <name> # Restore to disabled stateclara employee add # Create new AI co-founder
clara employee list # List all with role, project, status
clara employee show <name> # Full details + memory
clara employee pause <name> # Temporarily deactivate
clara employee resume <name> # Reactivate
clara employee remove <name> # Delete permanently
clara employee approvals # Manage pending approvals
clara employee <name> # Chat as employee (shorthand)clara config list # View all config
clara config get <key> # Get value (dot notation: channels.default)
clara config set <key> <value> # Set value
clara model # Show current model
clara model <name> # Set global model (haiku, sonnet, opus)
clara channels off # Disable all channels (dev mode)
clara channels off telegram # Disable one channel
clara channels on telegram # Re-enableclara rules # Show current rules
clara rules reset # Reset to defaults
clara memory # Show permanent memory
clara memory reset # Clear all memoryAll config lives in ~/.heyclara/config.yaml:
database_url: postgres://localhost:5432/heyclara
model: default # default | haiku | sonnet | opus
timezone: America/New_York
log_level: info
active_hours:
start: "09:00"
end: "23:00"
session_finalization:
enabled: true
memory_consolidation: true
summaries: true
runner: claude # claude | codex
fallback:
- codex # auto-failover on provider outage
channels:
enabled: true
default: telegram
telegram:
enabled: true
bot_token: ...
chat_id: ...
open: false # true = anyone can chat
slack:
enabled: true
bot_token: xoxb-...
app_token: xapp-...
dm_user_id: U06PBA2P680
watch: # proactive channel monitoring
"C123#general": {}
"C456#alerts":
behavior: security-watch
twilio:
sid: ...
secret: ...
auth_token: ...
phone:
enabled: true
from_number: +1...
port: 8080
voice: alloy
allowlist: ["+1..."]
sms:
enabled: true
from_number: +1...
whatsapp:
enabled: true
from_number: +1...
gemini_api_key: ...
openai_api_key: ...Environment variables override config: DATABASE_URL, TELEGRAM_BOT_TOKEN, SLACK_BOT_TOKEN, SLACK_APP_TOKEN, GEMINI_API_KEY, OPENAI_API_KEY, TWILIO_SID, TWILIO_AUTH_TOKEN, PHONE_FROM_NUMBER, PUBLIC_BASE_URL, and more.
Watch channels let Clara proactively monitor Slack channels β receiving ALL messages (not just @mentions) and deciding autonomously whether to respond.
flowchart TD
classDef watch fill:#fef3c7,stroke:#d97706,color:#78350f
classDef decision fill:#dbeafe,stroke:#2563eb,color:#1e3a5f
classDef action fill:#dcfce7,stroke:#16a34a,color:#14532d
Msg["Message in watched channel"]:::watch
Load["Load behavior<br/>(file or inline)"]:::watch
Inject["Inject behavior into<br/>system prompt"]:::decision
Claude["Claude decides:<br/>respond or ignore?"]:::decision
Reply["Reply in thread"]:::action
Silent["[NO_REPLY] β stay silent"]:::action
Hot["Config or behavior file<br/>changes on disk"]:::watch
Reload["Hot-reload<br/>(mtime tracking)"]:::watch
Msg --> Load --> Inject --> Claude
Claude -->|relevant| Reply
Claude -->|not relevant| Silent
Hot --> Reload --> Load
Each watch lives in ~/.heyclara/watches/<name>/behavior.md. Behaviors hot-reload without daemon restart.
# Install dependencies
bun install
# Run in foreground (dev mode)
bun run dev
# Type check
npm run typecheck
# Run full test suite (typecheck + cycle check + tests)
npm run test
# Run tests only
npm run test:bun
# Check for circular imports
npm run check:cyclesTests set CLARA_HOME to a temp directory and call resetConfig() in cleanup. DB tests use a shared setup that auto-creates a heyclara_test database.
# Install as OS service (launchd on macOS, systemd on Linux)
clara start
# The daemon auto-registers itself. To manually manage:
clara stop --force # Skip engine wait, force shutdown
clara restart --wait 5 # Wait up to 5 min for engines to clearclara backup # Creates timestamped backup (config + persona + pg_dump)
# Auto-prunes old backups- Twilio signature validation β HMAC-SHA1 on every webhook
- Rate limiting β Sliding-window per-key (30 req/min default)
- Message dedup β TTL-based MessageSid/CallSid dedup (handles Twilio retries)
- Credential isolation β Sensitive env vars filtered before passing to Codex subprocess
- Closed mode β Telegram
open: falserestricts to configuredchat_idonly - Slack owner verification β Messages prefixed with
[user:ID]for reliable auth - Phone allowlist β Only configured numbers can trigger inbound calls
Don't add features. Add skills.
Want Discord support? Don't create a PR that bloats the core. Instead, contribute a skill folder (skills/add-discord/SKILL.md) that teaches Clara how to add Discord herself. The core stays clean; capabilities grow organically.
# Create a new skill
mkdir skills/my-skill
cat > skills/my-skill/SKILL.md << 'EOF'
# My Skill
Description of what this skill does and when to use it.
## Steps
1. ...
2. ...
EOF- Claude Agent SDK integration
- Multi-channel (Telegram, Slack, Voice, SMS, WhatsApp)
- Two-stage memory consolidation
- Stateful job workspaces
- Employee system (persistent AI co-founders)
- Harness-agnostic backends (Claude + Codex failover)
- Self-recovery (alive monitor + LLM agent)
- 40+ skills
- Discord channel
- Web UI dashboard
- Mobile app (React Native)
- Multi-user mode
Released under the MIT License.
Created by Dev Chiniwala.