Detailed breakdown The libraries
One card per option. For each: what it is, what it does well, what it doesn't, the
exact Maven coordinates when applicable, and a representative code example.
Message window persistence with a pluggable store
Chat History Active Java Apache 2.0 ★ 9,000
The most popular LLM library on the JVM. Ships a ChatMemory interface with MessageWindowChatMemory and TokenWindowChatMemory implementations. Persistence is bring-your-own via the ChatMemoryStore interface.
dev.langchain4j:langchain4j:1.0.0
What it does well
- Mature, well-documented, widely adopted
- Clean abstraction for message history
- Pluggable storage via ChatMemoryStore
- Token-aware window eviction
Where it stops
- No fact extraction — it is a message container
- No semantic search built in (RAG is a separate subsystem)
- Every team implements their own knowledge layer on top
ChatMemory chatMemory = MessageWindowChatMemory.withMaxMessages(20);
chatMemory.add(UserMessage.from("I'm allergic to peanuts"));
chatMemory.add(AiMessage.from("Got it, I'll remember that."));
// Next session: chatMemory is empty unless ChatMemoryStore is implemented
Message history with the broadest backend coverage
Chat History Active Java Apache 2.0 ★ 6,000
Spring AI's ChatMemory shipped GA in 2025 with JDBC (Postgres, MySQL, Oracle, SQL Server), Cassandra, Mongo, Neo4j, and Cosmos DB backends. Three advisors plug it into ChatClient. The VectorStoreChatMemoryAdvisor indexes raw messages in a VectorStore but does not extract facts.
org.springframework.ai:spring-ai-core:1.0.5
What it does well
- Broadest backend support of any JVM memory library
- Cassandra support includes TTL
- Tight Spring Boot integration
- VectorStoreChatMemoryAdvisor enables RAG-style message recall
Where it stops
- Indexes raw messages, not extracted facts
- No entity model or relationship graph
- No conflict detection
- Community examples describe building fact extraction yourself with a "recorder advisor" pattern
ChatMemory chatMemory = MessageWindowChatMemory.builder()
.chatMemoryRepository(new JdbcChatMemoryRepository(jdbcTemplate))
.maxMessages(20)
.build();
ChatClient client = ChatClient.builder(chatModel)
.defaultAdvisors(MessageChatMemoryAdvisor.builder(chatMemory).build())
.build();
Vertex AI Memory Bank or keyword matching
Framework Active Java Apache 2.0 ★ 2,000
Google's Agent Development Kit shipped 1.0.0 for Java in 2025 with a BaseMemoryService interface. Two implementations: InMemoryMemoryService (keyword matching only, for development) and VertexAiMemoryBankService (fully managed, Vertex AI only). Memory Bank does real fact extraction but is Google Cloud-locked.
com.google.adk:google-adk:1.0.0
What it does well
- Memory Bank is a real managed memory service with fact extraction
- Session services with Firestore and Vertex backends
- Native Gemini integration
- LangChain4j integration for other model providers
Where it stops
- Semantic memory requires Vertex AI (vendor lock-in)
- OSS path (InMemoryMemoryService) is keyword matching over a HashMap
- No self-hosted option for real memory
- Pricing is per-API-call
Memory Bank is genuinely good, but you pay for it in cloud lock-in.
JetBrains fact store, now with native Java API
Framework Active Kotlin/Java Apache 2.0 ★ 1,500
JetBrains' JVM agent framework. As of Koog 0.7, memory splits into ChatMemory (conversation history), LongTermMemory (vector-based fact retrieval, organised by Concept/Subject/Scope), and Persistence (state checkpoints), with a separate History Compression feature for token budgeting. The nodeSaveToMemoryAutoDetectFacts node uses an LLM to extract facts automatically from chat history. Koog 0.7 also shipped a native Java API at JavaOne. Closest competitor to Mem0/Zep on the JVM.
What it does well
- LongTermMemory with Concept/Subject/Scope model
- LLM-based fact extraction out of the box (nodeSaveToMemoryAutoDetectFacts)
- Native Java API as of Koog 0.7 (JavaOne 2026)
- History Compression for token-budgeted prompts
- Persistence providers for in-memory, file, and Postgres
- Active JetBrains maintenance
Where it stops
- No supersession layer for facts that contradict earlier ones
- No cross-session consolidation (merging, deduplication, decay)
- No temporal validity windows on facts
- No published recall benchmarks (e.g. LongMemEval)
agent {
memory {
scope = MemoryScope.User("user_123")
}
nodeSaveToMemoryAutoDetectFacts {
subjects = listOf(Subject.User, Subject.Product)
}
}
AgentMemory (the earlier API tracked in JetBrains/koog#1001) is being deprecated in favour of the ChatMemory / LongTermMemory / Persistence split plus History Compression. Entry updated 2026-05-12 following correspondence with the Koog team at JetBrains.
Blackboard pattern, long-term memory is a non-goal
Framework Active Kotlin / Java Apache 2.0 ★ 3,000
Rod Johnson's (Spring creator) JVM agent framework. Uses Goal-Oriented Action Planning with a blackboard state container for domain objects passed between actions during an agent run. Per the maintainers, long-term conversational memory is explicitly out of scope.
com.embabel.agent:embabel-agent-starter
What it does well
- Strong agent orchestration with goal-oriented planning
- Clean blackboard pattern for domain objects within a run
- Full Java interop from Kotlin core
- Spring-integrated
Where it stops
- Per-run blackboard, not persistent across sessions
- Long-term memory is an explicit non-goal
- Use Embabel for orchestration, bring memory separately
Per maintainers: "in Embabel it's not about conversational memory so much as domain objects that are stored in the blackboard during the flow."
Thin REST client, requires Python Mem0 server
Framework Java MIT ★ 9
The top Google result for "Mem0 Java SDK" is me.pgthinker:mem0-client-java, a community REST wrapper. It is not an SDK in the meaningful sense — it requires running a Python Mem0 server alongside your JVM application, with its own Qdrant and graph database dependencies.
me.pgthinker:mem0-client-java:0.1.3
What it does well
- Wraps a real memory engine (Mem0) via HTTP
- Inherits Mem0 Python features through the sidecar
Where it stops
- 9 GitHub stars, 13 total commits, last updated ~9 months ago
- Not an official SDK — Mem0 ships Python and Node.js only
- Requires running Python Mem0 server alongside your JVM application
- Inherits Mem0 infrastructure dependencies (Qdrant + graph DB typically)
- No SLAs, no roadmap, unmaintained
Not a serious production option for JVM teams. If you want Mem0, either pay for Mem0 Cloud or accept the Python sidecar.
Does not exist
Does Not Exist Does not exist — —
Zep's official clients are Python, TypeScript, and Go. There is no Java SDK at any state of completeness. Java teams who want Zep's temporal knowledge graph must either consume Zep Cloud over HTTP or hand-roll a REST client.
Where it stops
- No Java SDK exists
- Python, TypeScript, and Go only
- JVM teams must hand-roll HTTP clients
Graphiti (Zep's engine) scored 63.8% on LongMemEval-S in published results. Zep's earlier 84% LoCoMo claim was re-evaluated to 58.44% by independent testing (getzep/zep-papers#5). Neither number is reachable from Java without a sidecar.
The most common Java AI memory stack in production today
DIY Active Java N/A
Most Java teams that need real memory assemble their own: PostgreSQL with pgvector (or Qdrant) for embeddings, JdbcChatMemoryRepository for raw messages, a custom advisor that calls an LLM to extract facts, and a cron job for decay. Roughly 1,500–3,000 lines of bespoke Java per team.
What it does well
- Full control over every layer
- Uses well-known components (Postgres, pgvector, Jackson)
- No new vendor dependency
- Can be shaped to exact requirements
Where it stops
- 1,500–3,000 lines of custom code to maintain
- Quietly diverges between teams and projects
- Rarely gets temporal reasoning right
- Almost never gets consolidation right
- No common benchmark to validate against
Fact extraction, hybrid retrieval, explicit supersession, benchmarked
Memory Layer Active Python core, JVM via Spring Boot starter or MCP HTTP Apache 2.0 ★ 0
A durable memory system for AI agents from the JamJet team. Ships LLM-driven fact extraction, hybrid retrieval (vector + FTS keyword + temporal scoring, with optional cross-encoder rerank), explicit fact supersession (supersede(old_id, new_id) with recall filtering by default), per-tenant scope isolation (user_id + org_id), and mode-aware reading (recall vs synthesis). Benchmarked at 71% overall on LongMemEval-S (500q, gpt-4o-mini judge) with per-category numbers and ablation history published. JVM access via engram-spring-boot-starter on Maven Central with Spring AI ChatMemoryRepository auto-configuration, or via MCP server (memory_record, memory_recall, memory_context) reachable from any HTTP client. Zero infrastructure by default (SQLite + hnswlib); PostgreSQL optional.
dev.jamjet:engram-spring-boot-starter:0.2.0 (engram-spring-boot-starter); jamjet-engram 0.2.0 on PyPI
What it does well
- Explicit fact supersession primitive (supersede) — newer facts override older ones, recall filters by default
- Hybrid retrieval: vector (HNSW) + FTS keyword + temporal scoring + optional cross-encoder rerank
- Mode-aware reading: Reader(mode=recall) (verifier-gated) vs Reader(mode=synthesis) (recommendation-grounded); routing preference questions to synthesis lifted single-session-preference from 29% to 71% on LongMemEval-S
- Per-tenant Scope (user_id + org_id) partitioned at SQL and HNSW levels — no cross-tenant leakage by construction
- Benchmarked at 71% overall on LongMemEval-S (500q, gpt-4o-mini judge) with per-category numbers and negative-result ablations published
- JVM-native via engram-spring-boot-starter (auto-configures Spring AI ChatMemoryRepository)
- Also exposes an MCP server reachable from any HTTP client via engram-server (ghcr.io/jamjet-labs/engram-py-server)
- Apache 2.0, published on Maven Central + PyPI + crates.io + GHCR + Official MCP Registry
Where it stops
- Brand-new project with no community traction yet (0 stars on jamjet-labs/engram at time of writing) — you will be an early adopter
- True cross-session consolidation (merging, deduplication, decay) is on the roadmap; only supersession + scope isolation ship today
- 25pp gap to the AgentMemory frontier (96.2%) on LongMemEval-S — published as a public roadmap item, not hidden
- Synthesis-mode reader is calibrated against gpt-4o-mini; Sonnet/Haiku currently regress on tool-protocol parsing
// JVM path: engram-spring-boot-starter wires Spring AI ChatMemoryRepository
@Autowired ChatMemoryRepository memory;
memory.saveAll("alice", List.of(
new UserMessage("I'm allergic to peanuts."),
new AssistantMessage("Got it.")
));
List<Message> recent = memory.findByConversationId("alice");
// Or run the MCP server and call it from any agent:
// docker run -p 7080:7080 ghcr.io/jamjet-labs/engram-py-server:latest
This site is maintained by the JamJet team. Engram is their project. We have tried to present it with the same honesty we apply to every other library here, including the gaps. Pull requests correcting any inaccuracy are welcome. Entry refreshed 2026-05-12 to reflect engram-spring-boot-starter 0.2.0 (Maven Central), jamjet-engram 0.2.0 (PyPI), and the published LongMemEval-S 71% benchmark.