CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/langchain4j-ai-agent

Build AI agents with LangChain4j - basic agent, memory, tools/MCP, agentic workflows, guardrails, and observability

90

2.90x
Quality

90%

Does it follow best practices?

Impact

90%

2.90x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Multi-User Customer Support Chat System

Problem/Feature Description

A SaaS company is building a customer support portal where multiple customers can chat with an AI assistant simultaneously. Each customer must have their own isolated conversation history — so the agent remembers what Customer A said earlier without mixing it up with Customer B's context. The engineering team also wants the conversation history to survive application restarts, so it must be persisted to a storage backend (an in-memory map simulating a database is sufficient for the prototype).

The team needs a plain Java implementation (no Quarkus for now) that demonstrates correct use of per-user memory isolation, a configurable memory window that limits the conversation history length, and a pluggable persistence layer using the standard LangChain4j storage interface.

Output Specification

Produce a working Java project with the following:

  • pom.xml — Maven build file with all required dependencies
  • src/main/java/support/ChatMemoryStoreImpl.java — a custom chat memory store implementation
  • src/main/java/support/SupportAgent.java — the AI service interface
  • src/main/java/support/SupportAgentDemo.java — a runnable demo that:
    1. Creates two simulated users (e.g. user-alice and user-bob)
    2. Sends at least two messages per user, alternating between users
    3. Prints responses to stdout
  • design-notes.md — a brief document (bullet points acceptable) explaining the memory architecture choices made, including the class names and interfaces used

evals

tile.json