ENGINEERING NOTES / Spring AI · RAG · MCP

AI Engineering Agent Platform.

A Java and Spring Boot AI platform combining RAG, MCP tools, agent orchestration, JWT security, PostgreSQL/pgvector, Kafka, streaming, and automated testing.

Built by Sumit Kushwaha · Java Backend Developer · Pune, India

VIEW SOURCE ON GITHUB ↗DOWNLOAD RESUME ↓

Connecting AI features to backend engineering

AI Engineering Agent Platform is Sumit Kushwaha’s Java and Spring Boot project for LLM chat, retrieval-augmented generation, agents, and multi-step tool execution. Its scope combines AI workflows with the backend concerns that make those workflows inspectable: authentication, execution tracing, streaming, cancellation, and failure-path testing.

The platform uses Spring AI, PostgreSQL/pgvector, Kafka, and server-sent events. The platform brings ingestion, retrieval, and agent execution into a Java service architecture. Its scope is a backend engineering project, with no claim of a public hosted service or measured production adoption.

Architecture: retrieval, tools, and execution

REST APIs and security
Spring Boot REST APIs expose chat, retrieval, agent, MCP tool, and trace functionality. Spring Security and JWT provide the authentication layer.
Ingestion and retrieval
Document ingestion selects a text extractor, chunks the extracted content, generates embeddings in a batch, and stores document chunks for PostgreSQL/pgvector search. Retrieval embeds a query and searches for similar chunks within the requesting user’s scope before formatting context for the model.
Agent orchestration
Agent workflows coordinate multiple tool steps, including MCP tools. Cancellation and guardrails form part of the execution controls rather than being separate interface features.
Events and streaming
Kafka and server-sent events are integrated into the platform. The ingestion consumer handles document-upload events, records processing status, stores embedded chunks, and publishes a completion event. Kafka listener startup is configurable, alongside an application-event listener.

Engineering challenges and quality

Multi-step AI workflows bring more failure paths than a single request and response: retrieval can return insufficient context, tool execution can fail, a caller can cancel a run, or an output stream can end before a workflow completes. The project’s emphasis on tracing, cancellation, guardrails, and automated tests reflects those engineering concerns.

The resume records 169+ automated tests spanning API, agent, and failure paths, plus Prometheus/Micrometer observability. The count is recorded in the resume; the portfolio audit did not execute the platform’s test suite. The portfolio does not extrapolate from it to claim a measured accuracy, latency, throughput, or security certification.

Scope and review notes

The useful review questions are how authenticated requests enter the system, how retrieved context reaches an agent, how a tool call is traced, and how cancellation and failure are represented. These boundaries connect AI engineering to API design, event processing, and automated testing.

The source separates document ingestion from retrieval. A retrieval result retains source chunks alongside the generated answer, giving the caller more context than an answer string alone. This makes source attribution and retrieval behavior useful points for a code review. The repository also contains dedicated tests for ingestion, vector retrieval, agent execution, MCP services, and authentication.