Skip to main content

Compared to LangChain4j & Spring AI

LangChain4j and Spring AI are excellent libraries for calling LLMs from Java. The Mindconnect agent runtime is a different kind of thing: a configuration-driven platform. The core difference is where the work lives.

With LangChain4j or Spring AI you write an application that talks to an LLM. With the Mindconnect agent runtime you configure an agent — and a running server already knows how to chat, stream, call tools, orchestrate sub-agents, and manage memory.

The core difference: configure, don't code

A full agent here is a piece of data — its prompt, model, memory strategy, tools and reviewers all live in a single agent definition; grant it run_agent and it delegates to any other agent it discovers via list_agents. You create it by editing JSON in initial-data/, or entirely through the Admin UI form — no Java, no rebuild, no redeploy.

{
"name": "research-lead",
"systemPrompt": "You are a research lead. …",
"llmConfigName": "agent-default",
"memoryConfig": { "kind": "auto_compact", "compactAtRatio": 0.8 },
"tools": [ { "name": "run_agents" }, { "name": "workspace_write" } ]
}

Switching the model from Claude to GPT to a local model is a config change. Adding a tool is a line in the tools array. Building a multi-agent system is giving one agent the run_agent tool and pointing it at others. None of this is code.

With a library, each of those is something you wire up and compile yourself.

Side by side

LangChain4jSpring AIMindconnect agent runtime
What it isJava LLM librarySpring LLM abstractionConfiguration-driven agent platform
You shipYour own app codeYour own app codeConfiguration (JSON or UI)
Define an agentWrite Java classesWrite Java/Spring beansA JSON file or a UI form
Add a toolAnnotate a Java method, register itDefine a @Tool beanAdd it to the agent's tools list
Swap the modelChange code, recompileChange config/beanChange llmConfigName
Multi-agentBuild the orchestration yourselfBuild it yourselfGive an agent run_agent; sub-sessions are built in
Memory / compactionHand-roll or use a moduleHand-roll or use a modulePick a strategy in memoryConfig
Server, streaming, UIYou build itYou build itREST + SSE streaming + Admin UI included
Runtime changesRedeployRedeployEdit config, no redeploy

When to use which

  • Reach for LangChain4j or Spring AI when you're embedding LLM calls inside a larger Java application and want full programmatic control over every step — they are libraries, and that is their strength.
  • Reach for the Mindconnect agent runtime when you want to stand up and operate agents — define them, give them tools, wire them into multi-agent systems, and change all of that without touching code or redeploying.

They are not mutually exclusive: the runtime's LLM gateway sits at the same layer a library would, and a custom tool is the escape hatch when you do need to write Java. The point is that for the common case — prompt, model, tools, memory, orchestration — you shouldn't have to.