refactor: reorganize into monorepo with separate subprojects
Build and Push API / release (push) Successful in 3s
Build and Push API / build (push) Successful in 2m27s

Structure webber into three independent subprojects:
- webber-api/: FastAPI backend server with all agent code
- webber-cli/: Standalone CLI client (renamed from cli/ to webber_cli/)
- webber-sandbox/: Test project for functional testing

Key changes:
- Each subproject has its own .venv (Python 3.12+)
- Added sandbox.sh for managing test project templates
- Created sandbox-templates/ with calculator-cli and empty starter
- Updated CI/CD for prefixed tags (api/v*, cli/v*)
- Added comprehensive AGENTS.md with operational instructions
- Added gitignore filtering to glob and grep tools
- Created pyproject.toml for each subproject

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-10 10:37:47 +01:00
co-authored by Claude Opus 4.5
parent f4e8552298
commit 3b58fa4f8b
121 changed files with 2034 additions and 284 deletions
+72 -156
View File
@@ -1,171 +1,87 @@
# Webber
# Webber - Multi-Agent AI Development System
Multi-Agent AI Development System - a FastAPI-based service that orchestrates local LLM agents for code exploration, planning, and task execution.
A Claude Code-inspired development assistant powered by local LLMs via Ollama.
## Overview
## Structure
Webber provides autonomous AI agents similar to Claude Code but running locally with configurable models via Ollama. It's designed for:
This is a monorepo containing three subprojects:
- **Explore Agent** - Fast codebase navigation and code search
- **Plan Agent** - Implementation design and step-by-step planning
- **Task Agent** - Autonomous multi-step code generation and modification
| Directory | Description |
|-----------|-------------|
| `webber-api/` | FastAPI backend server with agent orchestration |
| `webber-cli/` | Command-line client for interacting with the API |
| `webber-sandbox/` | Test project for functional testing |
Built on [PydanticAI](https://ai.pydantic.dev/) for structured LLM interactions.
### Additional Directories
| Directory | Description |
|-----------|-------------|
| `sandbox-templates/` | Reusable project templates for the sandbox |
| `.gitea/workflows/` | CI/CD workflows for releases |
## Quick Start
### Prerequisites
### 1. Start the API Server
```bash
cd webber-api
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
./wakeup.sh
```
### 2. Set Up the CLI
```bash
cd webber-cli
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
# Test connection
webber-cli status
```
### 3. Load a Sandbox Project
```bash
# From repo root
./sandbox.sh list
./sandbox.sh load calculator-cli
cd webber-sandbox
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
### 4. Explore with Webber
```bash
cd webber-cli
webber-cli explore "find all bugs in the code" -d ../webber-sandbox
```
## Versioning
This project uses prefixed tags for independent release cycles:
- `api/v0.3.0` - Triggers API Docker build and deployment
- `cli/v0.1.0` - Triggers CLI installer build (future)
## Requirements
- Python 3.12+
- [Ollama](https://ollama.ai/) with models installed
- (Optional) Tatlock for multi-tenant authentication
- Ollama running with `mistral-nemo:latest` model
- Docker (for production deployment)
### Installation
## Documentation
```bash
# Clone the repository
git clone https://git.schweitz.internal/jpmschweitzer/webber.git
cd webber
# Create virtual environment
python -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# For development (includes testing and linting tools)
pip install -r requirements-dev.txt
```
### Configuration
```bash
# Copy example config
cp .env.example .env
# Edit .env with your settings
# At minimum, configure OLLAMA_URL to point to your Ollama instance
```
### Running
```bash
# Development (with auto-reload)
./wakeup.sh
# Or manually
uvicorn src.main:app --host 0.0.0.0 --port 8086 --reload
```
The service will be available at `http://localhost:8086`. API docs at `/docs`.
## Configuration
All settings via environment variables or `.env` file:
| Variable | Default | Description |
|----------|---------|-------------|
| `DEBUG` | `false` | Enable debug mode |
| `LOG_LEVEL` | `INFO` | Logging level |
| `PORT` | `8086` | Server port |
| `OLLAMA_URL` | `http://192.168.86.149:11434` | Ollama API URL |
| `OLLAMA_AGENT_MODEL` | `mistral-nemo-large:latest` | Model for agent reasoning |
| `OLLAMA_EMBED_MODEL` | `nomic-embed-text:latest` | Model for embeddings |
| `TOOL_TIMEOUT_SECONDS` | `120` | Tool execution timeout |
| `SANDBOX_ENABLED` | `true` | Sandbox tool execution |
| `ALLOWED_PATHS` | `[]` | Paths accessible to tools |
See [.env.example](.env.example) for full configuration options.
## Development
### Code Quality
```bash
# Type checking
mypy src/
# Linting
ruff check src/ tests/
# Auto-fix lint issues
ruff check src/ tests/ --fix
# Format code
ruff format src/ tests/
```
### Testing
```bash
# Run all tests
pytest tests/ -v
# With coverage
pytest tests/ --cov=src --cov-report=html
```
### Security Audit
```bash
# Check dependencies for CVEs
pip-audit
```
## Architecture
Webber uses a domain-based architecture with clean separation of concerns:
```
src/
├── main.py # FastAPI app entry point
├── shared/ # Cross-cutting infrastructure
│ ├── base.py # BaseController, BaseSchema
│ ├── config.py # Settings from pyproject.toml + env
│ ├── logging.py # @logged decorator with timing
│ └── exceptions.py # Exception hierarchy
└── domains/ # Feature domains
├── health/ # Health check endpoints
├── agents/ # Agent orchestration
└── tools/ # Tool execution (file, shell, search)
```
See [docs/architecture.md](docs/architecture.md) for detailed patterns and conventions.
## API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/` | GET | Service information |
| `/health` | GET | Health check for monitoring |
| `/docs` | GET | Interactive API documentation |
## Docker
```bash
# Build
docker build -t webber .
# Run
docker run -p 8086:8086 --env-file .env webber
```
The container includes a healthcheck that pings `/health` every 30 seconds.
## Deployment
Deployed via Gitea Actions CI/CD:
1. Tag a release (`git tag v0.x.x && git push --tags`)
2. Workflow builds and pushes Docker image
3. Watchtower auto-deploys to production
Production runs in Portainer `agents` stack on the `docker-dataplane` network.
## Status
**Alpha** - Core infrastructure is complete. Agent and tool implementations are in progress.
- `webber-api/AGENTS.md` - API development guidelines
- `webber-api/docs/` - Architecture and coverage docs
- `webber-cli/README.md` - CLI usage guide
## License