Skip to main content

Viben

Viben is an Agent Swarm and Code Evolution platform that automatically improves code quality through multi-objective constrained iterative optimization.

Core Features

FeatureDescription
🧬 FileEvoCode iterative optimization: multi-candidate sampling + quality evaluation, automatically selects optimal solution to merge
🤖 Multi-AgentAgent swarm orchestration: parallel Worktree isolation, automated task distribution and monitoring
🔌 MCP ProtocolModel Context Protocol: tool registration and invocation, extends Agent capability boundaries
📋 Task SystemXState state machine driven: Kanban + Queue + Auto-execution, complete task lifecycle management
💡 Idea GenerationAI-driven code analysis: automatically discovers improvement points, one-click conversion to executable tasks
🖥️ Cross-PlatformCLI / Desktop / Web: Tauri 2 desktop app, unified experience across all three

Product Architecture

┌─────────────────────────────────────────────────────────────────┐
│ Viben Architecture Overview │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Web │ │ Desktop │ │ CLI │ │ Docs │ │
│ │ (Next) │ │ (Tauri) │ │ (Node) │ │(Docusr) │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └─────────┘ │
│ │ │ │ │
│ └───────────────┼───────────────┘ │
│ │ │
│ ┌─────────┴─────────┐ │
│ │ @viben/core │ │
│ │ (Gateway API) │ │
│ └───────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

FileEvo: Code Iterative Optimization

Multi-objective constrained candidate selection algorithm, iteratively improving code quality through sampling-evaluation-selection cycles

FileEvo is a heuristic iterative optimization method, with the core idea of "generate multiple candidate solutions → multi-dimensional evaluation → select optimal to merge".

System Components

ComponentDescription
Candidate GeneratorAgent generates PRs in Worktree isolated environments
Reference BaselineMain Branch original codebase, used to calculate change volume
Quality EvaluatorCI + Agent multi-dimensional scoring

Iterative Optimization Loop

  1. Sampling - Batch generate B ideas, each expanded N times in parallel, total B×N candidates
  2. Evaluation - Multi-objective scoring + change volume calculation + adjusted score
  3. Selection - Two-phase filtering: select best PR per idea, select best PR globally
  4. Update - Merge best PR, update codebase, check stop conditions

CLI Commands

# Lifecycle
viben evo create <name> # Create optimization target
viben evo start <target.md> # Start optimization loop
viben evo status <name> # View status

# Idea → Task
viben idea generate --types <t> # Generate ideas
viben idea promote <id> --start # Convert to task

# Monitoring
viben swarm status --watch # Real-time monitoring

Task System

Task lifecycle management based on XState state machine, supporting Kanban, queue, and automated execution.

Task State Transitions

backlog → queue → in_progress → review → completed

plan → implement → check → fix (loop)
StateDescriptionTrigger Command
backlogPending, waiting to be queuedtask create
queueQueued, waiting for executiontask enqueue
in_progressIn progresstask start
reviewAwaiting human reviewAuto (QA passed)
completedCompletedtask approve

CLI Commands

viben task create "<title>" --slug <name> # Create task
viben task enqueue <task> # backlog → queue
viben task start <task> # queue → in_progress
viben task approve <task> # review → completed
viben task list # List all tasks

💡 Idea Generation

AI-driven codebase analysis, automatically generating improvement suggestions and converting to tasks.

Built-in TypeDescription
code_improvementsCode improvements based on existing patterns
security_hardeningSecurity vulnerabilities and hardening measures
performance_optimizationsPerformance bottlenecks and optimizations
documentation_gapsMissing documentation
ui_ux_improvementsUI/UX enhancements
code_qualityCode quality and refactoring
# Generate code improvement suggestions
viben idea generate --types code_improvements security_hardening

# Convert idea to task and start immediately
viben idea promote ci-001 --start --worktree

Configuration

~/.viben/
├── providers.yaml # API Keys, Endpoints
├── models.yaml # Model parameters
├── agents/ # Agent definitions
│ └── <name>/
│ └── AGENTS.md
├── cron.yaml # Scheduled tasks
├── channels.yaml # Notification channels
└── workspaces.yaml # Workspaces

Quick Start

Latest Version

PlatformDownload Format
macOS.dmg (Universal)
Windows.msi or .exe
Linux.AppImage or .deb

CLI Tool

# npm
npm install -g viben

# Or run directly
npx viben

Gateway API

Viben Gateway is the core backend service, running on port 18790.

EndpointFunction
/healthHealth check
/api/agentAgent management
/api/sessionsSession management
/api/providersProvider management
/api/modelsModel management

:::info API Documentation For complete Gateway API documentation, see API Reference. :::

Next Steps