https://github.com/runixer/laplaced
A lightweight, self-hosted Personal AI Daemon written in Go. Features Hybrid RAG (SQLite + Vectors), Long-term Memory, and Voice I/O. Optimized for low-end VPS and Raspberry Pi.
https://github.com/runixer/laplaced
ai-assistant chatbot gemini golang llm rag self-hosted telegram-bot
Last synced: about 1 month ago
JSON representation
A lightweight, self-hosted Personal AI Daemon written in Go. Features Hybrid RAG (SQLite + Vectors), Long-term Memory, and Voice I/O. Optimized for low-end VPS and Raspberry Pi.
- Host: GitHub
- URL: https://github.com/runixer/laplaced
- Owner: runixer
- License: mit
- Created: 2025-12-29T19:01:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-05-18T00:35:43.000Z (about 2 months ago)
- Last Synced: 2026-05-18T02:04:06.832Z (about 2 months ago)
- Topics: ai-assistant, chatbot, gemini, golang, llm, rag, self-hosted, telegram-bot
- Language: Go
- Homepage:
- Size: 2.56 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Laplaced
[](https://github.com/runixer/laplaced/actions/workflows/ci.yml)
[](https://codecov.io/gh/runixer/laplaced)
[](https://goreportcard.com/report/github.com/runixer/laplaced)
[](https://opensource.org/licenses/MIT)
English | [Русский](README.ru.md)
A smart Telegram bot for family use. Powered by Google Gemini via OpenRouter.
**What it does:**
- Chats using LLM with long-term memory (RAG)
- Understands voice messages natively (Gemini multimodal)
- Understands images and PDFs
- Has a web dashboard for debugging
## Quick Start
### Docker (recommended)
```bash
# Create config
mkdir -p data
cat > .env << 'EOF'
LAPLACED_TELEGRAM_TOKEN=your_bot_token
LAPLACED_OPENROUTER_API_KEY=your_api_key
LAPLACED_ALLOWED_USER_IDS=123456789
EOF
# Run
docker run -d --name laplaced \
--env-file .env \
-v $(pwd)/data:/data \
ghcr.io/runixer/laplaced:latest
```
### Docker Compose
```bash
git clone https://github.com/runixer/laplaced.git
cd laplaced
cp .env.example .env
# Edit .env with your tokens
docker-compose up -d
```
### From Source
**Requirements:** Go 1.24+
```bash
git clone https://github.com/runixer/laplaced.git
cd laplaced
go run cmd/bot/main.go
```
## Configuration
Configure via environment variables (recommended) or YAML config.
**Required variables:**
```bash
LAPLACED_TELEGRAM_TOKEN=your_bot_token
LAPLACED_OPENROUTER_API_KEY=your_api_key
LAPLACED_ALLOWED_USER_IDS=123456789,987654321 # ⚠️ Required! Empty = reject all
```
See [`.env.example`](.env.example) for all options.
> **Note:** `LAPLACED_ALLOWED_USER_IDS` must contain at least one user ID. If empty, the bot will reject all messages.
## Telegram Modes
- **Long Polling** (default) — simpler, works behind NAT
- **Webhook** — lower latency, better for production
```bash
# For webhook mode:
LAPLACED_TELEGRAM_WEBHOOK_URL=https://your-domain.com
```
## Debug Interface
Built-in web UI for debugging. **Disabled by default**.
```bash
LAPLACED_WEB_ENABLED=true
LAPLACED_WEB_PASSWORD=your_password
```
Useful for understanding how RAG works and inspecting memory.
**⚠️ Warning:** Exposes sensitive data. Don't expose publicly.
## Architecture
```
cmd/bot/ — entry point
internal/bot/ — message handling
internal/rag/ — vector search, memory retrieval
internal/memory/ — facts extraction
internal/storage/ — SQLite
```
See [docs/architecture/](docs/architecture/) for detailed documentation (in Russian).
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md). PRs welcome!
## License
MIT — see [LICENSE](LICENSE).