Skip to content

tangredtea/abot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

abot - AI Agent Bot Framework

A flexible, production-ready AI agent framework with multiple deployment modes.

✨ Features

  • πŸ€– Multi-Agent Support - Run multiple specialized agents with independent configurations
  • πŸ”Œ Pluggable Architecture - Easy to extend with tools, channels, and providers
  • 🌐 Multiple Deployment Modes - CLI (REPL), API Server, or Web Console
  • πŸ”’ Enterprise Ready - Multi-tenant support, JWT auth, role-based access control
  • πŸ’¬ Real-time Communication - WebSocket streaming for smooth conversations
  • πŸ“¦ Easy to Deploy - Docker, Kubernetes, or standalone binary
  • πŸ› οΈ Rich Tool Ecosystem - Built-in tools for web search, file operations, and more
  • πŸ”„ Multiple LLM Providers - OpenAI, Anthropic, Azure OpenAI, and custom providers

πŸš€ Quick Start

Option 1: CLI Mode (Fastest)

Perfect for personal use and quick testing.

# Download binary
wget https://github.com/tangredtea/abot/releases/latest/download/abot-agent-linux-amd64.tar.gz
tar -xzf abot-agent-linux-amd64.tar.gz
sudo mv abot-agent /usr/local/bin/

# Create minimal config
cat > config.yaml <<EOF
providers:
  - api_key: sk-xxx
    model: gpt-4o-mini
EOF

# Run
abot-agent -config config.yaml

# Start chatting
You: Hello
Bot: Hello! How can I help you today?

Option 2: Web Console (Full Features)

Best for teams and production use.

# 1. Start web server (port 3000)
./abot-web -config config.yaml

# 2. Or use Docker Compose
docker compose up -d

# 3. Open browser
open http://localhost:3000

Option 3: API Server (For Integration)

Ideal for embedding in your applications.

# Using Docker
docker run -d \
  --name abot-server \
  -p 8080:8080 \
  -e OPENAI_API_KEY=sk-xxx \
  -e MYSQL_DSN="user:pass@tcp(mysql:3306)/abot" \
  abot/server:latest

# Test API
curl http://localhost:8080/api/v1/agents

πŸ“¦ Installation

Binary Installation

macOS:

# Build from source
git clone https://github.com/tangredtea/abot.git
cd abot && make all

Linux:

# Download from releases
wget https://github.com/tangredtea/abot/releases/latest/download/abot-agent-linux-amd64.tar.gz
tar -xzf abot-agent-linux-amd64.tar.gz
sudo mv abot-agent /usr/local/bin/

Docker Images

docker pull abot/agent:latest
docker pull abot/server:latest
docker pull abot/web:latest

Build from Source

git clone https://github.com/tangredtea/abot.git
cd abot
make all

# Binaries will be in ./bin/
./bin/abot-agent -config config.yaml

πŸ—οΈ Architecture

abot uses a multi-binary architecture for clear separation of concerns:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ abot-agent  β”‚  β”‚ abot-server  β”‚  β”‚  abot-web   β”‚
β”‚   (CLI)     β”‚  β”‚    (API)     β”‚  β”‚ (Web UI)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                β”‚                  β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚  pkg/bootstrap β”‚  ← Shared dependency construction
                β”‚  pkg/agent     β”‚  ← Core agent engine
                β”‚  pkg/providers β”‚  ← LLM provider abstraction
                β”‚  pkg/storage   β”‚  ← Pluggable storage backends
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Three Independent Binaries:

  • abot-agent: CLI REPL for personal use (no database required)
  • abot-server: HTTP API server for integration (requires MySQL)
  • abot-web: Web console with UI (requires MySQL)

Shared Core:

  • pkg/bootstrap: Zero-duplication dependency construction
  • pkg/agent: Core agent engine with tool execution
  • pkg/providers: Multi-provider LLM abstraction
  • pkg/storage: Pluggable storage (MySQL, JSONL, in-memory)

πŸ“– Documentation

🎯 Use Cases

Personal Assistant (CLI)

abot-agent -config config.yaml

You: Summarize this article: https://example.com/article
Bot: [AI provides summary]

You: Search for "Go best practices"
Bot: [AI searches and summarizes results]

Team Collaboration (Web)

  • Multiple users with role-based access
  • Shared agents across teams
  • Conversation history and search
  • Real-time WebSocket streaming
  • Multi-tenant isolation

API Integration (Server)

  • Embed AI capabilities in your app
  • Custom frontend with your branding
  • Webhook support for events
  • Multi-tenant API with JWT auth

πŸ”§ Configuration

Minimal Config (CLI Mode)

# config.agent.yaml
providers:
  - api_key: sk-xxx
    model: gpt-4o-mini

Full Config (Web Mode)

# config.web.yaml
app_name: abot
mysql_dsn: "user:pass@tcp(localhost:3306)/abot?charset=utf8mb4&parseTime=True"

providers:
  - api_key: sk-xxx
    model: gpt-4o-mini
    prompt_caching: true

agents:
  - id: assistant
    name: "AI Assistant"
    model: gpt-4o-mini
    system_prompt: "You are a helpful assistant."

console:
  addr: ":3000"
  jwt_secret: "your-secret-key"
  static_dir: "web/out"
  allowed_origins:
    - "http://localhost:3000"

See example configs for more options.

πŸ› οΈ Development

Backend Development

go mod download
make all                    # abot-agent, abot-server, abot-web
go test ./...
make test-coverage          # optional HTML coverage
make lint                   # requires golangci-lint
docker compose -f docker-compose.dev.yml up   # optional full stack
air                         # hot reload (.air.toml)

Cross-compile: GOOS=linux GOARCH=amd64 make all. Docker images: make docker-build (Dockerfiles under cmd/*/Dockerfile).

Frontend Development

cd web

# Install dependencies
npm install

# Development mode
npm run dev

# Build for production
npm run build

Project Structure

abot/
β”œβ”€β”€ cmd/
β”‚   β”œβ”€β”€ abot-agent/      # CLI binary
β”‚   β”œβ”€β”€ abot-server/     # API server binary
β”‚   └── abot-web/        # Web console binary
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ bootstrap/       # Shared dependency construction
β”‚   β”œβ”€β”€ agent/           # Core agent engine
β”‚   β”œβ”€β”€ api/             # HTTP API handlers
β”‚   β”œβ”€β”€ storage/         # Storage layer (MySQL, JSONL)
β”‚   β”œβ”€β”€ channels/        # Channel adapters (Telegram, Discord, etc.)
β”‚   β”œβ”€β”€ providers/       # LLM provider implementations
β”‚   β”œβ”€β”€ tools/           # Built-in tools
β”‚   └── types/           # Shared types
β”œβ”€β”€ web/                 # Next.js frontend
└── docs/                # Documentation

🚒 Deployment

Docker Compose (Recommended)

# Download docker-compose.yml
curl -O https://raw.githubusercontent.com/tangredtea/abot/main/docker-compose.yml

# Configure .env
cat > .env <<EOF
OPENAI_API_KEY=sk-xxx
JWT_SECRET=$(openssl rand -hex 32)
MYSQL_ROOT_PASSWORD=secure-password
EOF

# Start
docker-compose up -d

# Check logs
docker-compose logs -f abot-web

Kubernetes

This repository does not ship a Helm chart. Deploy with your own manifests (Deployment + Service + Ingress), MySQL, and secrets; see docs/DEPLOYMENT.md for constraints.

Systemd Service

# Install binary
sudo mv abot-web /usr/local/bin/

# Create service
sudo cat > /etc/systemd/system/abot-web.service <<EOF
[Unit]
Description=abot Web Console
After=network.target mysql.service

[Service]
Type=simple
User=abot
ExecStart=/usr/local/bin/abot-web -config /etc/abot/config.yaml
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF

# Start service
sudo systemctl enable abot-web
sudo systemctl start abot-web

See Deployment Guide for detailed instructions.

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Contributions are welcome via pull request; align with existing code style and add tests where practical.

πŸ“„ License

MIT License - see LICENSE for details.

πŸ™ Acknowledgments

πŸ“ž Support

πŸ—ΊοΈ Roadmap

  • GraphQL API support
  • Plugin marketplace
  • Voice input/output
  • Mobile apps (iOS/Android)
  • Distributed tracing (OpenTelemetry)
  • Metrics export (Prometheus)
  • Redis caching layer
  • Message queue integration (RabbitMQ)

Made with ❀️ by the abot team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages