Back to directory

Multi-agent Java sample with Spring AI and Azure Cosmos DB

A sample personal-shopping chatbot in Java that routes customer requests to separate product, sales and refund agents, using Spring AI, Azure OpenAI and Azure Cosmos DB for both transactional data and vector search.

Multi-agent Java sample with Spring AI and Azure Cosmos DB

This sample implements a multi-agent customer-service chatbot, inspired by OpenAI Swarm and LangGraph, using a custom orchestration layer built on Spring AI and Azure OpenAI. An orchestrator routes each request to one of three agents: a product agent that answers enquiries with retrieval-augmented generation, a sales agent that places orders, and a refund agent that manages refunds.

Azure Cosmos DB serves as both the transactional store, accessed through Spring Data, and the vector store for product search via its DiskANN index, so one database backs both operational data and RAG retrieval. Long-term chat memory is kept per user session through Spring AI's ChatMemory interface, and a plain HTML, CSS and JavaScript single-page front end talks to a Spring Boot REST API.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.