# Mattermore **AI chat agent for Mattermost — powered by Ollama.** Ask questions, draft content, and get AI assistance directly in your Mattermost channels using `/ai` slash commands. All inference runs on your own Ollama server — no data leaves your infrastructure. > **Status:** Pre-implementation. Design is in `DESIGN.md`. --- ## Features - `/ai ` — Chat with the default model - `/ai model ` — Use a specific model - `/ai new` — Reset conversation context - `/ai model list` — List available models - `/ai help` — Show usage help - Configurable Ollama endpoint, model, system prompt, rate limits - Streaming responses updated live in ephemeral posts - Per-channel per-user conversation context (configurable retention) ## Prerequisites - **Mattermost Server** v8.x (Community Edition) - **Ollama** running and reachable from the Mattermost server - **Go** ≥ 1.21 (for building) ## Quick Start ```bash # Clone the repository git clone https://gitea.forkless.com/forkless/mattermore.git cd mattermore # Build the plugin make dist # Upload via Mattermost System Console → Plugins → Upload Plugin # Or via API: curl -X POST $MM_URL/api/v4/plugins \ -H "Authorization: Bearer $MM_TOKEN" \ -F "plugin=@dist/com.forkless.mattermore-0.1.0.tar.gz" ``` ## Configuration Configure via Mattermost **System Console → Plugins → Mattermore**: | Setting | Description | Default | |---|---|---| | Ollama Server URL | Base URL of the Ollama API | `http://localhost:11434` | | Default Model | Model used when none specified | `llama3.2` | | System Prompt | Prepended to every conversation | `You are a helpful assistant.` | | Max Response Tokens | Max tokens per response (0 = model default) | `2048` | | Rate Limit | Requests/minute/user (0 = unlimited) | `10` | | Allowed User IDs | Comma-separated user IDs (empty = all users) | (empty) | ## Build Targets ```bash make dist # Build all platform binaries and package plugin make check # Lint + test make clean # Remove build artifacts ``` ## Documentation | File | What it covers | |---|---| | `DESIGN.md` | Functional design, architecture, data flow, open decisions | | `PROJECT.md` | Project structure, key files, dependencies | | `DECISIONS.md` | Rationale behind architectural choices | | `CHANGES.md` | Per-release changelog | ## License MIT (to be confirmed — see `LICENSE` once added).