LlamaBot is a production-ready AI coding agent framework that generates working prototypes, embeds AI directly into the app, and runs real workflows β letting you move from idea to production in record time.
It works across the full spectrum of users:
- Non-technical founders who want to build without code.
- Product teams who need to spin up prototypes fast.
- Engineers who want an AI teammate to automate workflows inside production apps.
Unlike typical codegen tools, LlamaBot doesn't just write snippets β it can embed directly in your app and run real workflows. This makes it ideal for collaborative software building: founders guide the vision, engineers stay in control, and AI fills the gap.
LlamaBot is built for moving ideas fast:
- π Prototype an AI MVP in a weekend β landing pages, user flows, backend logic, all scaffolded by AI.
- π§ͺ Experiment with workflows β test reporting, notifications, automations directly inside your app.
- π₯ Collaborate with teammates β Bridge the gap between non-technical founders and engineering teams.
- π§ Production automation β Trigger Sidekiq jobs, query databases, send emails/SMS, all from natural language.
LlamaBot includes 6 specialized agents for different tasks:
rails_agent- Full-featured Rails development with 20+ toolsllamapress- HTML/webpage editing and website cloningrails_testing_agent- Automated test generation and executionrails_ai_builder_agent- Build custom LangGraph agentsrails_frontend_starter_agent- Rapid frontend scaffoldingllamabot- General-purpose helpful assistant
- π File Operations: Read, write, edit with smart whitespace normalization
- πΏ Git Integration: Status, commit, push, full command execution
- π» Bash Execution: Run shell commands directly
- π Internet Search: Tavily-powered web search
- π Web Scraping: Playwright + BeautifulSoup for browser automation
- π GitHub CLI: Issue management, PR creation, workflow automation
- π Task Management: Built-in TODO tracking with status updates
Choose your preferred AI model:
- Claude (Anthropic) - Sonnet 4.5, Haiku 4.5 with prompt caching
- GPT (OpenAI) - GPT-5-Codex, GPT-4.1
- Gemini (Google) - Full Generative AI support
- WebSocket-based streaming shows AI thinking token-by-token
- Live code preview with iframe updates
- Message history with thread management
- Mobile-responsive interface
- PostgreSQL checkpoint-based conversation state
- Graceful fallback to in-memory storage
- Connection pooling and automatic reconnection
- Message history trimming (prevents unbounded growth)
- 12,753 lines of Python code across 71 source files
- 6 specialized agents for different workflows
- 20+ built-in tools covering file ops, git, web, and more
- 3 LLM providers (Claude, GPT, Gemini)
- 1,392 lines of comprehensive tests (unit + integration)
- Production-ready with PostgreSQL persistence, Nginx deployment, SSL/TLS
- Docker Compose
- OpenAI API Key
# Only requirement: docker compose + your OpenAI key
curl -fsSL "https://raw.githubusercontent.com/KodyKendall/LlamaBot/refs/heads/main/bin/install_llamabot_local.sh" -o install_llamabot_local.sh && bash install_llamabot_local.shOpen your browser:
http://localhost:8000/chat
git clone https://github.com/kodykendall/LlamaBot
cd LlamaBot
bash bin/install_llamabot_local.shToday, Rails is the primary supported framework. With the llama_bot_rails gem, you can use LlamaBot to:
- Call existing ActiveRecord models
- Trigger your real services, jobs, and routes
- Automate workflows with natural language
Example use cases:
- Refund a user and send SMS
- Generate a weekly revenue report
- Queue 100 Sidekiq jobs from chat
Future adapters: Django, Laravel, Node.js.
Not a developer but want to build something with LlamaBot? Join the Discord or reach out directly β weβd love to collaborate on real-world MVPs and prototypes.
Browser (Modular ES6 JavaScript)
β WebSocket (Real-time streaming)
FastAPI Backend (Python 3.11+)
ββ LangGraph Workflows (6 specialized agents)
ββ 20+ Tools (file, git, bash, web, GitHub)
ββ PostgreSQL Checkpointer (conversation state)
ββ Multiple LLM Providers (Claude, GPT, Gemini)
- Agent Framework: LangGraph 1.0.0 + LangChain
- Web Framework: FastAPI + Uvicorn (ASGI)
- Communication: WebSocket (starlette) with chunked streaming
- Database: PostgreSQL 16 (optional, falls back to in-memory)
- Frontend: Vanilla JavaScript with modular architecture
- Observability: LangSmith integration for tracing
- Singleton Workflow Compilation: Agents compiled once at startup, cached globally
- Checkpoint-Based State: All conversation history persisted to PostgreSQL
- Streaming Architecture: Real-time token-by-token message delivery
- Tool Node Pattern: LangGraph conditional edge routing
- Graceful Degradation: Falls back to MemorySaver if PostgreSQL unavailable
- Prompt Caching (Anthropic): Reduces costs by 90% for repeated calls
- Path Normalization: Automatically fixes common LLM path mistakes
- Whitespace Normalization: Flexible string matching for code edits
- Failed Tool Recovery: Switches to text-only after 3 failed tool calls
- Message History Trimming: Keeps last 30 messages + system messages
LlamaBot/
βββ app/
β βββ main.py # FastAPI app with WebSocket + API routes (480 LOC)
β βββ websocket/ # WebSocket layer
β β βββ web_socket_handler.py # Connection lifecycle management
β β βββ request_handler.py # Core streaming logic (357 LOC)
β β βββ web_socket_connection_manager.py
β βββ agents/ # LangGraph agent workflows
β β βββ llamabot/ # Basic assistant
β β βββ llamapress/ # HTML/webpage editor (supervisor pattern)
β β βββ leonardo/ # Full-featured agents
β β βββ rails_agent/ # Rails development (1,342 LOC tools!)
β β βββ rails_testing_agent/
β β βββ rails_ai_builder_agent/
β β βββ rails_frontend_starter_agent/
β βββ frontend/ # Modular JavaScript architecture
β β βββ index.html # Chat interface
β β βββ chat/ # ES6 modules
β β β βββ index.js # Main ChatApp class
β β β βββ websocket/ # WebSocket management
β β β βββ messages/ # Message rendering
β β β βββ ui/ # UI components
β β β βββ threads/ # Thread management
β β βββ styles/ # CSS
β βββ db/ # Database utilities
βββ bin/
β βββ install_llamabot_local.sh # Local dev install script
β βββ install_llamabot_prod.sh # Production deployment script
βββ tests/ # Comprehensive test suite (1,392 LOC)
β βββ test_app.py # FastAPI endpoint tests
β βββ test_websocket.py # WebSocket tests
β βββ test_agents.py # Agent workflow tests
β βββ test_integration.py # End-to-end tests
βββ docs/
β βββ DEPLOY.md # Production deployment guide
β βββ dev_logs/ # Version history
βββ langgraph.json # Agent configuration
βββ Dockerfile # Container definition
βββ docker-compose.yml # Local development setup
βββ requirements.txt # Python dependencies
βββ README.md
Run as an independent service with web UI:
docker-compose up
# Access at http://localhost:8000/chatIntegrate into existing Rails apps via the llama_bot_rails gem:
# Gemfile
gem 'llama_bot_rails'
# Can now:
# - Call ActiveRecord models
# - Trigger Sidekiq jobs
# - Send emails/SMS
# - Query databases
# - Automate workflows with natural languageFull deployment guide available in docs/DEPLOY.md:
- Ubuntu 20 LTS with systemd
- Nginx reverse proxy (HTTPS/WSS)
- PostgreSQL for persistence
- SSL/TLS via Certbot
- Multi-worker support (Uvicorn)
| Variable | Required | Default | Purpose |
|---|---|---|---|
OPENAI_API_KEY |
β Yes | - | OpenAI LLM access |
ANTHROPIC_API_KEY |
β No | - | Claude LLM access |
GOOGLE_API_KEY |
β No | - | Gemini LLM access |
DB_URI |
β No | "" | PostgreSQL connection (falls back to MemorySaver) |
TAVILY_API_KEY |
β No | - | Internet search capability |
LANGSMITH_API_KEY |
β No | - | LangSmith tracing/observability |
LANGSMITH_TRACING |
β No | false | Enable LangSmith |
Configure available agents in langgraph.json:
{
"graphs": {
"llamabot": "./agents/llamabot/nodes.py:build_workflow",
"rails_agent": "./agents/leonardo/rails_agent/nodes.py:build_workflow",
"llamapress": "./agents/llamapress/nodes.py:build_workflow"
}
}Choose your preferred model per conversation:
claude-4.5-sonnet(default for rails_agent)claude-4.5-haiku(faster, cheaper)gpt-5-codex(OpenAI)gpt-4.1(OpenAI)gemini-pro(Google)
Run the comprehensive test suite:
pytest # Run all tests
pytest -m unit # Only unit tests
pytest -m integration # Only integration tests
pytest --cov=app --cov-report=html # Coverage reportTest coverage includes:
- FastAPI endpoint testing
- WebSocket communication
- Agent workflow execution
- End-to-end integration tests
- Mock LLM and database interactions
We welcome PRs, issues, and ideas! Jump into Discord to collaborate.
LlamaBot is AGPLv3 open source. For commercial licensing, contact kody@llamapress.ai.