Skip to main content

Modules

The agents area is split into small modules along a core/adapter seam: -core modules carry the domain and ports (light, no storage/HTTP), their siblings carry the implementations.

core/ — runtime & gateway

ModulePurpose
mc-agent-runtime-coreThe runtime's core: agent and session domain, the ports around it (chat, tools, token counting, memory strategies, repositories) and the use cases — turn loop, prompt assembly, tool dispatch. Free of storage, HTTP and templating.
mc-agent-runtimeThe adapters: file and in-memory repositories, the local in-process runtime, the Pebble prompt renderer, the tokenizer-backed token counters.
mc-agent-memory-strategiesThe memory strategies — keep everything, window, summarizing window, auto-compact. Swap this module to change memory behaviour.
mc-llm-gateway-coreThe gateway's core: chat/streaming types and the ports (LlmChat, LlmGateway, LlmConfigRepository) — light enough to be a compile dependency of anything.
mc-llm-gatewayThe gateway implementation: provider adapters, routing, retry/throttle decorators.
mc-message-repository-coreConversations, participants and messages as plain domain types, their ports, and the ConversationService use case.
mc-message-repositoryFile-backed and in-memory implementations of those ports.
mc-credentialsUser credentials store: OAuth2 tokens + API keys, encrypted at rest, with auto-refresh and a vendor OAuth handler SPI.

core/ — protocol

ModulePurpose
mc-agent-protocolThe protocol vocabulary: Response, Item, Conversation, events and commands — pure types, zero runtime dependencies.
mc-agent-protocol-mc-runtimeThe protocol surface implemented against the Mindconnect runtime.
mc-agent-protocol-openaiThe same surface implemented against the real OpenAI Responses + Conversations API.

core/ — tools

ModulePurpose
mc-agent-tool-spiWhat a tool is: Tool, ToolFactory, MultiToolProvider, ToolRegistry, ToolEnvironment + the ServiceLoader registry — see creating a tool.
mc-agent-toolsLightweight built-ins: filesystem, workspace, bash.
mc-agent-tools-codecode_execute — snippets in disposable docker/podman containers.
mc-agent-tools-documentPDF/Word/text tools via Tika + PDFBox + POI.
mc-agent-tools-webHTTP fetch, web search, HTML-to-Markdown.
mc-agent-tools-web-browserHeadless-Chromium fetching (Playwright) for JS-rendered sites — separate module because of the ~150 MB Chromium download.
mc-agent-tools-workflowPersisted workflows as agent tools — one tool per workflow, parameters from its input schema.
mc-agent-tools-gmailGmail tools via an MCP Docker container.
mc-mcp-proxyMCP wrapper on the official Java SDK: spawns/talks to MCP servers, provides tools/list and tools/call.

vectorstore/ — the knowledge layer

ModulePurpose
mc-vector-storeVector-store SPI + built-in file-persisted memory backend
mc-vector-store-pgvectorpgvector backend (one table per store, HNSW index)
mc-vector-store-toolsThe knowledge tool group: vector_upsert/search/delete_file/ingest_file
mc-file-store-coreThe file store's ports: FileStore, StoredFile, the FileStoreBackend SPI
mc-file-storeThe filesystem backend

See vector store & file store.

adapter/ — the ports on Postgres

ModulePurpose
postgres/mc-llm-gateway-pgLlmConfigRepository on Postgres.
postgres/mc-message-repository-pgConversationRepository and MessageRepository on Postgres.
postgres/mc-agent-runtime-pgThe runtime's seven repository ports on Postgres — definitions, sessions, traces, todo lists, summaries, working memory, workspace files.
postgres/mc-file-store-pgFileStore on Postgres — uploads as bytea rows; also the postgres backend of the SPI.

All of them build on common/mc-jdbc, a tiny JDBC helper (JSONB document tables, typed rows, transactions — no ORM). See Persistence.

springstarter/ — Spring Boot starters

ModulePurpose
mc-agent-starter-fileFile persistence, the default: every repository port, the LLM-config store and the file store under mindconnect.data.base-dir.
mc-agent-starter-postgresmindconnect.persistence=postgres: every port from one pooled DataSource, tables created on start.

An app has both on the classpath; the property picks. The runtime's own Spring wiring (DefaultAgentRuntimeConfig) still lives in mc-agent-runtime and is imported by the apps — moving it into a starter of its own is the next step.

builder/ & demo/ — embedding

ModulePurpose
mc-agent-runtime-builderSpring-free AgentRuntimeBuilder facade for embedding the runtime in any Java program; every capability module (tools, vector stores, file store, workflows) is optional.
mc-agent-simple-demoRunnable embedding examples: a minimal chat, and a chat with an attached file searched through the session's vector store.

server/ — deployable Spring Boot services

ModulePurpose
mc-agent-api-restThe REST controllers and DTOs as a library (no Boot main)
mc-agent-api-appAgent server (REST, streaming via SSE) — embeds mc-agent-api-rest
mc-agent-admin-ui-restThe Admin UI itself as an embeddable library: controllers serving UiNode JSON under /admin/api/**, pages, components, SPA assets
mc-agent-admin-ui-appAdmin UI Spring Boot application

client/

ModulePurpose
mc-agent-cliTerminal REPL client — wires the whole platform in a single JVM (CLI docs)