KendaliAI is a self-hosted, autonomous AI coding agent and orchestration gateway rebuilt natively in Go. Influenced heavily by the "Claude Code in 200 Lines" architecture, KendaliAI uses dynamic tool invocation and recursive LLM cognition loops to navigate, evaluate, and edit your local filesystem.
- Autonomous Cognition Loop: Recursive OS-level operations (
read_file,list_files,edit_file,bash) executed dynamically by models like DeepSeek. - OpenAI-Compatible Provider: Works with any OpenAI-compatible endpoint (DeepSeek, OpenAI, Groq, Ollama, etc.) — just change
config.json. - Custom Skills System: Extend the agent's capabilities with on-demand Markdown instructions or custom shell-based tools.
- Dynamic Configured Persona: Your AI's identity and restricted commands are defined dynamically in
~/.kendaliai/Persona.md. - Local TUI Dashboard: An interactive Terminal User Interface using BubbleTea for direct agent interaction.
- Telegram Gateway: Execute local terminal commands securely from your phone.
- Centralized Telemetry Logging: Stream OS Agent logs from all channels seamlessly.
- Go 1.24+
- CGO (required by
go-sqlite3)
All configuration lives in config.json. Copy the example and fill in your credentials:
cp config.example.json config.json{
"chatProvider": {
"type": "deepseek",
"endpoint": "https://api.deepseek.com/v1",
"model": "deepseek-v4-flash",
"apiKey": "your-api-key"
},
"embedding": {
"endpoint": "https://api.openai.com/v1",
"model": "text-embedding-3-small",
"apiKey": "your-embedding-api-key"
},
"channel": {
"type": "telegram",
"botToken": "your-telegram-bot-token"
}
}Config resolution order:
KENDALIAI_CONFIGenv var (explicit override)./config.json(development — local file)~/.kendaliai/config.json(production — home directory)
channelis optional. Without it, only TUI mode works. When you runonboardorgateway, you'll see instructions on how to add a channel.
make tidyCreates the gateway database and auto-binds the channel from config:
make dev-onboardUses ./config.json automatically (no install needed):
# Run TUI dashboard
make dev-tui
# Run headless gateway (Telegram bot + API server)
make dev-gateway
# Run any command
make dev-<command># Build optimized binary
make build-prod
# Install binary + config to system
make install
# Run
kendaliai tui
kendaliai gatewaymake install copies the binary to /usr/local/bin/ and config.json to ~/.kendaliai/config.json (if not already present).
| Target | Description |
|---|---|
make build |
Build debug binary to ./build/ |
make build-prod |
Build optimized binary (stripped, no symbols) |
make install |
Build + install to /usr/local/bin/ + copy config |
make dev |
Run via go run (no build step) |
make dev-tui |
Run TUI dashboard |
make dev-gateway |
Run headless gateway |
make dev-onboard |
Initialize gateway + bind channel from config |
make dev-logs |
Run log streamer |
make tidy |
Run go mod tidy |
make lint |
Run go vet |
make clean |
Remove build artifacts |
KendaliAI operates in natively decoupled environments. You can run one or multiple components completely asynchronously.
Access the autonomous agent locally through a BubbleTea interface. Fully actionable terminal environment with live streaming output.
make dev-tui # development
kendaliai tui # productionStarts the primary server and polls attached Telegram bots.
make dev-gateway # development
kendaliai gateway # productionWatch the autonomous agent think, execute tools, and respond in real-time across the entire platform.
make dev-logs # development
kendaliai logs # productionKendaliAI supports two types of custom skills located in ~/.kendaliai/skills/.
Add specialized knowledge or guidelines by creating a Markdown file with YAML frontmatter. These are registered as "on-demand" tools that the agent calls to load expert instructions when needed.
Example: ~/.kendaliai/skills/frontend-design.md
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces.
---
## Principles
- Use modern typography (Outfit, Roboto).
- Avoid generic "AI slop" aesthetics.
- Prioritize CSS-only motion effects.Add functional tools that execute shell scripts. These must be defined in ~/.kendaliai/skills/skills.json.
Example: ~/.kendaliai/skills/weather.sh
#!/bin/bash
curl -s "wttr.in/$1?format=3"Registering in skills.json:
{
"skills": [
{
"id": "weather",
"name": "Get Weather",
"description": "Fetch current weather for a city.",
"input_schema": {
"type": "object",
"properties": { "city": { "type": "string" } }
},
"execution": {
"type": "shell",
"command": "./weather.sh",
"args_mapping": { "city": "$1" }
},
"installed": true
}
]
}cmd/kendaliai/ # Primary CLI entrypoints (root, tui, gateway, logs)
internal/
├── agent/ # The Core Cognition Loop & Native Tool Registry
├── channels/ # External polling wrappers (Telegram)
├── config/ # Config singleton (config.json)
├── db/ # SQLite workspace storage
├── gateways/ # State handlers
├── logger/ # Central syslog mapping
├── providers/ # OpenAI-compatible provider (any endpoint)
├── security/ # Identity security
├── server/ # REST Gateway wrappers
└── tui/ # Charmbracelet Bubbletea reactive loop
Your agent is strictly bounded to the rules specified inside ~/.kendaliai/Persona.md. If this file doesn't exist, KendaliAI will generate it upon execution.
To restrict commands from being blindly executed natively by the agent, define them under exclude_cmd: in the file:
# Agent Identity
**Name:** KendaliAI
tools: read_file, list_files, edit_file, bash
exclude_cmd: rm, ls ., modify root fileKendaliAI uses a single OpenAI-compatible provider. To switch models or providers, just edit config.json:
{
"chatProvider": {
"type": "openai",
"endpoint": "https://api.openai.com/v1",
"model": "gpt-4o",
"apiKey": "sk-..."
}
}Works with any OpenAI-compatible API: DeepSeek, OpenAI, Groq, Together, Ollama, LM Studio, etc.

