CogmemAi is a portable persistent memory layer designed to provide persistent recall capabilities across sessions, devices, users, and teams for any AI system. It not only remembers important information, but can also enforce user-defined rules before actions occur, and review work against user intent after it is completed. It is officially positioned as a secure memory system for assistants, agents, robots, vehicles, and code.
Main capabilities
- Persistent memory: Retains knowledge across sessions, devices, users, and teams, and can autonomously capture knowledge even if the AI forgets to save it.
- Rule enforcement (Guard): Uses the PreToolUse hook to make judgments before shell commands run. Built-in rules cover dangerous operations, such as rewriting the entire crontab from a pipe, executing destructive SQL against a production database, recursive deletion, force-pushing to a shared branch, piping downloaded content to the shell, killing shared server worker processes by name, and more. Rule memory (save_rule) can be turned into executable patterns, supporting exact matching or disabling of GUARD lines.
- Intent review (Intent): Each project can have a plain-English intent document, written via set_intent and read via get_intent. Invariant sentences are compiled into executable patterns that reject violating operations before commands run; at the end of each round, changes are reviewed against the intent and reported in plain English readable by non-technical people.
- Work review (Review): Through the review_work tool or REST endpoint, compare descriptions, outputs, messages, or records against the intent document, returning a summary, coverage, uncovered items, violations, and coverage rate.
- Autonomous memory: Since v3.15, coding sessions are captured at the infrastructure level, and at the end of the session they are distilled into structured memories without the AI actively saving them.
- Proactive recall: The preflight tool automatically checks memory before the AI suggests any action.
- Character budget: recall_memories supports the max_chars parameter to control the length of returned content and avoid long memories consuming too much context.
- Migration tool: The migrate command can assess migration to AWS, Azure, or GCP, generate an inventory, migration scope document, and MIGRATION.md, and install the corresponding cloud rules package.
- Rules package: rules install devsecops can install 40 ready-made rules, covering secrets, infrastructure as code, least privilege, network exposure, CI/CD gates, change control, containers and Kubernetes,data processing, logging, and incident response, etc.
- Authentication: Hosted endpoints support OAuth 2.1, and API keys continue to be supported.
Usage
- Run the MCP server via npx cogmemai-mcp, compatible with Claude Code, Cursor, Windsurf, Cline, Continue, and any MCP-compatible tool.
- Hosted endpoint:https://hifriendbot.com/mcp/,支持 OAuth 2.1 login.
- Common command examples: npx cogmemai-mcp migrate assess --target aws; npx cogmemai-mcp rules install devsecops; cogmemai-mcp migrate gate "<phase>"; cogmemai-mcp migrate inventory.
- Environment variables: COGMEMAI_RECALL_MAX_CHARS can set the default recall character budget; COGMEMAI_INTENT_VERBOSE=1 can display a review summary for each round.
- Tools: recall_memories, save_memory, save_rule, guard_check, review_work, set_intent, get_intent, preflight, etc.
- SDK and REST: provides SDK calls such as guardCheck / reviewWork, as well as the POST /cogmemai/guard-check and POST /cogmemai/intent-check endpoints.
Use cases
- Coding assistants: maintain project knowledge, enforce security rules, and review code changes in tools such as Claude Code and Cursor.
- Agents and bots: provide persistent memory and rule enforcement for autonomous systems.
- Team collaboration: share memories and rules across users and devices.
- Cloud migration: assess and plan migrations, and install cloud security rule packs.
- Non-code work: review messages, purchases, changes, and any other actions through guard_check and review_work.
Limitations
- Some advanced features (such as judged check) are available only in paid tiers; the free tier can still use enforced invariants and deterministic review.
- The review feature required a git repository before v3.29.0; afterward it was changed to read session edit events.
- Migration assessment runs through the MSGR gateway and is subject to the account's daily quota.
- Official specific pricing, platform support details, or complete usage steps are not provided, and some information is not yet available.