JiuwenSwarm

repository·develop·Indexed 22 days ago

https://github.com/openjiuwen-ai/jiuwenswarm

A multi-agent orchestration system designed to automate complex tasks through swarm collaboration, skill self-evolution, and natural language intent recognition. It functions as a workflow engine coordinating specialized agents and includes a distributed deployment system via openYuanrong, an observability stack with OpenTelemetry and Langfuse integration, and a gateway service for managing agent instances.

Tokens
322.2K
Snippets
716
Records
1.2K
Agent score
76%

What's inside jiuwenswarm

  1. Overview of JiuwenSwarm Documentation

    develop

    JiuwenSwarm documentation is organized into five main sections to guide users from initial setup to advanced development:

    1. Installation (安装): Covers basic installation, environment preparation, TUI (Terminal User Interface) mode setup, and quick start guides.
    2. Basic Usage (基础使用): Explains core features such as the Web interface, chat/dialogue, agent management, session history, scheduled tasks, skills, channels, configuration, browser services, logs, and MCP (Model Context Protocol) settings.
    3. Advanced Operations (高阶操作): Details advanced capabilities including context compression, self-evolving skills, tool security/permissions, E2A/A2A protocols, multi-agent collaboration (Agent Teams), memory systems, and the TUI command architecture.
    4. Appendix (附录): Provides technical details for packaging EXE files, desktop auto-update designs (Windows/macOS), and developer guides for source code debugging and secondary development.
    5. Development Practices (开发实践): Showcases real-world Agent application cases, such as Code Review Assistants and Daily Report Generators, to serve as templates for building your own applications.
  2. Overview of jiuwenbox

    develop

    What is jiuwenbox?

    jiuwenbox is a lightweight Linux sandbox service designed to run agent tools and code snippets in a layered, isolated environment. It provides a FastAPI-based service for managing sandbox lifecycles, file transfers, file searching, and command execution.

    Key Features

    • Process Isolation: Uses bubblewrap for secure process isolation.
    • Filesystem Control: Static policy-based filesystem access control.
    • Storage: Managed backend storage located at ~/.jiuwenbox/workspace.
    • Network Isolation: Optional Linux network namespace and firewall isolation.
    • Security Controls: Supports Linux capabilities, Landlock filesystem constraints (when supported by kernel), and Seccomp syscall filtering.
    • Runtime Support: Executes Python and JavaScript code when runtimes are present.
    • Privacy Proxy: Includes an Inference Privacy Proxy for LLM API request routing and automatic API key injection.
    • Auditing: Provides audit logs and persistent sandbox lifecycle state.
  3. JiuwenSwarm Documentation Overview

    develop

    JiuwenSwarm documentation is organized into five primary functional areas to help users from initial setup to advanced development:

    1. Installation: Covers basic installation, environment preparation, TUI (Terminal User Interface) mode, and quick start guidance.
    2. Basic Usage: Focuses on daily operations including Web UI navigation, conversations, agent management, sessions, scheduled tasks, skills, channels, configuration, browser services, logs, and MCP (Model Context Protocol) settings.
    3. Advanced Operations: Details complex capabilities like context compression, skill self-evolution, security/permissions, communication protocols (E2A/A2A), multi-agent collaboration (Teams), memory systems, and TUI slash commands.
    4. Appendix: Provides technical details on packaging (EXE), auto-update mechanisms for Windows/macOS, and developer-specific setup guides.
    5. Development Practices: Showcases real-world Agent application cases (e.g., Code Review Assistants, Daily Report Generators) to guide secondary development.
  4. Understand the JiuwenSwarm Web UI Layout

    develop

    The JiuwenSwarm web application uses a three-column layout designed for professional workflows:

    • Left Navigation (Left edge): Access to feature menus, version information, and system settings.
    • Main Workspace (Center): The primary interaction area for chat, task execution, and controls.
    • Right Info Panel (Right edge): Displays real-time system status, task lists, and resource monitoring.

    Key UI Features:

    • Responsive Design: Regions resize based on screen width.
    • Collapsible Sidebars: You can fold the left and right panels to maximize the center workspace.
    • Recommended Display: A wide display (e.g., 1920×1080 or higher) is recommended for optimal use.
  5. Understand the Retrieval package structure

    develop

    The retrieval/ package is responsible for online retrieval operations. Its internal structure is organized as follows:

    • retrieval/io/: Handles loading tree and catalog artifacts.
    • retrieval/tree/: Manages progressive tree search, disclosure decisions, branch reduction, and trace generation.
    • retrieval/protocols/: Handles prompt generation, display-name normalization, and output parsing.
    • retrieval/service/: Provides high-level retriever interfaces (e.g., Retriever).

    The canonical retrieval flow involves loading tree_index.yaml and catalog.jsonl, routing the query through the progressive tree, and returning selected leaf payloads from the catalog.

  6. Overview of the CAM Operator Replacement Expert Skill

    develop

    The deepep-to-cam-converter skill is designed to migrate Mixture of Experts (MoE) code from DeepEP-based implementations to Ascend NPU environments. It automates the identification of DeepEP dispatch and combine operators and performs communication domain conversion (NCCL $\rightarrow$ HCCL), device adaptation (CUDA $\rightarrow$ NPU), and operator replacement.

    Core Principles for Users

    • Chain-of-Thought First: The system will output its analysis and self-check results before making any code modifications.
    • In-place Modification: By default, changes are made directly to your specified files; new files are not created unless explicitly requested.
    • Runtime Value Priority: The tool prioritizes actual runtime parameter values over hardcoded defaults in argparse or config.yaml to ensure constraint validation is accurate.
    • Mandatory Interaction: The tool will pause to ask for user input regarding operator mode selection (e.g., A3 Ordinary vs. Shmem) and how to handle unsupported features.
  7. What is a Session in JiuwenSwarm

    develop

    A Session is the core data unit used to manage conversation history and context. It records the complete exchange between a user and the AI, including task status, execution progress, and intermediate results.

    Session vs. Memory

    It is critical to distinguish between these two concepts:

    • Session: Temporary conversation history. It is used for context continuity within a single interaction flow and disappears when cleared or closed.
    • Memory: Persistent storage. It is used to retain important information (like user preferences or key knowledge) across multiple different sessions.
  8. What is a Skill in JiuwenSwarm?

    develop

    A Skill is an installable, manageable, and reusable module that extends the core capabilities of a JiuwenSwarm agent. While the base agent provides fundamental capabilities like chat, file operations, web search, and code execution, Skills allow the agent to perform complex, multi-step workflows.

    Workflow Lifecycle:

    1. User Request: The user provides a prompt.
    2. Identification: The agent identifies the need for a specific capability.
    3. Loading: The agent loads the matched Skill.
    4. Execution: The Skill executes its specific workflow.
    5. Result: The agent returns the result to the user.

    Example Scenarios:

    • GitCode PR: Instead of manually managing branches and APIs, a single command like "open a PR" triggers an automated flow.
    • PPT Building: A PPT skill allows generating a full slide deck directly from a prompt.
    • PR Review: A skill can fetch comments, patch code, and reply to comments automatically.
  9. Overview of openJiuwen Harness Architecture

    develop

    The openJiuwen Harness architecture is organized into three distinct layers:

    1. DeepAgent Core Engine: Handles the task loop, stop conditions, ReAct reasoning, sub-agent delegation, and the Rail lifecycle.
    2. Extension Surface: Provides four primary ways to extend functionality:
      • Subagent
      • Tool
      • Rails
      • Stop-Condition
    3. Infrastructure Layer: Provides system operation abstractions, session management, and permission control.
  10. What is Auto Harness?

    develop

    Auto Harness is an agent self-optimization solution built on the openJiuwen Agent Core. It automates the optimization of an agent's "Harness"—the components that define how an LLM performs in practice. Instead of manual tuning, Auto Harness enables agents to autonomously analyze performance gaps, generate improvement plans, implement changes, and verify them through an evaluation-driven closed loop.

    It operates on the principle that Agent = Model + Harness, where the Harness consists of:

    • Prompts: System prompts defining behavior and roles.
    • Tools: The set of available tools affecting capability boundaries.
    • Rails: Runtime safety guards controlling behavior.
    • Skills: Reusable templates encapsulating domain capabilities.
  11. Overview of JiuwenSwarm Runtime Modes

    develop

    JiuwenSwarm operates using different runtime modes, each defining a specific tool set, permission policy, and memory behavior. These modes determine the underlying AgentServer runtime profile and which Rails (safety/logic constraints) are active.

    Available Modes

    ModeCodeDescription
    Agent (Plan)agent.planDefault mode. Focused on reasoning, planning, and complex task decomposition. Uses proactive memory.
    Agent (Fast)agent.fastFocused on quick responses and direct tool use. Uses passive memory.
    Code (Normal)code.normalFocused on code execution, file editing, and running commands. Uses CodingMemoryRail and project files like JIUWENSWARM.md.
    Code (Team)code.teamLaunches team collaboration specifically from the Code profile, preserving code-workspace semantics.
    TeamteamStandard multi-agent collaboration mode where a leader decomposes tasks for role members.
    | Mode | Code | Description |
    |------|------|-------------|
    | Agent (Plan) | `agent.plan` | Default mode. Full tools + proactive memory, focused on reasoning and planning |
    | Agent (Fast) | `agent.fast` | Full tools + passive memory, focused on quick responses |
    | Code (Normal) | `code.normal` | Code mode + coding memory, focused on code execution |
    | Code (Team) | `code.team` | Team collaboration launched from the Code profile |
    | Team | `team` | Multi-agent collaboration mode, based on the `team` definition in config |
  12. What is A2UI and how does it work?

    develop

    A2UI (Agent-to-UI) is an optional capability in JiuwenSwarm designed for the Web channel. It allows agents to return standardized UI messages (such as forms, confirmations, structured details, or comparisons) within a conversation.

    When enabled, the model can include <a2ui-json>...</a2ui-json> blocks in its response. The Web frontend parses these blocks to render interactive UI components. User interactions with these components (like clicking a button or submitting a form) are sent back to the backend as structured chat content, which the agent_adapter converts into model-readable prompts to continue the conversation.

    Note: A2UI is natively supported only by the Web channel. Non-Web channels (like CLI or other integrations) bypass all A2UI logic and continue using standard text/Markdown paths.

    <!-- Example of the expected model output format -->
    <a2ui-json>
    {
      "type": "form",
      "fields": [...]
    }
    </a2ui-json>