# CogniKernel: Persistent Memory for your AI Coding Agents

**URL:** <https://devcommunity.amd.com/t/cognikernel-persistent-memory-for-your-ai-coding-agents/1178>\
**Category:** Showcase\
**Tags:** ai, developer-program, memory\
**Created:** [October 9, 2026, 7:47pm UTC](https://devcommunity.amd.com/t/cognikernel-persistent-memory-for-your-ai-coding-agents/1178 "2026-10-09T19:47:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kanishk\_Singh](https://dub1.discourse-cdn.com/amd/user_avatar/devcommunity.amd.com/kanishk_singh/32/1932_2.png) [@Kanishk\_Singh](https://devcommunity.amd.com/u/Kanishk_Singh)\
**Post date:** [October 9, 2026, 7:47pm UTC](https://devcommunity.amd.com/t/cognikernel-persistent-memory-for-your-ai-coding-agents/1178/1 "2026-10-09T19:47:02Z")

</div>

AI coding agents are getting better at writing code, but there’s still a fundamental problem: they don’t reliably retain project knowledge across sessions.

Decisions get forgotten. Abandoned approaches resurface. Constraints established hours ago can disappear when a new session starts

I built [CogniKernel](https://kanishknoir.github.io/cognikernel/) to explore a different approach to this problem.

Instead of treating memory as another vector database wrapped around an LLM, CogniKernel uses an event-sourced architecture to maintain structured project memory across coding sessions. It captures decisions, constraints, changes, and superseded approaches so that useful context can survive beyond a single conversation.

A few engineering choices behind the project:

Local memory processing: Two fine-tuned encoder models exported to ONNX handle salience classification and supersession detection.

Event-sourced memory: Project knowledge is maintained as an evolving history rather than just a collection of retrieved text chunks.

No LLM in the memory-processing loop: The core classification pipeline uses compact models instead of requiring another generative-model call for every memory operation.

Cross-session continuity: The goal is to help coding agents retain the context needed to make better decisions over the life of a project.

I’m particularly interested in the systems side of agentic AI: how far can we push useful memory with compact models, deterministic infrastructure, and efficient inference instead of adding another large-model dependency?

This also raises interesting questions around latency, resource consumption, memory quality, and the trade-offs between compact encoder models and generative approaches.

CogniKernel is open source, and I’d love to hear how other developers are approaching persistent memory for AI agents.

Repository: [GitHub - KanishkNoir/cognikernel: Persistent, structured project memory for Claude Code and Codex - event-sourced, typed, fail-open. Your agent stops re-deciding what you already decided. · GitHub](https://github.com/KanishkNoir/cognikernel)

If you’re building AI agents, working on inference optimization, or experimenting with local models, I’d be interested in your thoughts on this architecture.

---

<div class="post-metadata">

**Author:** ![Hakob\_Arzumanyan](https://dub1.discourse-cdn.com/amd/user_avatar/devcommunity.amd.com/hakob_arzumanyan/32/214_2.png) [@Hakob\_Arzumanyan](https://devcommunity.amd.com/u/Hakob_Arzumanyan)\
**Post date:** [October 12, 2026, 1:46pm UTC](https://devcommunity.amd.com/t/cognikernel-persistent-memory-for-your-ai-coding-agents/1178/2 "2026-10-12T13:46:06Z")

</div>

Hello, thank you a lot for sharing your project with us. Just some notes from my side, your hooks.py comment points at the biggest systems win. Each Stop-hook drain starts a fresh Python process that spends about 20 s loading models before its first job, and that’s part of why the Stop hook now needs a 300 s timeout. One long-lived local worker that keeps the encoders loaded, with hooks only enqueueing, would remove that cold start. Batching would help too, since salience\_v2 and the cross-encoder run one sentence or pair per session.run call. Hope this is helpful somehow.

---

<div class="post-metadata">

**Author:** ![Kanishk\_Singh](https://dub1.discourse-cdn.com/amd/user_avatar/devcommunity.amd.com/kanishk_singh/32/1932_2.png) [@Kanishk\_Singh](https://devcommunity.amd.com/u/Kanishk_Singh)\
**Post date:** [October 12, 2026, 2:01pm UTC](https://devcommunity.amd.com/t/cognikernel-persistent-memory-for-your-ai-coding-agents/1178/3 "2026-10-12T14:01:42Z")

</div>

Hey, thanks Hakob. I’ve been postponing the next update to resolve this issue majorly. Your reply is really insightful and I would try our your suggestions!
