Automate Your Workspace with BIgent
A minimal, Telegram-first AI coding agent built on top of the Pi coding agent SDK. Query your local codebases and execute tasks securely, from any device.
Powerful Features. Zero Bloat.
Telegram First
Setup a custom Telegram Bot via BotFather, configure your allowance list, and securely request your coding agent to inspect files, write tests, or execute terminal commands from your phone.
Pi SDK Power
BIgent functions as a robust CLI wrapper for Pi. By keeping Pi as a clean external dependency, updating the core coding agent is as simple as running a single command.
Custom Web & Isolated Tools
Equipped with specialized helper tools, including DuckDuckGo search integration (`web_search`), lightweight HTML content fetcher (`http_fetch`), and local time checkers, plus a custom `subagent` tool for running focused one-shot tasks.
How It Works
Get Running in Seconds
Run the official installer to clone the repository, install dependencies, compile the TypeScript source code, and create a system symlink inside ~/.local/bin.
curl -fsSL https://behzat.org/install-bigent.sh | sh
Interactive Installer Prompts:
The installer script prompts you for settings, including your Telegram bot token, allowed user IDs, working and state directories, and Pi provider API keys, and writes them directly to ~/.config/bigent/bigent.env.
Alternatively, if you prefer installing and building manually from source:
# Clone and compile manually
git clone https://github.com/behzatindustries/bigent.git
cd bigent
npm install --ignore-scripts
npm run build
npm link
Command Line Interface
Once linked or installed, the bigent terminal command is available globally. Execute ad-hoc queries, launch daemon services, or trigger self-correcting agent loops.
# Ask a quick question about local files
bigent ask "inspect this repo and summarize the package"
# Run a bounded self-correcting agentic loop (defaults to 30 turns max)
bigent loop "inspect this repo, propose the next missing safety fix, and apply it"
# Web search via command line
bigent search "latest Pi coding agent"
# Manage background Telegram listener service daemon
bigent service status
bigent service restart
# Update BIgent code and pull latest SDK dependencies
bigent update
bigent update-pi
bigent update-pi --commit
# Uninstall the agent (use --purge to clean configuration files)
bigent uninstall
bigent uninstall --purge
Telegram-First Coding Companion
Integrate a private bot directly inside Telegram for coding suggestions and remote shell command execution. You can also daemonize it using user systemd services.
# Run Telegram mode manually (loads ~/.config/bigent/bigent.env if exists)
bigent telegram
# Or manage the daemonized service installed by the script
systemctl --user status bigent-telegram.service
systemctl --user restart bigent-telegram.service
journalctl --user -u bigent-telegram.service -f
Telegram Commands & Slash Actions:
Use the following commands inside your private bot chat:
- /helpShow available bot commands.
- /new [name]Start a fresh conversation session.
- /sessionsList all conversation history sessions.
- /session use <id>Switch to a specific session.
- /session delete <id>Remove a session history.
- /statusShow active environment variables and service configurations.
- /loop <prompt>Run a bounded self-correcting agent loop directly from Telegram.
- /models [provider]List known available models for the selected provider.
- /thinking [level|clear]Manage thinking level configurations (e.g. minimal, medium, high).
- /apikey status|set|provider|clearManage API key override configs.
- /service start|stop|status|logs...Manage the systemd user service via chat.
- /stopStop the active Telegram service session.
Environment Configuration
Configure directory paths, thinking levels, turn bounds, and API keys via variables stored in ~/.config/bigent/bigent.env.
- BIGENT_CWD Working directory where the AI agent operates. Defaults to the current folder.
-
BIGENT_HOME
Directory storing authorization logs, cached sessions, and models. Defaults to
~/.bigent. -
BIGENT_PI_API_PROVIDER
Provider ID for the Pi API Key (e.g.
xiaomi-token-plan-sgp). - BIGENT_PI_API_KEY Runtime API Key used to communicate with the designated provider.
-
BIGENT_PI_THINKING
Pi model thinking level (options:
off,minimal,low,medium,high,xhigh). -
BIGENT_LOOP_MAX_TURNS
Upper bound of execution turns for loops. Defaults to
30. - TELEGRAM_BOT_TOKEN The unique API key issued by BotFather when creating your agent bot.
- BIGENT_TELEGRAM_ALLOWLIST A comma-separated string containing numerical Telegram IDs authorized to communicate with the bot.