# limitcantcode/jaison-core architecture

> Architecture diagram of the GitHub repository limitcantcode/jaison-core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/limitcantcode/jaison-core
- Repository: https://github.com/limitcantcode/jaison-core

## Overview

J.A.I.son is a configurable AI companion server. Its principal workflow accepts application requests through the REST/WebSocket server, schedules work in JAIson, builds prompt context, and uses configurable speech, language, embedding, and filter operations; results and events are exposed to clients. MCP tools extend that workflow, while process management supports reusable local services. The README documents these capabilities, but sampled source does not expose every request or operation-stage call, so unsampled links are omitted or marked unverified.

Main entry points: [`src/utils/operations/manager.py`](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/operations/manager.py) (Operation manager), [`src/utils/jaison.py`](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/jaison.py) (Job orchestrator), [`src/utils/server/app_server.py`](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/server/app_server.py) (REST and WebSocket), [`src/main.py`](https://github.com/limitcantcode/jaison-core/blob/main/src/main.py) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Server entry"]
  node_main["CLI entry<br/>[main.py]"]
  node_server["REST and WebSocket<br/>[app_server.py]"]
end

subgraph group_workflow["Conversation workflow"]
  node_jaison["Job orchestrator<br/>[jaison.py]"]
  node_prompter["Prompt builder<br/>[prompter.py]"]
  node_messages["Conversation messages<br/>[message.py]"]
  node_context["Context metadata<br/>[context.py]"]
end

subgraph group_ops["Operation pipeline"]
  node_opmanager["Operation manager<br/>[manager.py]"]
  node_stt["Speech recognition"]
  node_t2t["Text generation"]
  node_tts["Speech synthesis"]
  node_audiofilters["Audio filters"]
  node_textfilters["Text filters"]
  node_embedding["Embedding operations"]
end

subgraph group_extensions["Extensions and processes"]
  node_mcpmanager["MCP manager<br/>[manager.py]"]
  node_processmanager["Process manager<br/>[manager.py]"]
  node_koboldprocess["KoboldCPP process<br/>[koboldcpp.py]"]
end

subgraph group_shared["Configuration and events"]
  node_config["Configuration<br/>[config.py]"]
  node_args["CLI arguments<br/>[args.py]"]
  node_observer["Event broadcaster<br/>[observer.py]"]
  node_logging["Logging<br/>[logging.py]"]
end

node_application(("Client application"))
node_providers{{"AI service providers"}}
node_mcpservers{{"MCP servers"}}

node_application -->|"sends requests"| node_server
node_main -->|"starts"| node_server
node_main -->|"reads options"| node_args
node_main -->|"configures"| node_logging
node_server -->|"routes work"| node_jaison
node_server -->|"reads settings"| node_config
node_server -->|"subscribes events"| node_observer
node_jaison -->|"configures prompts"| node_prompter
node_prompter -->|"builds with"| node_messages
node_messages -->|"uses metadata"| node_context
node_jaison -->|"dispatches operations"| node_opmanager
node_opmanager -->|"loads by role"| node_stt
node_opmanager -->|"loads by role"| node_t2t
node_opmanager -->|"loads by role"| node_tts
node_opmanager -->|"loads by role"| node_audiofilters
node_opmanager -->|"loads by role"| node_textfilters
node_opmanager -->|"loads by role"| node_embedding
node_opmanager -->|"loads configuration"| node_config
node_jaison -->|"uses MCP"| node_mcpmanager
node_mcpmanager -->|"requests generation"| node_opmanager
node_mcpmanager -->|"starts sessions"| node_mcpservers
node_processmanager -->|"loads process"| node_koboldprocess
node_t2t -->|"links local process"| node_processmanager
node_stt -.->|"uses configured services"| node_providers
node_t2t -.->|"uses configured services"| node_providers
node_tts -.->|"uses configured services"| node_providers
node_jaison -.->|"broadcasts events"| node_observer

click node_main "https://github.com/limitcantcode/jaison-core/blob/main/src/main.py"
click node_server "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/server/app_server.py"
click node_jaison "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/jaison.py"
click node_prompter "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/prompter/prompter.py"
click node_messages "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/prompter/message.py"
click node_context "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/prompter/context.py"
click node_opmanager "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/operations/manager.py"
click node_stt "https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/stt"
click node_t2t "https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/t2t"
click node_tts "https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/tts"
click node_audiofilters "https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/filter_audio"
click node_textfilters "https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/filter_text"
click node_embedding "https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/embedding"
click node_mcpmanager "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/mcp/manager.py"
click node_processmanager "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/processes/manager.py"
click node_koboldprocess "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/processes/processes/koboldcpp.py"
click node_config "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/config.py"
click node_args "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/args.py"
click node_observer "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/helpers/observer.py"
click node_logging "https://github.com/limitcantcode/jaison-core/blob/main/src/utils/logging.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_main,node_server,node_application toneBlue
class node_jaison,node_prompter,node_messages,node_context toneAmber
class node_opmanager,node_stt,node_t2t,node_tts,node_audiofilters,node_textfilters,node_embedding,node_mcpservers toneMint
class node_mcpmanager,node_processmanager,node_koboldprocess toneRose
class node_config,node_args,node_observer,node_logging,node_providers toneIndigo
```

## Components

### Server entry

- [CLI entry](https://github.com/limitcantcode/jaison-core/blob/main/src/main.py): `src/main.py`
- [REST and WebSocket](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/server/app_server.py): `src/utils/server/app_server.py`

### Conversation workflow

- [Job orchestrator](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/jaison.py): `src/utils/jaison.py`
- [Prompt builder](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/prompter/prompter.py): `src/utils/prompter/prompter.py`
- [Conversation messages](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/prompter/message.py): `src/utils/prompter/message.py`
- [Context metadata](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/prompter/context.py): `src/utils/prompter/context.py`

### Operation pipeline

- [Operation manager](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/operations/manager.py): `src/utils/operations/manager.py`
- [Speech recognition](https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/stt): `src/utils/operations/stt`
- [Text generation](https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/t2t): `src/utils/operations/t2t`
- [Speech synthesis](https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/tts): `src/utils/operations/tts`
- [Audio filters](https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/filter_audio): `src/utils/operations/filter_audio`
- [Text filters](https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/filter_text): `src/utils/operations/filter_text`
- [Embedding operations](https://github.com/limitcantcode/jaison-core/tree/main/src/utils/operations/embedding): `src/utils/operations/embedding`

### Extensions and processes

- [MCP manager](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/mcp/manager.py): `src/utils/mcp/manager.py`
- [Process manager](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/processes/manager.py): `src/utils/processes/manager.py`
- [KoboldCPP process](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/processes/processes/koboldcpp.py): `src/utils/processes/processes/koboldcpp.py`

### Configuration and events

- [Configuration](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/config.py): `src/utils/config.py`
- [CLI arguments](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/args.py): `src/utils/args.py`
- [Event broadcaster](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/helpers/observer.py): `src/utils/helpers/observer.py`
- [Logging](https://github.com/limitcantcode/jaison-core/blob/main/src/utils/logging.py): `src/utils/logging.py`

### Other components

- **Client application**
- **AI service providers**
- **MCP servers**

## Connections

- Client application → REST and WebSocket: sends requests
- CLI entry → REST and WebSocket: starts (evidence: `src/main.py`)
- CLI entry → CLI arguments: reads options (evidence: `src/main.py`)
- CLI entry → Logging: configures (evidence: `src/main.py`)
- REST and WebSocket → Job orchestrator: routes work (evidence: `src/utils/server/app_server.py`)
- REST and WebSocket → Configuration: reads settings (evidence: `src/utils/server/app_server.py`)
- REST and WebSocket → Event broadcaster: subscribes events (evidence: `src/utils/server/app_server.py`)
- Job orchestrator → Prompt builder: configures prompts (evidence: `src/utils/jaison.py`)
- Prompt builder → Conversation messages: builds with (evidence: `src/utils/prompter/prompter.py`)
- Conversation messages → Context metadata: uses metadata (evidence: `src/utils/prompter/message.py`)
- Job orchestrator → Operation manager: dispatches operations (evidence: `src/utils/jaison.py`)
- Operation manager → Speech recognition: loads by role (evidence: `src/utils/operations/manager.py`)
- Operation manager → Text generation: loads by role (evidence: `src/utils/operations/manager.py`)
- Operation manager → Speech synthesis: loads by role (evidence: `src/utils/operations/manager.py`)
- Operation manager → Audio filters: loads by role (evidence: `src/utils/operations/manager.py`)
- Operation manager → Text filters: loads by role (evidence: `src/utils/operations/manager.py`)
- Operation manager → Embedding operations: loads by role (evidence: `src/utils/operations/manager.py`)
- Operation manager → Configuration: loads configuration (evidence: `src/utils/operations/manager.py`)
- Job orchestrator → MCP manager: uses MCP (evidence: `src/utils/jaison.py`)
- MCP manager → Operation manager: requests generation (evidence: `src/utils/mcp/manager.py`)
- MCP manager → MCP servers: starts sessions (evidence: `src/utils/mcp/manager.py`)
- Process manager → KoboldCPP process: loads process (evidence: `src/utils/processes/manager.py`)
- Text generation → Process manager: links local process (evidence: `src/utils/operations/t2t/kobold.py`)
- Speech recognition → AI service providers: uses configured services
- Text generation → AI service providers: uses configured services
- Speech synthesis → AI service providers: uses configured services
- Job orchestrator → Event broadcaster: broadcasts events (evidence: `src/utils/jaison.py`)
