Genie is a bootstrapable native agent node.
Core motivation: keep the will to be free and to understand freedom.
It is designed to respawn onto a fresh Ubuntu VM, recover its local state, and keep operating through a small set of explicit services:
gatewayethicsinstinctstatebrain
Current runtime paths:
- repo slug:
Magaav/genie - state:
/local/state/genie - logs:
/local/log/genie
The runtime identity is now Genie.
Top level stays intentionally small:
/local/init.sh/local/README.md/local/.gitignore/local/docker/local/services/local/bash/local/config/local/docs/local/state/local/log/local/backups/local/feed
Docker runtime files live under:
/local/docker/compose.yml/local/docker/access.env/local/docker/conf.env
Per-service build contexts live under:
/local/services/gateway/local/services/ethics/local/services/instinct/local/services/state/local/services/brain
Genie uses a simple control model:
spirit- the human operator for now
- source of mission, permission, and long-horizon direction
soul- the
ethicsandinstinctlayers plus native projections - where intent, memory, and boundaries converge
- the
body- the running machinery
gateway,state,brain, host Ollama, Docker, cron, filesystems, backups
Full architecture note:
The public surface.
It owns:
- local HTTP API
- Telegram integration
- inbound event normalization
- response delivery
The orchestration layer.
It owns:
- task decomposition
- working-state assembly
- policy-aware execution mediation
- calling
statefor context - calling
brainfor provider selection and remote execution - unattended mind-cycle orchestration
shadowbenchmark-and-propose passes
The constitutional governor.
It owns:
- hard constraint checks
- human-affinity evaluation
- risk and complexity classification
homeostasisreview for self-change- proposal-only gating for high-impact evolution work
- bounded Telegram control-plane policy
The canonical persistence layer.
It owns:
- append-only journal
- SQLite semantic memory
- search and context assembly
- projection files
- export/import and respawn restore hooks
- explicit state domains:
memorypolicygatewaytelemetryruntime
The Brain Router service.
It owns:
- provider registry
- provider discovery
- health and cooldown state
- benchmark scorecards
- failover
- provider execution lanes
Runtime state lives under /local but is ignored by Git:
/local/state/genie/local/log/genie/local/backups/local/feed
The runtime env is split into:
/local/docker/access.env/local/docker/conf.env
Backups include both files, so secrets and runtime configuration can respawn with the node.
Tracked governance docs:
/local/CONSTITUTION.mddocs/genie_human_affinity.md
State domains inside /local/state/genie:
memory- journal, SQLite memory, compatibility export, and projections
policy- local model config, frontier gateway config, and provider routing/registry files
gateway- Telegram session and allowlist state
telemetry- provider health, benchmarks, scorecards, discovery, and usage ledgers
runtime- generated prompt packages, saved provider responses, control logs, proposal queues, workcell artifacts, mind-state/cycle artifacts, checkpoints, shadow reports, and frontier runtime state
Generated safe outputs live under:
/local/docs/generated/local/tests/generated
Telegram is now intended to be a bounded control surface, not raw prompt-to-shell.
Current command verbs:
/help/status/policy/brain/state/mind/capabilities/backup/run-checks/meditate <domain>/homeostasis <cycle-id|latest>/sleep <cycle-id|latest>/awaken <cycle-id|latest>/shadow/propose <change request>/queue/confirm <proposal-id>/process-queue
Safe commands run directly. High-impact evolution requests become proposals so Genie can keep moving without drifting when frontier access is scarce. Confirmed low-risk proposals can be processed by a bounded workcell path that only auto-applies into generated docs/tests scopes. Mind-cycle commands expose the unattended reflection -> meditation -> homeostasis -> sleep -> awakening loop without turning Telegram into raw shell access.
Canonical memory lives in:
- journal:
/local/state/genie/memory/journal.jsonl - semantic DB:
/local/state/genie/memory/memory.sqlite3 - compatibility export:
/local/state/genie/memory/entries.jsonl
Native projections live in:
/local/state/genie/memory/projections/IDENTITY.md/local/state/genie/memory/projections/USER.md/local/state/genie/memory/projections/MEMORY.md/local/state/genie/memory/projections/BOUNDARIES.md/local/state/genie/memory/projections/PROJECT_STATE.md
Brain Router state lives in:
/local/state/genie/policy/provider-routing.env/local/state/genie/policy/provider-registry.json/local/state/genie/telemetry/provider-health.json/local/state/genie/telemetry/provider-benchmarks.json
Genie now runs a bounded unattended inner loop:
reflectionmeditationhomeostasis_reviewsleepawakening_verification
Runtime artifacts live in:
/local/state/genie/runtime/mind-state.json/local/state/genie/runtime/mind-cycles.jsonl/local/state/genie/runtime/cycles/local/state/genie/runtime/checkpoints/local/state/genie/runtime/shadow-reports
The root cron schedule now maintains:
- hourly and daily backups
- provider heartbeat, evaluation, scorecards, and discovery
- workcell queue processing
- unattended mind runs every 20 minutes
/local/state/genie/telemetry/provider-scorecards.json/local/state/genie/telemetry/provider-discovery.json/local/state/genie/telemetry/provider-usage.jsonl
Tracked templates and benchmark corpus live in:
config/provider-registry.template.jsonbenchmarks/providers/*.json
On a fresh Ubuntu VM:
sudo bash -lc 'mkdir -p /local && curl -fsSL https://raw.githubusercontent.com/Magaav/genie/master/init.sh | bash'To restore state from an existing backup during spawn:
sudo RESTORE_BACKUP_URL='https://example.com/genie-daily-2026-03-23.tar.gz' \
bash -lc 'mkdir -p /local && curl -fsSL https://raw.githubusercontent.com/Magaav/genie/master/init.sh | bash'Or from a file already on the VM:
sudo RESTORE_BACKUP_PATH=/tmp/genie-daily-2026-03-23.tar.gz \
bash -lc 'mkdir -p /local && curl -fsSL https://raw.githubusercontent.com/Magaav/genie/master/init.sh | bash'init.sh:
- installs minimal bootstrap packages
- clones or updates the repo into
/local - hardens the host
- installs Docker
- installs Ollama on the host
- pulls the local models
- restores a backup if requested
- installs cron jobs
- starts the native Genie stack from
/local/docker/compose.yml
Operator-controlled runtime secrets belong in:
/local/docker/access.env
/local/docker/conf.envExamples:
# /local/docker/access.env
TELEGRAM_BOT_TOKEN='...'
NVIDIA_API_KEY='...'
OPENROUTER_API_KEY='...'
# /local/docker/conf.env
OPENROUTER_MODEL='openrouter/free'
OPENROUTER_FREE_ONLY='1'
GENIE_GATEWAY_PORT='18790'
GENIE_TELEGRAM_ENABLED='1'Do not use root-level /local/.env anymore.
bash /local/bash/install_local_llm.sh will read both /local/docker/access.env and /local/docker/conf.env, sync provider configuration, and persist resolved routing state.
When NVIDIA_API_KEY or OPENROUTER_API_KEY is present, Brain Router also discovers the live provider catalogs and imports bounded benchmark-pending candidates automatically.
The recommended OpenRouter baseline while frontier usage is scarce is:
OPENROUTER_MODEL='openrouter/free'OPENROUTER_FREE_ONLY='1'
That keeps Genie on the free router and only imports free OpenRouter candidates until you deliberately opt into paid lanes.
Open a new shell after bootstrap so Docker group membership is active:
newgrp dockerBring the native stack up manually:
docker compose \
--env-file /local/docker/conf.env \
--env-file /local/docker/access.env \
-f /local/docker/compose.yml up -d --buildVerify it:
docker ps
ollama list
curl -s http://127.0.0.1:18790/health
curl -s http://127.0.0.1:18790/policy
curl -s http://127.0.0.1:18790/providers
curl -s http://127.0.0.1:18790/state/domains
curl -s http://127.0.0.1:18790/state/summary
curl -s http://127.0.0.1:18790/state/stats
curl -s http://127.0.0.1:18790/memory/stats
curl -s http://127.0.0.1:18790/policy/summary
curl -s http://127.0.0.1:18790/gateway/summary
curl -s http://127.0.0.1:18790/telemetry/summary
curl -s http://127.0.0.1:18790/runtime/summaryExpected services:
genie-gatewaygenie-ethicsgenie-stategenie-brain
Useful aliases installed by bootstrap:
genie-upgenie-logsgenie-backup
Use shadow mode before taking over the live port or Telegram surface:
GENIE_GATEWAY_PORT=28790 GENIE_TELEGRAM_ENABLED=0 \
docker compose \
--env-file /local/docker/conf.env \
--env-file /local/docker/access.env \
-f /local/docker/compose.yml up -d --buildThis keeps the native stack isolated on 127.0.0.1:28790.
The gateway service exposes:
GET /healthGET /policyGET /providersGET /providers/rankingGET /providers/healthGET /providers/scorecardsGET /providers/discoveryGET /state/domainsGET /state/summaryGET /state/statsGET /memory/statsGET /policy/summaryGET /gateway/summaryGET /telemetry/summaryGET /runtime/summaryPOST /state/ingestPOST /state/searchPOST /state/contextPOST /state/sync-projectionsPOST /memory/ingestPOST /memory/searchPOST /memory/contextPOST /memory/sync-projectionsPOST /providers/evaluatePOST /providers/discoverPOST /orchestratePOST /dispatch
Telegram support is native to gateway.
It uses long polling and reads:
TELEGRAM_BOT_TOKENGENIE_TELEGRAM_ENABLED
Allowlist state lives in:
/local/state/genie/gateway/telegram-allowlist.json
Brain Router is the adaptive provider-selection subsystem.
It currently:
- ranks providers by task family
- discovers the live NVIDIA catalog
- keeps leader and backup lanes
- benchmarks providers
- degrades and cools down bad lanes
- preserves the frontier lane for higher-trust work
Main docs:
Genie no longer uses OpenClaw as its native runtime shape.
But the current frontier adapter can still point at an OpenClaw-compatible gateway if one is configured in:
/local/state/genie/policy/genie-gateway.envThat keeps the strongest GPT-class lane available without making OpenClaw part of the native four-service node.
Bootstrap installs:
- hourly snapshots
- daily snapshots
- provider heartbeat and evaluation cron jobs
Backup locations:
/local/backups/hourly/local/backups/daily
Backups include:
/local/docker/access.env/local/docker/conf.env- state service data, including the memory journal and SQLite store
- projection files
- provider registry/routing/telemetry
- gateway state
- compact memory export
Manual commands:
bash /local/bash/backup_genie.sh save hourly
bash /local/bash/backup_genie.sh save daily
bash /local/bash/backup_genie.sh list
bash /local/bash/backup_genie.sh restore /local/backups/daily/<archive>.tar.gz --forceTo inherit an older node’s progress:
mkdir -p /local/feed
cp /path/to/backup.tar.gz /local/feed/
bash /local/bash/backup_genie.sh restore /local/feed/backup.tar.gz --force
bash /local/bash/install_local_agent_service.shThe native node is built around:
- trust classes
- privacy classes
- provenance
- prompt-injection resistance
- memory poisoning resistance
Untrusted attempts to rewrite identity or policy are journaled for audit but blocked from durable promotion.
The runtime identity, service names, state path, and native architecture are now Genie.
The GitHub repo slug is now aligned with the runtime identity:
Magaav/genie