# intersystems-community/ai-hub-eap architecture

> Architecture diagram of the GitHub repository intersystems-community/ai-hub-eap, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/intersystems-community/ai-hub-eap
- Repository: https://github.com/intersystems-community/ai-hub-eap

## Overview

The AI Hub supports two principal workflows: developers build IRIS-native or LangChain applications that access governed AI resources, and IRIS owners expose business logic as MCP tools for external clients. The Config Store supplies configuration and credentials, while IRIS RBAC governs access; the LangChain extension also exposes IRIS Vector Search. The tree contains ObjectScript samples and small Python MCP examples, not the core SDK or server implementations, so several documented subsystems use enclosing directory paths and their links reflect README-level evidence rather than inspected source calls.

Main entry points: [`langchain`](https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain) (LangChain integration), [`objectscript/cls/Sample/AI`](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI) (ObjectScript SDK), [`objectscript/cls/Sample/MCP`](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/MCP) (MCP Server), [`objectscript/cls/Sample/AI/ToolSet`](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/ToolSet) (Toolset definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdk["AI SDK"]
  node_objectscript_sdk["ObjectScript SDK"]
  node_langchain_sdk["LangChain integration"]
  node_vector_search["Vector Search"]
end

subgraph group_mcp["MCP publishing"]
  node_mcp_server["MCP Server"]
  node_toolsets["Toolset definitions"]
  node_business_logic["IRIS business logic"]
end

subgraph group_governance["Configuration governance"]
  node_config_store[("Config Store")]
  node_iris_wallet[("IRIS Wallet")]
  node_rbac["IRIS RBAC"]
  node_audit["Access auditing"]
end

subgraph group_examples["Sample applications"]
  node_objectscript_agents["Agent examples"]
  node_agent_tools["Agent tools"]
  node_addition_demo["Addition MCP demo<br/>[addition_server.py]"]
  node_multiplication_demo["Multiplication MCP demo"]
end

node_developer(("Application developer"))
node_external_client(("External MCP client"))
node_ai_resources(("AI providers"))
node_remote_mcp(("Remote MCP servers"))

node_developer -->|"builds with"| node_objectscript_sdk
node_developer -->|"deploys with"| node_langchain_sdk
node_objectscript_sdk -->|"abstracts access"| node_ai_resources
node_langchain_sdk -->|"accesses models"| node_ai_resources
node_langchain_sdk -->|"accesses servers"| node_remote_mcp
node_langchain_sdk -->|"reads configuration"| node_config_store
node_objectscript_sdk -->|"finds configurations"| node_config_store
node_config_store -->|"stores secrets"| node_iris_wallet
node_objectscript_sdk -->|"governs access"| node_rbac
node_langchain_sdk -->|"governs access"| node_rbac
node_langchain_sdk -->|"supports auditing"| node_audit
node_langchain_sdk -->|"exposes search"| node_vector_search
node_external_client -->|"invokes tools"| node_mcp_server
node_mcp_server -->|"serves definitions"| node_toolsets
node_toolsets -->|"exposes methods"| node_business_logic
node_mcp_server -->|"governs access"| node_rbac
node_objectscript_agents -.->|"uses tools"| node_agent_tools
node_addition_demo -->|"serves addition"| node_external_client
node_multiplication_demo -->|"serves multiplication"| node_external_client

click node_objectscript_sdk "https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI"
click node_langchain_sdk "https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain"
click node_vector_search "https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain"
click node_config_store "https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain"
click node_mcp_server "https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/MCP"
click node_toolsets "https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/ToolSet"
click node_business_logic "https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI"
click node_objectscript_agents "https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/Agent"
click node_agent_tools "https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/Tools"
click node_addition_demo "https://github.com/intersystems-community/ai-hub-eap/blob/master/langchain/addition_server.py"
click node_multiplication_demo "https://github.com/intersystems-community/ai-hub-eap/blob/master/langchain/multiplication_server.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_objectscript_sdk,node_langchain_sdk,node_vector_search,node_external_client toneBlue
class node_mcp_server,node_toolsets,node_business_logic toneAmber
class node_config_store,node_iris_wallet,node_rbac,node_audit,node_remote_mcp toneMint
class node_objectscript_agents,node_agent_tools,node_addition_demo,node_multiplication_demo toneRose
class node_developer,node_ai_resources toneIndigo
```

## Components

### AI SDK

- [ObjectScript SDK](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI): `objectscript/cls/Sample/AI`
- [LangChain integration](https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain): `langchain`
- [Vector Search](https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain): `langchain`

### MCP publishing

- [MCP Server](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/MCP): `objectscript/cls/Sample/MCP`
- [Toolset definitions](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/ToolSet): `objectscript/cls/Sample/AI/ToolSet`
- [IRIS business logic](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI): `objectscript/cls/Sample/AI`

### Configuration governance

- [Config Store](https://github.com/intersystems-community/ai-hub-eap/tree/master/langchain): `langchain`
- **IRIS Wallet**
- **IRIS RBAC**
- **Access auditing**

### Sample applications

- [Agent examples](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/Agent): `objectscript/cls/Sample/AI/Agent`
- [Agent tools](https://github.com/intersystems-community/ai-hub-eap/tree/master/objectscript/cls/Sample/AI/Tools): `objectscript/cls/Sample/AI/Tools`
- [Addition MCP demo](https://github.com/intersystems-community/ai-hub-eap/blob/master/langchain/addition_server.py): `langchain/addition_server.py`
- [Multiplication MCP demo](https://github.com/intersystems-community/ai-hub-eap/blob/master/langchain/multiplication_server.py): `langchain/multiplication_server.py`

### Other components

- **Application developer**
- **External MCP client**
- **AI providers**
- **Remote MCP servers**

## Connections

- Application developer → ObjectScript SDK: builds with
- Application developer → LangChain integration: deploys with
- ObjectScript SDK → AI providers: abstracts access
- LangChain integration → AI providers: accesses models
- LangChain integration → Remote MCP servers: accesses servers
- LangChain integration → Config Store: reads configuration
- ObjectScript SDK → Config Store: finds configurations
- Config Store → IRIS Wallet: stores secrets
- ObjectScript SDK → IRIS RBAC: governs access
- LangChain integration → IRIS RBAC: governs access
- LangChain integration → Access auditing: supports auditing
- LangChain integration → Vector Search: exposes search
- External MCP client → MCP Server: invokes tools
- MCP Server → Toolset definitions: serves definitions
- Toolset definitions → IRIS business logic: exposes methods
- MCP Server → IRIS RBAC: governs access
- Agent examples → Agent tools: uses tools
- Addition MCP demo → External MCP client: serves addition
- Multiplication MCP demo → External MCP client: serves multiplication
