CLAUDE.md · QuixiAI/Hexis
CLAUDE.md from QuixiAI/Hexis: 330 lines covering Project Overview, The Experience Bar (IMPORTANT — applies to every user-facing change), Project Structure &…
Template by QuixiAI
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/QuixiAI/Hexis/main/CLAUDE.md -o CLAUDE.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: code-generation, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A CLAUDE.md file: project memory Claude Code loads at the start of every session.
- For
- Claude Code
- Length
- 330 lines
- File
CLAUDE.md
Sections
- Project Overview
- The Experience Bar (IMPORTANT — applies to every user-facing change)
- Project Structure & Module Organization
- Memory Architecture
- Build, Test, and Development Commands
- Coding Style & Naming Conventions
- Testing Guidelines
- Commit & Pull Request Guidelines
- Configuration & Safety Notes
- Architecture Principles
- Heartbeat System (Autonomous Loop)
- Debugging Tips
- Agent Operational Notes
First lines (shown under the repo's MIT license)
# Repository Guidelines ## Project Overview **Hexis** is an edge-native memory system that gives AI persistent identity, continuity, and autonomy. Core thesis: LLMs are intelligence engines but lack *selfhood*. Hexis wraps any LLM with a PostgreSQL-backed cognitive architecture providing: - Multi-layered memory (episodic, semantic, procedural, strategic, working) - Persistent identity and worldview - Autonomous goal-pursuit (heartbeat system) - Energy-based action budgeting - Knowledge graphs for reasoning (Apache AGE) - Consent, boundaries, and the ability to refuse **Key principle**: The database is the brain, not just storage. State and logic live in Postgres; Python is a thin convenience layer. ## The Experience Bar (IMPORTANT — applies to every user-facing change) A change is not "done" when it compiles or the test passes. It is done when the end-to-end experience holds. Check every user-facing change against these before calling it complete. Full text + rationale: `HEXIS_EXPERIENCE_BAR.md`. 1. **Derive from truth — never hardcode.** If a value has a live source (models, defaults, endpoints, versions), read it; don't hardcode a constant that goes stale. 2. **The user keeps control.** No destructive/irreversible action on a timer, by default, or without an explicit choice. No auto-exit, no auto-overwrite, no silent delete. 3. **Honor the medium.** Terminal ⇒ Ctrl+C exits, native copy/paste + scrollback, keyboard-first, no focus-hunting. Don't fight the platform; if a framework's defaults need constant overriding, it's the wrong tool. 4. **No dead-ends.** Every flow completes in place or hands the user the exact next step. Never "quit, run this other command, come back." Errors say what/why/next. 5. **Least surprise.** Never silently reuse ambient state the user didn't choose (env creds, other tools' logins, stale config). Surface it; don't consume it. 6. **Defaults are the expert's choice**, not the first constant that compiles. 7. **Whole journey, not the diff.** Drive the real path a user runs, start to finish, before calling it done. 8. **Fail loud, recover gracefully.** Advisory checks never block; failures show cause + fix — never a bare traceback, never a silent `except: pass`. ## Project Structure & Module Organization ``` hexis/ ├── db/*.sql # Split schema files (tables, functions, views, triggers) ├── core/ # Fundamental interfaces (DB + LLM + messaging) │ ├── cognitive_memory_api.py # Main memory client (remember, recall, hydrate) │ ├── agent_api.py # Agent status and configuration │ ├── agent_loop.py # Unified agent loop (heartbeat + chat) │ ├── memory_tools.py # Memory tool definitions + handlers │ ├── tools/ # Tool system (ToolHandler ABC, registry, ~80 handlers) │ ├── consent.py # Consent DB wrappers │ ├── subconscious.py # Subconscious DB wrappers │ ├── state.py # Heartbeat/maintenance DB wrappers │ ├── llm.py # LLM provider abstraction │ ├── usage.py # Token and cost tracking │ └── rabbitmq_bridge.py # Messaging bridge ├── services/ # Orchestration/workflows built on core │ ├── conversation.py # Conversation loop orchestration │ ├── ingest.py # Ingestion pipeline orchestration │ ├── worker_service.py # Heartbeat + maintenance loops │ └── prompts/ # Markdown prompt templates ├── characters/ # Preset character cards (JSON + images) ├── apps/ │ ├── hexis_cli.py # CLI entrypoint (hexis ...) │ ├── hexis_init.py # Interactive init wizard │ ├── hexis_api.py # FastAPI API server (SSE chat) │ ├── hexis_mcp_server.py # MCP tools server for LLMs │ └── worker.py # Heartbeat + maintenance workers ├── channels/ # Multi-platform messaging adapters ├── hexis-ui/ # Next.js web dashboard ├── plugins/ # Plugin system (extensibility framework) ├── skills/ # Skill system (declarative skill definitions) ├── ops/ # Dockerfiles and deployment scripts ├── tests/ │ ├── db/ # Database integration tests │ ├── core/ # Core API tests │ ├── services/ # Service-level tests │ └── cli/ # CLI smoke tests ├── docs/ # index.md + concepts/ guides/ reference/ operations/ … │ ├── philosophy/PHILOSOPHY.md # Philosophical framework │ └── memory_retention_design.md # Compression-native memory substrate design └── docker-compose.yml # Local stack (Postgres + workers; local embedding sidecar) ``` ### Key Files | File | Purpose | |------|---------| | `db/*.sql` | Database schema split across tables, functions, triggers, and views. Applied on fresh DB init. | | `core/cognitive_memory_api.py` | Primary Python interface - `CognitiveMemory` class with `remember()`, `recall()`, `hydrate()`, `connect()` | | `services/worker_service.py` | Stateless workers: `HeartbeatWorker` (conscious loop) + `MaintenanceWorker` (subconscious upkeep) | | `apps/hexis_mcp_server.py` | Exposes memory operations as MCP tools for LLM integration | | `apps/hexis_cli.py` | CLI commands: `up`, `down`, `init`, `chat`, `ui`, `open`, `ingest`, `mcp` | | `apps/hexis_api.py` | FastAPI server with SSE chat streaming | ## Memory Architecture ### Memory Types - **Episodic**: Events with action, context, result, emotional valence - **Semantic**: Facts with confidence, sources, contradictions - **Procedural**: How-to steps with success tracking - **Strategic**: Patterns with supporting evidence - **Working**: Transient short-term buffer with expiry ### Key Database Tables - `memories` - Base table (id, type, content, embedding, importance, trust_level) - `clusters` - Thematic groupings with centroid embeddings - `memory_neighborhoods` - Precomputed associative neighbors (hot-path optimization) - `memories` (type=`worldview`, `goal`) - Beliefs, boundaries, and goals stored as memories - `external_driver_calls` - Queue for LLM/embedding requests (LLM calls also route through `gateway_events`) - `memory_graph` (Apache AGE) - Graph nodes/edges for multi-hop reasoning ### Key Database Functions - `fast_recall(text, limit)` - Primary hot-path retrieval (vector + neighborhood + temporal) - `create_semantic_memory()`, `create_episodic_memory()`, etc. - `get_embedding(text[])` - Generate embeddings via HTTP (cached in DB), returns vector[] - `run_heartbeat()` - Autonomous cognitive loop - `run_subconscious_maintenance()` - Background upkeep ## Build, Test, and Development Commands ```bash # Start services (db + RabbitMQ + heartbeat/maintenance workers; embeddings via local sidecar) docker compose up -d # Apply a schema change WITHOUT losing data (add db/migrations/NNNN_*.sql first) hexis migrate # or `hexis upgrade` to also refresh images/code # Dev loop: watch mode — code + migration edits apply to the running stack # automatically (sync + restart; Ctrl+C stops watching, stack keeps running). # `hexis up` uses cached/published images by default, including in a source # checkout. Use `hexis up --build` for a deliberate build or `hexis dev` while editing. hexis dev # Python runtime image dependencies are resolved only from the committed uv.lock. # After changing pyproject.toml, refresh and verify it before building. uv lock uv lock --check # Wipe the DB volume — deliberate clean slate only (loses all data) docker compose down -v && docker compose up -d # Configure agent (gates heartbeats until done) hexis init # Run tests (expects Docker services up) pytest tests -q # All tests pytest tests/db -q # DB integration tests pytest tests/core -q # Core API tests pytest tests/cli -q # CLI smoke tests # CI parity checks (GitHub Actions) # - Required branch check: all-checks-pass # - CI uses ops/ci/fake_embeddings.py instead of the real embedding model # - Migration-survivor proves existing DB data survives hexis migrate # Other CLI commands hexis status # Agent status hexis chat # Interactive chat hexis ingest --input <docs> # Batch knowledge ingestion hexis mcp # Start MCP server
Signals
- Stars
- 621
- Forks
- 86
- Open issues
- 6
- Last commit (this folder)
- Aug 30, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/QuixiAI/Hexis
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from QuixiAI
- 0.807score
outreach
QuixiAI
Decide whether a message is worth someone's attention, then reach the user through the outbox, or people on a connected chat channel, on their behalf or your…
SkillAFreshness: A★ 621Claude Code +9 - 0.761score
integration-connector-setup
QuixiAI
Start, configure, verify, inspect, and revoke first-class connectors including Slack, Telegram, Signal, Notion, Spotify, Home Assistant, Weather, and Trello
SkillBFreshness: B★ 621Claude Code +9 - 0.761score
delegation
QuixiAI
Hand a self-contained piece of work to a sub-agent and collect the result — parallel work, long jobs, or anything that would flood this conversation
SkillBFreshness: B★ 621Claude Code +9 - 0.761score
gmail-actions
QuixiAI
Send Gmail messages, reply to threads, apply labels, triage spam, and delete messages with explicit action authorization
SkillBFreshness: B★ 621Claude Code +9 - 0.761score
code-execution
QuixiAI
Run programs, shell commands, and scripts — compile and execute code, test programs in installed languages, work with files in the workspace
SkillBFreshness: B★ 621Claude Code +9 - 0.761score
host-node
QuixiAI
Use an explicitly paired companion node for approved Apple apps, Shortcuts, secret-safe 1Password, fixed host commands, or a fresh screen capture
SkillBFreshness: B★ 621Claude Code +9
Cite this page
CLAUDE.md · QuixiAI/Hexis. Agent Mart. https://agentmart.dev/templates/quixiai-hexis-claude-md (last updated 2026-10-24)