2026-03-13 14:01:11 +08:00
2026-03-13 12:33:54 +08:00
2026-03-13 13:41:03 +08:00
2026-03-13 14:01:11 +08:00
2026-03-13 13:41:03 +08:00
2026-03-13 12:33:54 +08:00
2026-03-13 13:41:03 +08:00
2026-03-13 14:01:11 +08:00
2026-03-13 13:41:03 +08:00
2026-03-13 14:01:11 +08:00

VoidBot

VoidBot is a minimal Python agent runtime designed around three ideas:

  • Borrow the lightweight execution loop and session persistence style from nanobot.
  • Borrow the provider compatibility and gateway/runtime separation from openclaw.
  • Keep the first version small: single session, direct CLI or standalone gateway, OpenAI-compatible model calls, tool loop.

Architecture

CLI Agent
  -> AgentRuntime
    -> ContextBuilder
    -> SessionStore
    -> ToolRegistry
    -> ProviderRegistry
      -> OpenAI Compatible Provider

Gateway Server
  -> GatewayApplication
    -> AgentRuntime

See docs/architecture.md for the layer breakdown and message flow.

Initial Capabilities

  • Build runtime context from workspace metadata, system prompt, tool list, and session history
  • Call an OpenAI-compatible chat completions endpoint
  • Execute tools and feed tool results back into the model loop
  • Run as a direct CLI agent or through a standalone gateway process
  • Support provider presets for:
    • openai_chatgpt
    • zhipu_coding_plan
    • custom_openai_compatible

Quick Start

  1. Create a config file:
{
  "provider": "zhipu_coding_plan",
  "api_key": "YOUR_API_KEY",
  "model": "glm-4.7",
  "workspace": ".",
  "max_iterations": 8
}

You can also start from config.example.json.

  1. Put your real config in config.json in the current directory.

  2. Start the CLI directly:

uv run voidbot
  1. Run one turn locally:
uv run voidbot --message "Summarize this repository"
  1. Start the standalone gateway:
uv run voidbot gateway
  1. Call the agent through the gateway:
uv run voidbot --via gateway --message "Summarize this repository"
  1. Run interactive mode with automatic fallback:
uv run voidbot --via auto

Config Fields

  • provider: provider preset name
  • api_key: provider API key
  • api_base: optional override for the provider base URL
  • model: optional override for the model ID
  • workspace: workspace path used by tools and context
  • session_file: optional JSONL transcript path
  • max_iterations: max tool-call rounds in one turn
  • history_limit: number of previous messages to include
  • system_prompt: optional custom system prompt
  • gateway_host: default gateway bind host
  • gateway_port: default gateway bind port
  • gateway_url: optional default gateway URL for CLI client mode
  • cli_via: default CLI behavior, one of local, gateway, or auto

Notes

  • The current runtime is single-session by design.
  • The model layer is deliberately OpenAI-compatible first, so adding more gateways later is straightforward.
  • The current built-in tools are list_dir, read_file, write_file, and run_command.
  • Every inbound request gets session_id, run_id, and message_id before entering the runtime.
  • voidbot agent --via auto tries the gateway first, then falls back to local execution.
  • voidbot without a subcommand starts the interactive CLI.
  • voidbot gateway starts the gateway listener.
S
Description
No description provided
Readme
223 KiB
Languages
Python 99.5%
Makefile 0.5%