Run your own AI chatbot locally with Ollama, ensuring data privacy and avoiding cloud breaches. This lightweight setup requires no frameworks like React - just Ollama, a simple HTTP server, and a browser.
Evaluate and experiment LLM freely, own your AI.
- Local AI Control: Select from multiple configured models
- Privacy First: All processing happens on your machine
- No Internet Dependencies: Works completely offline
- Custom Personalities: Create specialized assistants with Modelfiles
- Explore Different Parameters: You can resend a message changing temperature, top_p, and top_k
- Expand with New Models on Ollama: When a new open-source model is deployed on Ollama server, you can download it and use it right away.
- Visualize Reasoning: Currently the reasoning part is showed, but it must be wrapped in the
<think>
tag (DeepSeek reasoning token), but it can be extend/modified. - MCP Integration: Execute bash commands with AI assistance and user approval
- Secure Command Execution: All commands require explicit user approval with safety checks
curl -fsSL https://ollama.com/install.sh | sh
Download from Ollama Windows Preview
# Start Ollama server locally
ollama serve
Ollama could be running in background, so the previous command could fail. Please check if it running at the default url localhost:11434
# Choose based on your hardware
ollama pull deepseek-r1:7b # 7B parameter version
ollama pull deepseek-r1:32b # Medium-sized model
Check Ollama list of avaiable models here.
Models can also be downloaded from Yla interface, but you have to specify the name in the config file.
chmod +x utils/run-yla.sh
./utils/run-yla.sh
Default script uses Chromium. Please change it if you want to use a different browser!
chmod +x utils/run-yla.sh
./utils/run-yla.sh --mcp
This starts YLA with MCP (Model Context Protocol) support enabled.
ollama serve
python -m http.server 8000
# Open https://localhost:8000/src/yla.html on your browser
The utils/run-yla.sh
script supports the following options:
# Start YLA without MCP (default)
./utils/run-yla.sh
# Start YLA with MCP support
./utils/run-yla.sh --mcp
./utils/run-yla.sh -m
# Show help
./utils/run-yla.sh --help
./utils/run-yla.sh -h
The script will:
- Start Ollama server automatically
- Start Python HTTP server on port 8000
- Start MCP HTTP Bridge on port 3001 (if MCP is enabled)
- Open YLA in your browser
- Clean up all services when you close the browser
YLA supports MCP integration, allowing AI models to execute terminal commands with user approval. This enables powerful capabilities like file system exploration, system information gathering, package management, and process monitoring.
User → YLA Web Interface → Ollama API → AI Model
↓
MCP HTTP Bridge → MCP Server → Bash Commands
- MCP Server (
src/mcp-server.js
) - Handles command execution and approval workflow - MCP Client (
src/mcp-client.js
) - Communicates with the MCP server - HTTP Bridge (
src/mcp-http-bridge.js
) - Provides HTTP API for frontend communication - HTTP Client (
src/mcp-http-client.js
) - Frontend client that communicates via HTTP - MCP UI (
src/mcp-ui.js
) - Provides user interface for command approval
npm install
npm run mcp-bridge
This starts the HTTP bridge server on port 3001.
npm run dev
This starts a simple HTTP server for your frontend.
- When the AI assistant wants to execute a command, it calls the
execute_bash_command
tool - The command is stored as "pending" and requires user approval
- A notification appears in the UI showing the pending command
- User can approve or deny the command
- If approved, the command executes and results are returned to the AI
Executes a bash command with user approval.
Parameters:
command
(string, required): The bash command to executedescription
(string, optional): Description of what the command does
Approves and executes a pending command.
Parameters:
commandId
(string, required): The ID of the command to approve
Denies and removes a pending command.
Parameters:
commandId
(string, required): The ID of the command to deny
Lists all pending commands that need approval.
Clears all pending commands.
GET /health
Returns the status of the MCP bridge and whether MCP is initialized.
GET /tools
Returns a list of available MCP tools.
POST /execute-command
Content-Type: application/json
{
"command": "echo 'Hello World'",
"description": "Test command"
}
Creates a pending command that requires approval.
POST /approve-command
Content-Type: application/json
{
"commandId": "1234567890"
}
Approves and executes a pending command.
POST /deny-command
Content-Type: application/json
{
"commandId": "1234567890"
}
Denies and removes a pending command.
GET /pending-commands
Returns a list of all pending commands.
POST /clear-all-pending-commands
Clears all pending commands.
- View Pending Commands: Click the checkmark button in the header to see pending commands
- Approve Commands: Click "Approve" to execute a command
- Deny Commands: Click "Deny" to reject a command
- Monitor Activity: The UI automatically shows when new commands are pending
The AI can now suggest and execute commands like:
- "Let me check your system information" →
uname -a
- "I'll help you list your files" →
ls -la
- "Let me check your disk usage" →
df -h
- User Consent: All commands require explicit approval
- Command Validation: Dangerous commands are blocked
- Command Timeout: Commands timeout after 30 seconds
- Shell Restriction: Commands run in
/bin/bash
with limited privileges - Error Handling: Failed commands are reported back to the user
- HTTP Bridge: Frontend communicates via HTTP, not direct SDK access
- Denied Command Persistence: Denied commands are remembered to prevent reappearance
The MCP integration supports most bash commands, including:
- File Operations:
ls
,cat
,head
,tail
,find
,grep
- System Info:
uname
,df
,free
,ps
,top
- Network:
ping
,curl
,wget
,netstat
- Package Management:
apt
,dpkg
,snap
- Process Management:
kill
,pkill
,systemctl
For security reasons, the following commands are blocked:
rm -rf
(recursive force delete)dd if=
(disk operations)mkfs
(filesystem operations)fdisk
(partition operations)- Fork bombs and other dangerous patterns
npm run test-mcp
npm run mcp-bridge
# Then use curl commands above
# Start HTTP bridge
npm run mcp-bridge
# In another terminal, start frontend server
npm run dev
# Open tests/test-frontend.html in browser
Open tests/test-command-detection.html
in your browser to test command detection patterns.
Open tests/test-mcp-integration.html
in your browser to test the complete MCP workflow.
# Check if port 3001 is available
netstat -tuln | grep 3001
# Kill any existing process on port 3001
sudo lsof -ti:3001 | xargs kill -9
# Restart the MCP server
node start-mcp.js
-
Check Ollama: Ensure Ollama is running
curl https://localhost:11434/api/tags
-
Check Model: Ensure your MCP-enabled model is available
ollama list
-
Check MCP Status: Verify MCP server is running
curl https://localhost:3001/health
-
Check Tools: Verify tools are available
curl https://localhost:3001/tools
-
Check Permissions: Ensure the MCP server has proper permissions
Create and use specialized models using Ollama's Modelfiles:
- Create a Modelfile in the
utils/custom_models
directory:
# Example technical-assistant.txt
FROM deepseek-r1:7b
SYSTEM """
You are an expert technical assistant.
Respond in markdown format with detailed explanations.
"""
PARAMETER num_ctx 32768
- Build your custom model:
ollama create my-expert -f ./utils/custom_models/technical-assistant.txt
- Add it to config.js:
models: [
{
name: "my-expert:latest",
description: "smart coding assistant",
num_ctx: 32768,
temperature: 0.7,
top_k: 40,
top_p: 0.9,
systemMessage: "You are an expert technical assistant.
Respond in markdown format with detailed explanations.",
size: "4.1GB"
}
]
Field | Description | Example |
---|---|---|
name |
Ollama model name (exact match required). Add version in case of custom models | "my-expert:latest" |
description |
Brief description (optional) | "smart coding assistant" |
size |
Size of the model. Used only to add the information on the model panel | "4.1GB" |
num_ctx |
Context window size (tokens) | 32768 |
systemMessage |
Hidden behavior instructions. It does not affect the model, but it is used to show, in case of custom model, the SYSTEM message defined in the creation phase | "You are an expert technical assistant. Respond in markdown format with detailed explanations." |
temperature |
Response creativity | 0.3-1.8 |
For custom models remember to add the version (:latest by default) in the config.
// config.js
const config = {
models: [
{
name: "Yla:latest", // Must match Ollama model name
num_ctx: 65536, // Context window size
temperature: 0.7, // 0-2 (0=precise, 2=creative)
top_k: 40, // 1-100
top_p: 0.9, // 0-1
systemMessage: "Friendly general assistant",
size: "4.1GB"
}
],
api: {
endpoint: "https://localhost:11434/v1/chat/completions",
available_models: "https://localhost:11434/v1/models",
}
};
- Validation: App checks installed models on launch
- Selection: Choose model from initial carousel
- Download: If it is not present on Ollama server, it will try to pull the model from Ollama. In case the download is allowed only for valid names
- Persistence: Selected model remembered until page refresh
- Visual Feedback:
- ✅ Available models - full color, clickable
⚠️ Missing models - grayed out with warning. Possibility of download
Note: Model names in config.js must exactly match Ollama model names. Use
ollama list
to verify installed models.
YLA includes comprehensive test suites located in the tests/
directory:
- test-command-detection.html: Tests command detection patterns
- test-mcp-integration.html: Tests MCP integration workflow
- test-frontend.html: Tests frontend functionality
- test-thinking-streaming.html: Tests thinking/streaming features
- test-thinking-brackets.html: Tests thinking bracket parsing
- test-current-state.html: Tests current application state
- test-mcp.js: Node.js MCP server tests
To run tests:
- Start the MCP bridge:
npm run mcp-bridge
- Open test files in your browser
- Follow the test instructions
Model Not Found:
- Verify model name matches Ollama's list
- Check Ollama is running:
ollama serve
- Ensure model files are in
utils/custom_models
directory
Performance Issues:
- Reduce
num_ctx
for smaller context windows - Use smaller model variants (e.g., 7B instead of 32B)
- Close other memory-intensive applications
MCP Issues:
- Check if MCP server is running on port 3001
- Verify model supports MCP tools
- Check browser console for error messages
- Use test files in
tests/
directory to isolate issues