SoulForge (Empryo) Documentation

repository·main·Indexed 21 days ago

https://github.com/proxysoul/soulforge

Graph-powered code intelligence and multi-agent coding AI. Formerly known as SoulForge and now Empryo, this tool performs symbol-level edits using AST manipulation and a live dependency graph (genome). It features a multi-agent system with specialized roles (seats) such as brain, spark, and ember, supporting 22 providers including Anthropic and Ollama.

Tokens
86.5K
Snippets
269
Records
454
Agent score
73%

What's inside SoulForge

  1. Common SoulForge Tasks and Recipes

    main

    SoulForge supports several advanced workflows and integrations:

    • Rename & refactor: Rename a symbol across every file with a single prompt.
    • Test, lint, commit: Run your existing toolchain through the agent.
    • Use multiple models: Configure a cheap model for search and a strong model for code generation.
    • Run from CI: Use headless mode for scripts and automated pipelines.
    • Hearth (Experimental): Access SoulForge via Telegram or Discord.
    • Connect MCP servers: Integrate with external tools like GitHub or Sentry using the Model Context Protocol (MCP).
  2. Understand SoulForge licensing terms

    main

    SoulForge is licensed under the Business Source License 1.1. This means usage is free for personal, internal, and educational purposes, but requires a commercial license for any form of commercial distribution or service offering.

    Free Usage

    You can use SoulForge for:

    • Personal projects
    • Internal use within your organization (including employees and contractors)
    • Education and research
    • Forking, modifying, and contributing back to the project
    • Building plugins, MCP servers, and integrations for non-commercial use

    Commercial License Requirements

    A commercial license is required if you are:

    • Offering SoulForge (or a modified version) to third parties as a paid product
    • Offering SoulForge as a hosted or managed service
    • Embedding SoulForge as a component in any product or service sold to third parties
    • Engaging in any commercial distribution (standalone, bundled, or wrapped)
    • Using SoulForge to build and sell a product that provides similar functionality, even if features are added or removed.
  3. Understand MCP tool namespacing

    main

    To prevent collisions with SoulForge's built-in tools, all tools provided by an MCP server are prefixed with the server's name. The format is mcp__<server_name>__<tool_name>.

    For example, if you have a server named github that provides a tool called create_issue, the tool will be invoked as mcp__github__create_issue.

  4. Configure Memory Scopes

    main

    SoulForge uses two distinct databases to separate project-specific knowledge from personal preferences:

    ScopeLocationUse for
    Project.soulforge/memory.dbCode-specific decisions, file-scoped gotchas
    Global~/.soulforge/memory.dbCross-project preferences, your personal style

    Read Scope Settings

    You can control which databases the agent has access to by setting the read scope:

    • all: Accesses both project and global (default).
    • project: Accesses only the current repository.
    • global: Accesses only your global preferences.
    • none: Disables memory recall entirely.
  5. Core SoulForge Capabilities

    main

    SoulForge provides several advanced features for AI-driven development:

    • Live Soul Map: A SQLite-based graph of every file, symbol, and import, updated as you work. It uses PageRank and git co-change to rank importance and provides 'blast-radius' tags to show the impact of edits.
    • Full LSP Support: Access definitions, references, diagnostics, and code actions. You can install language servers directly from the TUI using /lsp install via the Mason registry.
    • V2 Compaction: Automatically extracts structured state (files touched, decisions, tool results) during a session. When context limits are reached, it serializes this state to keep the conversation efficient, often without requiring an LLM pass.
    • Parallel Agents: Dispatches specialized agents (explore, code, web-search) in parallel. Agents share a cache, so one agent's file reads are available to others.
    • Task Router: Allows using different models for different roles (e.g., 'spark' for exploration, 'ember' for code, 'verify' for review) to optimize cost and speed.
    • Sessions and Checkpoints: Every turn is a checkpoint. You can use git tags for file rollback and resume sessions using a short-id prefix.
  6. Configure MCP server transport types

    main

    SoulForge supports three transport types for MCP servers:

    • stdio: Spawns a local subprocess communicating via JSON-RPC over stdin/stdout. Best for local tools and development.
    • http: Streamable HTTP. Recommended for remote servers; provides efficient streaming.
    • sse: Server-Sent Events. A legacy remote transport; use http for new servers.

    Each server configuration can specify its transport, connection details (like command or url), and authentication (via env or headers).

  7. Understand the telemetry privacy and security posture

    main

    The telemetry system is designed to be private and resilient against data exfiltration and noise:

    • Anonymity: No prompts, paths, keys, IPs, or PII are recorded. Model strings are collapsed to other if they do not match known public-model patterns to prevent leaking secrets or project names.
    • Strict Validation: The worker uses an allow-list for fields like os, arch, surface, event, install, and family. It also validates version (semver) and id (UUIDv4). Invalid pings are silently dropped (returning 204) without error messages to prevent leaking validation logic.
    • Rate Limiting: A per-IP rate limit is enforced (60 requests per 60 seconds) using Cloudflare's native rate-limiting binding. The IP is used only as a limiter key and is never stored.
    • User-Agent Filtering: Requests lacking the soulforge/<version> marker are ignored to reduce scanner noise.
    • Write-Only Architecture: Data is written directly to the Analytics Engine. There is no database that can be read back or corrupted to exfiltrate data.
  8. Understand the SoulForge Tool Suite

    main

    The agent uses a variety of tools to interact with your codebase. These are categorized by their primary function:

    • Intelligence Tools (Priority): Used for discovery and analysis.
      • navigate, analyze, read (supports files, ranges, or targets), soul_find, soul_grep, soul_analyze, soul_impact.
    • Edit Tools: Used for modifying the codebase.
      • edit_file, write_file, create_file, rename_symbol, move_symbol, refactor.
    • Project Tools: Used for interacting with the environment.
      • project (runs lint/test/build/typecheck), shell, dispatch (for multi-agent orchestration).
    • Memory Tools: Used for long-term context.
      • memory_write, memory_search, memory_list, memory_delete.
  9. What are SoulForge Addons?

    main

    Addons are optional, opt-in components that are not included in the main SoulForge binary. They are downloaded on demand, managed via the CLI, and recorded in your global configuration.

    Currently available addons:

    • proxy: Installs CLIProxyAPI, a local LLM relay that allows routing Claude, GPT, Gemini, and Grok through existing chat subscriptions instead of using API keys (~25 MB).
    • neovim: Installs a bundled Neovim binary for the embedded editor panel, useful if you do not want to install Neovim system-wide (~15 MB).

    Note: If cli-proxy-api or nvim are already present in your system PATH (via Homebrew, apt, scoop, etc.), SoulForge will use them automatically without requiring the addons.

  10. How ast_edit works

    main

    Concept: AST-native editing

    ast_edit is an AI coding tool that edits TypeScript and JavaScript files by manipulating their Abstract Syntax Tree (AST) rather than using text matching or string manipulation.

    Key Characteristics:

    • Symbol-based: It addresses code elements by their kind (e.g., function, class) and name, rather than line numbers or text snippets.
    • Structural Mutation: It mutates the code structure directly, making it immune to whitespace changes or formatting shifts.
    • Atomic Batches: When using the operations array, edits are all-or-nothing. If any single operation in a batch fails, the entire batch is rejected.
    • Safety & Diagnostics: Files are snapshotted before editing to prevent mid-flight conflicts. After an edit, type diagnostics (errors) are immediately returned to the agent to ensure the mutation didn't break the codebase.
    // Example of an atomic batch operation
    ast_edit({
      path: "src/api.ts",
      operations: [
        { action: "set_async", target: "function", name: "fetchUser", value: "true" },
        { action: "add_parameter", target: "function", name: "fetchUser", value: "cache: boolean" },
        { action: "add_named_import", value: "./types", newCode: "User" },
      ],
    })
  11. How the system prompt is assembled

    main

    Every turn, SoulForge assembles a comprehensive system prompt from several context sources:

    • Mode & Project Info: The current operational mode and general project metadata.
    • Git Context: Information regarding the current state of the repository.
    • The Soul Map: A personalized ranking of files generated by the repo-map engine. Files recently edited or referenced receive a boost in importance.
    • Memory: Cross-session knowledge stored in the memory tool.
    • Constraints & Capabilities: Forbidden files and currently active skills.

    For more details, see the Soul Map, memory, compound tools, and code intelligence documentation.

  12. Understand SoulForge code intelligence capabilities

    main

    SoulForge provides agents with IDE-like code intelligence, allowing them to navigate code via symbols and graphs rather than simple pattern matching. This intelligence is exposed through the navigate and analyze tools.

    Supported operations include:

    • Go to definition: Locating where a symbol is defined.
    • Find references: Identifying all callers or usages of a symbol.
    • Rename: Renaming a symbol across the entire codebase.
    • Type info: Retrieving return types or variable types.
    • Diagnostics: Identifying errors or warnings in files.
    • Call hierarchy: Mapping out what functions or methods a specific symbol calls.