Sage Documentation

repository·main·Indexed 22 days ago

https://github.com/zhangzhengeric/sage

A production-ready, modular, and intelligent multi-agent orchestration framework for complex problem solving. Sage provides a unified execution stack for task execution, automation, and enterprise deployment, featuring a Desktop application, a Terminal TUI, and a Browser Bridge Extension for browser workflow control. It supports Kubernetes deployment and includes specialized skills such as an Excalidraw diagram generator.

Tokens
223.7K
Snippets
435
Records
1.1K
Agent score
78%

What's inside sage

  1. What is Sage?

    main

    Sage is an AI agent collaboration platform designed to help users manage and scale AI capabilities. Key functionalities include:

    • Multi-Agent Management: Create specialized AI assistants for different scenarios.
    • Capability Extension: Use tools to enable agents to perform actions like file operations, database queries, and web searches.
    • Multi-Channel Access: Interact with agents through various interfaces, including web chat, DingTalk, and Feishu.
    • Task Automation: Configure scheduled tasks to allow agents to handle repetitive work automatically.
  2. What is Sage Agent Platform?

    main

    Sage is an enterprise-grade Agent platform designed to move beyond simple chatbots or single-point Copilots. It enables organizations to transition from 'answering questions' to a state where Agents can understand tasks, call tools, execute workflows, verify results, deliver artifacts, and run stably across multiple channels.

    Key value proposition: Sage allows businesses to start with individual Agent scenarios and gradually build up repeatable, governable, and scalable Agent platform capabilities.

  3. Use the XLSX skill for spreadsheet tasks

    main

    The xlsx skill is designed for any task where a spreadsheet file is the primary input or output. This includes:

    • Reading/Editing: Opening, reading, editing, or fixing .xlsx, .xlsm, .csv, or .tsv files.
    • Creation: Creating new spreadsheets from scratch or from other data sources.
    • Transformation: Adding columns, computing formulas, formatting, charting, or cleaning messy tabular data.
    • Conversion: Converting between different tabular file formats.

    Note: Do NOT use this skill if the primary deliverable is a Word document, HTML report, standalone Python script, or database pipeline.

  4. Explore Sage Solution Playbooks

    main

    Sage provides 'Solution Playbooks', which are documents designed for specific business and industry scenarios (e.g., collections, support, sales, and operational automation). Unlike technical documentation, these playbooks focus on business outcomes, capability boundaries, and delivery paths, making them suitable for customer-facing presentations.

    Available playbooks include:

    • Collections Agent Proposal: Strategies for automated collections.
    • Sage Platform Multi-Agent Delivery Recommendation: Guidance on delivering multi-agent systems using the Sage platform.
    • Sage, Amazon Bedrock, and Bedrock Agents: A primer on integrating Sage with Amazon Bedrock and Bedrock Agents.
  5. Identify Sage entry points and product surfaces

    main

    Sage provides several different ways to interact with the system depending on the required level of complexity:

    Lightweight Examples (Development/Testing)

    Use these for quick testing or standalone demos:

    • CLI Entry Points: sage run, sage chat, or sage doctor.
    • Streamlit Demo: examples/sage_demo.py.
    • FastAPI Service: examples/sage_server.py (standalone example service).

    Main Application Server (Full Product)

    Use this for the complete web-based product experience:

    • Backend: app/server/main.py (Primary FastAPI application entry point).
    • Frontend: app/server/web/ (Vue 3 + Vite web client).

    Desktop App (Packaged Experience)

    Use this for a standalone desktop installation:

    • Bootstrap: app/desktop/entry.py.
    • Local Backend: app/desktop/core/main.py (Desktop-local FastAPI backend).
    • UI: app/desktop/ui/.

    Core Runtime (Low-level Integration)

    Use these for direct programmatic access to the agentic engine:

    • Streaming Runtime: sagents/sagents.py (SAgent entry point).
    • Agent Logic: sagents/agent/.
    • Tooling: sagents/tool/ (Includes MCP proxy support).
    • Skills: sagents/skill/.
    • Sandboxing: sagents/utils/sandbox/.
  6. Use the Excalidraw Diagram Generator skill

    main

    The excalidraw-diagram-generator skill converts natural language descriptions into .excalidraw JSON files. This allows you to visualize processes, systems, and ideas without manual drawing.

    Supported diagram types include:

    • Flowcharts: Sequential processes and decision trees.
    • Relationship Diagrams: Entity relationships and dependencies.
    • Mind Maps: Concept hierarchies and brainstorming.
    • Architecture Diagrams: System design and module interactions.
    • Data Flow Diagrams (DFD): Data transformation processes.
    • Business Flow (Swimlane): Cross-functional workflows with actor responsibilities.
    • Class Diagrams: Object-oriented design and class structures.
    • Sequence Diagrams: Object interactions and message flows over time.
    • ER Diagrams: Database entity relationships and data models.

    Example prompts to trigger this skill:

    • "Create a diagram showing..."
    • "Make a flowchart for..."
    • "Visualize the process of..."
    • "Draw the system architecture of..."
    • "Generate a mind map about..."
    • "Create an Excalidraw file for..."
  7. Test local web applications with webapp-testing toolkit

    main

    The webapp-testing toolkit allows you to interact with and test local web applications using Python and Playwright. It supports verifying frontend functionality, debugging UI behavior, capturing screenshots, and viewing browser logs.

    Approach Decision Tree

    1. Static HTML: If the application is a static HTML file, read the file directly to identify selectors and write a Playwright script using file:// URLs.
    2. Dynamic Webapp (Server not running): Use the scripts/with_server.py helper to manage the server lifecycle, then write your Playwright script.
    3. Dynamic Webapp (Server already running): Use the Reconnaissance-then-action pattern: navigate, wait for networkidle, inspect the DOM/screenshot to find selectors, and then execute actions.
  8. Use the brand-guidelines skill for Anthropic styling

    main

    The brand-guidelines skill applies Anthropic's official brand identity—including specific colors and typography—to artifacts such as presentations or documents. Use this skill when you need to ensure visual formatting, company design standards, or brand colors are applied to a generated output.

    Keywords: branding, corporate identity, visual identity, post-processing, styling, brand colors, typography, Anthropic brand, visual formatting, visual design

  9. Overview of built-in MCP servers in Sage

    main
    Sage includes built-in Model Context Protocol (MCP) server implementations located in the mcp_servers/ directory. These servers are part of Sage's extension model and are designed to be surfaced through the tool system, allowing agent sessions to invoke external or hosted capabilities as if they were local tools.
  10. What is an Agent in Sage?

    main

    An Agent is the core configuration unit of Sage, acting as a specialized AI assistant. Each Agent is defined by a unique set of configurations that dictate its behavior and capabilities, including:

    • System Prompts: Defines the role and behavior.
    • Toolsets: A specific collection of tools to extend capabilities.
    • Conversation History: Maintains independent dialogue context.
    • File Access: Access to specific local directories.
    • Professional Skills: Pre-defined capability modules.

    Agents can be created via manual configuration (Blank Configuration) or via AI-assisted generation (Smart Configuration).

  11. Integrate the Sage Chrome Extension

    main

    The Sage Chrome Extension (app/chrome-extension/) is a browser-side UI client that lives in the browser's side panel.

    Important: The extension does not embed the sagents runtime itself. It acts as a client that communicates with a deployed app/server/ instance via HTTP/SSE. It uses a content-script.js injected into web pages and a service-worker.js to manage background communication between the side panel UI and the remote server.