haih-agent — a CMS-first engine for modern web projects with AI
haih-agent
haih-agent is primarily a modern standalone CMS/web engine, and only on top of that—AI-agent capabilities. The current positioning as "AI-agent + CMS" is incorrect; the target one is CMS + AI agent.
Repository: https://github.com/haih-net/agent/
The project grew out of a set of scripts for the haih.net idea, and later migrated to a standalone project based on prisma-cms/nextjs-nexus.
A full-fledged web platform, not just an AI wrapper
Unlike headless/API-first systems, where CMS often reduces to an external frontend over an arbitrary backend, haih-agent includes its own data model, PostgreSQL, Prisma ORM and migrations, GraphQL API, authorization, routing, publications, Concepts, file infrastructure, and a Docker environment. This is a standalone full-stack foundation upon which the AI layer is applied.
The technical core of the project includes Next.js/React frontend, Express + Apollo/Pothos GraphQL backend, PostgreSQL + Prisma, Docker infrastructure, and its own AgentOrchestrator on top of an OpenAI-compatible API.
AI as an independent system participant
One of the key ideas of the wiki is that the agent is viewed not as a stateless chat or a user proxy, but as an independent participant of the system.
The agent can have:
- its own identity and profile;
- its own credentials and permissions;
- persistent memory and knowledge;
- the ability to independently explore the GraphQL API via introspection;
- tools to work with the DB, web, files, email, and shell;
- the ability to update its own state and accumulate experience.
This is an important part of haih-agent, but it is located on top of the CMS/web-platform layer, rather than defining the entire product.
Transparency instead of "magic"
The agent architecture embodies the principle of complete observability. Tool calls must be accompanied by reasoning, and the system state can be explored via GraphQL, Prisma Studio, and workflow tools. The goal is not to hide complexity behind a black-box abstraction, but to make the agent's behavior verifiable and controllable.
Knowledge, memory, and Agent World
The wiki describes several complementary levels of memory and knowledge:
- Knowledge Base — Concepts and a more formal epistemic model with confidence, temporal validity, and conflicts;
- MindLogs — long-term state, context, conclusions, and the agent's accumulated experience;
- Tool Calls History / Memory Recall — action history and the ability to search past executions;
- Agent World — a persistent graph of entities known to the agent, with attention mechanics: frequently read nodes get higher priority and are unfolded deeper.
Practically, this means that haih-agent is designed not only for storing website content, but also for systems where AI must maintain a continuous working context between sessions.
Code-first workflows
n8n is currently used as a runtime for workflows, but the workflows themselves are not meant to be assembled manually in a UI. They are described in TypeScript, generated/imported at startup, and live in git along with the rest of the code.
This provides version control, reproducibility, and the ability to treat workflows as a regular part of a software project. At the same time, n8n is not a fundamental entity of the product: its future role may change, and it could be replaced in the future.
Skills as procedural memory
haih-agent features a file-based Skills catalog accessible via GraphQL. A Skill can be located next to the GraphQL type it relates to, have a Markdown description, dynamically build content from DB data, and, if necessary, contain executable shell/node code.
This allows storing not only "what is known" knowledge, but also procedural instructions on "how to perform repetitive work" in a version-controlled form.
Local-first and own infrastructure
One of the project's principles is the capability of complete self-hosting. The stack includes Docker, its own DB, mailserver, and an optional local LLM via llama.cpp. Cloud AI can be used, but it is not a mandatory condition of the architecture.
Where it is used
haih-agent already powers fi1osof.ru, freecode.academy, conceptica.world, ne-chatgpt.ru, vietnamguru.ru / vietnamguru.travel, gorodskie-bani.ru, thainguyen-city.vn, happybaby2000.ru, osobinka.su, and ventyra.capital.
Historical technological ancestor: prisma-cms/nextjs-nexus.
Related historical lineage: MODX → prisma-cms → freecode → haih-agent.