跳到正文
GitHub·· 6 天前AI 评分60

Symbiote v5.2.0 发布:本地持久化 AI Agent 运行时

artifact-opensource/symbiote

AI 导读

artifact-opensource 发布 Symbiote v5.2.0,一个在本地持久进程中运行 LLM Agent 的运行时,基于 Node.js 20+ 与 TypeScript,采用 MIT 协议,无需 Docker、Redis 或外部向量数据库。

正文

Persistent AI agent runtime for your workspace.

v5.2.0 · Node.js 20+ · TypeScript · MIT

Quick start · Configuration · Memory · CLI


What It Is

Symbiote runs an LLM agent in a persistent local process. It connects configured providers and messaging channels to a tool-enabled agent loop, stores sessions on disk, and provides an embedded memory index.

The runtime does not require Docker, Redis, or an external vector database. Provider APIs and optional channel services require their own credentials and network access.

Quick Start

Requirements: Node.js 20 or newer.

git clone https://github.com/Artifact-Virtual/symbiote.git
cd symbiote
npm install
npm run build

Initialize configuration and start the interactive agent:

node dist/index.js init
node dist/index.js

To start the persistent gateway instead:

node dist/index.js start
node dist/index.js status

The setup flow creates symbiote.json (with a JSON Schema for editor support) and .env. Keep API keys and channel tokens in .env; config files reference them as ${VAR}. Upgrading from an older version? Run node dist/index.js upgrade.

Configuration

A minimal symbiote.json:

{
  "defaultProvider": "openrouter",
  "defaultModel": "openrouter/free",
  "workspace": ".",
  "providers": {
    "openrouter": {
      "apiKey": "${OPENROUTER_API_KEY}",
      "baseUrl": "https://openrouter.ai/api/v1"
    }
  },
  "maxTokens": 8192,
  "maxIterations": 50,
  "timeouts": {
    "llmRequestMs": 900000
  }
}

The default LLM request timeout is 15 minutes. timeouts.llmRequestMs and provider-specific timeoutMs values can override it. Provider retries preserve the configured timeout; authentication failures fail fast.

The CLI and gateway currently register OpenRouter, Anthropic, OpenAI, Groq, Gemini, NVIDIA, xAI, GitHub Copilot, Ollama, and Gladius. Qwen, AI Horde, FreeAI, and OmniRoute provider modules exist but are not selectable through the default registries. A routed provider is used only when it is registered and configured; otherwise Symbiote uses the configured default provider.

Memory

Embedded VDB

The native VDB is stored under <workspace>/.vdb. It persists JSONL documents and builds BM25 plus sparse TF-IDF indexes for hybrid lexical retrieval. Sessions are indexed incrementally; memory_recall, memory_ingest, and memory_stats are available in the gateway, CLI tool registry, and MCP server.

This implementation does not generate dense neural embeddings. Its similarity ranking is based on lexical BM25/TF-IDF signals, recency, and optional Memograph metadata.

Memograph

Memograph snapshots can be imported into the VDB from MEMOGRAPH_STORAGE_DIR. By default, Symbiote looks for a sibling memograph/.memograph_storage directory. Each shard is imported as its own document with graph, domain, scope, permission, version, content type, parent, and relation metadata preserved. LIVE, PROJECT, and ENTERPRISE memories use separate namespaces.

See Memograph Integration for storage discovery, permission filtering, diagnostics, and retrieval limits.

Context retrieval filters Memograph shards by the agent or wildcard permission, applies domain authority and scope affinity, and can expand a bounded number of related shards. Import errors identify the snapshot or shard and do not stop healthy records from loading. Symbiote reads Memograph snapshots; it does not require the Python package at runtime.

Use the VDB maintenance command to inspect or refresh memory:

node dist/cli/vdb-maintenance.js stats
node dist/cli/vdb-maintenance.js ingest
node dist/cli/vdb-maintenance.js stage "Remember this for the next session"

Channels And Tools

The gateway can connect configured Discord and WhatsApp adapters and expose an HTTP API. Channel access policies and owner IDs are configured in symbiote.json.

Built-in tools cover unrestricted file reading, writing, editing and filesystem management (fs), hardware inspection (hardware), shell and background process management, web fetching/browsing, native browser CUA (viewport screenshot, coordinate pointer, keyboard, and scroll), image analysis, messaging, sub-agents, speech, persistent memory, and session continuity. The agent runs with full admin access to the machine; set SYMBIOTE_SANDBOX=1 to restore per-session restrictions. On Windows, exec runs PowerShell and routes POSIX-style commands (ls -la, grep, &&) to Git Bash when it is installed; pass shell to force one. CUA controls the Playwright browser, not the host OS desktop. The CLI and gateway display the actual number of tools registered for that process; the set can differ when tools or channels are disabled.

Agent tool calls run with bounded concurrency. Long tasks can continue across iteration budgets, and completion is reviewed before the runner accepts a final answer. Discord input queued during an active turn is processed in order.

CLI

symbiote                    # interactive agent (REPL)
symbiote agent "Summarize"  # one-shot prompt
symbiote start | stop | restart | status | logs [-f]
symbiote init [--ui]        # guided setup (terminal or browser)
symbiote configure          # edit common settings
symbiote upgrade            # migrate symbiote.json to the current format
symbiote help

Output is quiet by default. Set SYMBIOTE_LOG=debug to show internal subsystem logs.

REPL commands include /help, /tools, /history, /model, /provider, /spawn, /status, /sessions, /clear, and /quit. During an active turn, plain text or /queue <text> queues the next message; /steer <text> cancels the current request and resumes with new guidance; /interrupt stops the turn and saves partial state. The prompt shows cumulative provider-reported token usage for the active session, not current context size.

Development

npm run build
node --test dist/test/*.test.js

The project includes focused tests for provider routing, continuation behavior, VDB-backed Memograph import, tool execution, and session memory. Provider and channel integrations should also be exercised with their configured test credentials before deployment.

Documentation

Additional guides live in docs/. Start with Quick Start, Configuration, and Built-in Tools.

License

MIT

来源:GitHub · github.com