feat: add more

This commit is contained in:
Sun-ZhenXing
2025-10-06 21:48:39 +08:00
parent f330e00fa0
commit 3c609b5989
120 changed files with 7698 additions and 59 deletions

20
src/bytebot/.env.example Normal file
View File

@@ -0,0 +1,20 @@
# Bytebot version
BYTEBOT_VERSION="edge"
# PostgreSQL version
POSTGRES_VERSION="17-alpine"
# Database configuration
POSTGRES_USER="bytebot"
POSTGRES_PASSWORD="bytebotpass"
POSTGRES_DB="bytebot"
# AI API Keys (at least one required)
ANTHROPIC_API_KEY=""
OPENAI_API_KEY=""
GEMINI_API_KEY=""
# Port overrides
BYTEBOT_DESKTOP_PORT_OVERRIDE=9990
BYTEBOT_AGENT_PORT_OVERRIDE=9991
BYTEBOT_UI_PORT_OVERRIDE=9992

78
src/bytebot/README.md Normal file
View File

@@ -0,0 +1,78 @@
# Bytebot
[English](./README.md) | [中文](./README.zh.md)
This service deploys Bytebot, an open-source AI desktop agent that automates computer tasks.
## Services
- `bytebot-desktop`: Containerized Linux desktop environment
- `bytebot-agent`: AI agent for task processing
- `bytebot-ui`: Web interface for task management
- `bytebot-db`: PostgreSQL database
## Environment Variables
| Variable Name | Description | Default Value |
| ----------------------------- | ------------------------------ | ------------- |
| BYTEBOT_VERSION | Bytebot image version | `edge` |
| POSTGRES_VERSION | PostgreSQL version | `17-alpine` |
| POSTGRES_USER | PostgreSQL username | `bytebot` |
| POSTGRES_PASSWORD | PostgreSQL password | `bytebotpass` |
| POSTGRES_DB | PostgreSQL database name | `bytebot` |
| ANTHROPIC_API_KEY | Anthropic API key (for Claude) | `""` |
| OPENAI_API_KEY | OpenAI API key (for GPT) | `""` |
| GEMINI_API_KEY | Google Gemini API key | `""` |
| BYTEBOT_DESKTOP_PORT_OVERRIDE | Desktop port override | `9990` |
| BYTEBOT_AGENT_PORT_OVERRIDE | Agent port override | `9991` |
| BYTEBOT_UI_PORT_OVERRIDE | UI port override | `9992` |
At least one AI API key is required.
## Volumes
- `bytebot_db_data`: PostgreSQL data
## Usage
### Start Bytebot
```bash
docker compose up -d
```
### Access
- Web UI: <http://localhost:9992>
- Agent API: <http://localhost:9991>
- Desktop VNC: <http://localhost:9990/vnc>
### Create Tasks
1. Open <http://localhost:9992>
2. Create a new task with natural language description
3. Watch the agent work in the desktop environment
## Features
- Natural language task automation
- Visual desktop environment with VNC
- Supports multiple AI models (Claude, GPT, Gemini)
- Web-based task management interface
## Notes
- Requires at least one AI API key to function
- Desktop environment uses shared memory (2GB)
- First startup may take a few minutes
- Suitable for development and testing
## Security
- Change default database password in production
- Keep AI API keys secure
- Consider using environment files instead of command-line arguments
## License
Bytebot is licensed under Apache License 2.0. See [Bytebot GitHub](https://github.com/bytebot-ai/bytebot) for more information.

View File

@@ -0,0 +1,104 @@
x-default: &default
restart: unless-stopped
volumes:
- &localtime /etc/localtime:/etc/localtime:ro
- &timezone /etc/timezone:/etc/timezone:ro
logging:
driver: json-file
options:
max-size: 100m
services:
bytebot-desktop:
<<: *default
image: ghcr.io/bytebot-ai/bytebot-desktop:${BYTEBOT_VERSION:-edge}
container_name: bytebot-desktop
ports:
- "${BYTEBOT_DESKTOP_PORT_OVERRIDE:-9990}:9990"
volumes:
- *localtime
- *timezone
shm_size: 2gb
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '1.0'
memory: 2G
bytebot-agent:
<<: *default
image: ghcr.io/bytebot-ai/bytebot-agent:${BYTEBOT_VERSION:-edge}
container_name: bytebot-agent
depends_on:
- bytebot-desktop
- bytebot-db
ports:
- "${BYTEBOT_AGENT_PORT_OVERRIDE:-9991}:9991"
environment:
- BYTEBOTD_URL=http://bytebot-desktop:9990
- DATABASE_URL=postgresql://${POSTGRES_USER:-bytebot}:${POSTGRES_PASSWORD:-bytebotpass}@bytebot-db:5432/${POSTGRES_DB:-bytebot}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
volumes:
- *localtime
- *timezone
deploy:
resources:
limits:
cpus: '1.0'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
bytebot-ui:
<<: *default
image: ghcr.io/bytebot-ai/bytebot-ui:${BYTEBOT_VERSION:-edge}
container_name: bytebot-ui
depends_on:
- bytebot-agent
ports:
- "${BYTEBOT_UI_PORT_OVERRIDE:-9992}:9992"
environment:
- BYTEBOT_AGENT_BASE_URL=http://localhost:9991
- BYTEBOT_DESKTOP_VNC_URL=http://localhost:9990/websockify
volumes:
- *localtime
- *timezone
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
bytebot-db:
<<: *default
image: postgres:${POSTGRES_VERSION:-17-alpine}
container_name: bytebot-db
environment:
- POSTGRES_USER=${POSTGRES_USER:-bytebot}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-bytebotpass}
- POSTGRES_DB=${POSTGRES_DB:-bytebot}
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- *localtime
- *timezone
- bytebot_db_data:/var/lib/postgresql/data
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
volumes:
bytebot_db_data: