CLI + Daemon + Telegram
Interactive REPL for local use. Headless daemon with Telegram bot and TCP admin interface. Three run modes, one codebase.
Multi-gateway, SQLite-backed, tool-augmented chat with any OpenAI-compatible API — built in Gleam on Erlang/OTP.
Agent is designed for autonomous operation — it can run as an interactive CLI, a Telegram bot, or a headless daemon processing scheduled tasks.
# Set up
git clone https://github.com/p424p424/agent.git && cd agent
echo 'DEEPSEEK_API_KEY=sk-...' > .env
# Interactive chat
$ gleam run
You: What's in this directory?
agent: [runs ls] Here's what I found:
src/ test/ agent.toml gleam.toml README.md
You: Search for the latest Gleam release notes and summarize them
agent: [fetches web page, analyzes content]
Gleam 1.16 brings improved LSP support, faster compilation, and...
# Daemon mode (Telegram bot + admin TCP)
$ gleam run -m agent_app
# Bot is now live on Telegram
# Admin CLI
$ gleam run -m agent_admin sessions list
$ gleam run -m agent_admin db stats| Area | Status |
|---|---|
| CLI REPL + Daemon + Telegram | Production-ready |
| Tool system (bash, web, browser, memory, code, cron, session search) | Complete |
| SQLite persistence (WAL, FTS5, sessions, memories) | Complete |
| Guardrails (circuit breaker, SSRF, safety scanning) | Complete |
| Context compression + tool loop detection | Complete |
| OTP supervision tree | Complete |
| Structured autonomy (Pulse, Reflection, Cron, Harness) | Complete |
| Notifications + DND coordination | Complete |
| Parallel tool execution | Complete |
| Multi-provider routing | Deferred |
| Streaming responses | Deferred |
| Sub-agent delegation | Deferred |
Ready to try?
Jump to the Getting Started guide to install and run agent in under 2 minutes.