Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# Bot config
GEMINI_API_KEY=<your-gemini-api-key>
ADDR=:8080

# AI Provider Configuration
# AI_PROVIDER can be 'gemini' or 'openai'. Defaults to 'gemini'.
AI_PROVIDER=gemini

# Gemini Configuration (Always required for embeddings)
GEMINI_API_KEY=<your-gemini-api-key>
# GEMINI_MODEL=gemini-flash-latest

# OpenAI Configuration (Required if AI_PROVIDER=openai)
OPENAI_API_KEY=<your-openai-api-key>
# OPENAI_MODEL=gpt-4o-mini
# OPENAI_BASE_URL=https://api.openai.com/v1

# Telegram client config
BOT_TOKEN=<telegram-bot-token>
USERNAME_LIMITS=
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@ history-gemini/*
!history-gemini/.gitkeep
bot-context/*
!bot-context/.gitkeep

credentials.json
token.json
94 changes: 0 additions & 94 deletions CLAUDE.md

This file was deleted.

33 changes: 7 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,13 @@ You can configure the server using Environment Variables.

| Variable | Description | Default | Required |
| :--- | :--- | :--- | :---: |
| `GEMINI_API_KEY` | Your Google Gemini API access key. | - | ✅ |
| `AI_PROVIDER` | The AI provider to use (`gemini` or `openai`). | `gemini` | ❌ |
| `GEMINI_API_KEY` | Your Google Gemini API access key (Always required for embedding). | - | ✅ |
| `ADDR` | Server listen address. | `:8080` | ❌ |
| `GEMINI_MODEL` | The specific model version to use. | `gemini-flash-latest` | ❌ |
| `OPENAI_API_KEY` | Your OpenAI API access key (Required if `AI_PROVIDER` is `openai`). | - | ❌ |
| `OPENAI_MODEL` | The specific OpenAI model to use. | `gpt-4o-mini` | ❌ |
| `OPENAI_BASE_URL` | Base URL for OpenAI compatible APIs. | - | ❌ |
| `MCP_SERVERS` | Comma-separated list of MCP HTTP stream servers (e.g., `http://localhost:8081/mcp`). | - | ❌ |
| `GEMINI_SEARCH_DISABLED` | Set to `true` or `1` to disable Google Search grounding. Search is **enabled by default**. | `false` | ❌ |
| `HISTORY_SUMMARY` | Message count trigger for history summarization (`0` to disable). | `20` | ❌ |
Expand Down Expand Up @@ -186,31 +190,8 @@ History files are stored in the `history-gemini/` folder as JSON. After the migr

---

## 🛠️ Skills MCP Server

The repo includes a dedicated MCP (Model Context Protocol) server designed to give the AI agent autonomous access to a sandboxed environment. This allows the AI to run commands, edit code, and modify files—similar to how tools like OpenDevin or OpenClaw work.

**Features & Tools:**
- `execute_command`: Execute arbitrary shell commands in the container.
- `list_files`: List files and directories within a given path.
- `read_file`: Read the contents of a specific file.
- `write_file`: Write or overwrite the contents of a file.

**Running the Skills Server:**
To run the full stack with the Skills MCP Server enabled, use the dedicated compose file:

```bash
docker-compose -f docker-compose-skill.yml up
```

**Docker Environment:**
The Skills MCP Server runs in an Alpine Linux Docker container. This means the AI has access to a real shell and can use package managers like `apk` to install additional applications dynamically if it needs them to accomplish a task.
*(Note: Since it is a container, installed applications and environment changes are not persistent between restarts unless explicitly mounted).*

---

## ⚠️ Important Notes

> **Security Warning:** Please do not run this server on the public internet without additional authentication. It is intended as an internal helper tool. Public exposure could lead to excessive API usage and costs. Furthermore, running the **Skills MCP Server** gives the AI the ability to execute arbitrary shell commands inside its container. Do not expose this environment or grant it access to sensitive host directories.
> **Security Warning:** Please do not run this server on the public internet without additional authentication. It is intended as an internal helper tool. Public exposure could lead to excessive API usage and costs.

> **💡 Pro Tip:** When using the **Skills MCP Server**, you can drop text files explaining specific "skills" or commands into the RAG `bot-context/` folder. These files become part of the prompt, teaching the AI exactly how to use specific CLI tools or project structures!
> **💡 Pro Tip:** If you add a **Shell MCP server**, you can add "OpenClaw skills" into the RAG processing folder. These "skills" are text files that become part of the prompt, allowing the AI to execute shell-based function calls!
Empty file removed SKILL.md
Empty file.
3 changes: 1 addition & 2 deletions cmd/client-telegram/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os"
"os/signal"
"strings"
"syscall"
"sync"

"github.com/go-telegram/bot"
Expand Down Expand Up @@ -40,7 +39,7 @@ func main() {
}

l := New(aiSrv, usernameLimits)
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
defer cancel()

opts := []bot.Option{
Expand Down
Loading
Loading