@agentworkforce/sage

中文文档
1.5.41发布于 2026/05/15TypeScriptES Module近 30 天下载 1730

Research, clarify, plan. The AI agent that turns scattered conversations into executable development workflows.

原始使用文档
文档目录15 节
  1. How it works
  2. Architecture
  3. V1 (Current)
  4. V2
  5. V3
  6. Setup
  7. Prerequisites
  8. 1. Install dependencies
  9. 2. Configure environment
  10. 3. Create Slack app
  11. 4. Run locally
  12. 5. Use it
  13. Building with workflows
  14. Project structure
  15. Part of PDERO

Sage

Research, clarify, plan. The AI agent that turns scattered conversations into executable development workflows.

Sage is the Plan phase of PDERO (Plan, Delegate, Execute, Review, Observe). It observes team conversations, researches across integrations, asks clarifying questions, and produces structured plans that become relay workflow definitions.

How it works

You @sage in Slack (WhatsApp and Telegram in V2). Sage:

  1. Researches — searches the web and your GitHub repos for context
  2. Clarifies — asks probing questions before jumping to solutions
  3. Remembers — persistent memory across conversations via Supermemory
  4. Plans (V3) — synthesizes everything into executable relay workflows

Architecture

V1 (Current)

Single-agent Slack webhook server with web search and GitHub integration.

Slack Events API → Hono server → Sage agent (Sonnet 4.6) → Slack response
                                    ├── OpenRouter (web search)
                                    ├── GitHub (via Nango)
                                    └── Supermemory (persistent memory)

V2

Multi-platform (Slack + WhatsApp + Telegram) with multi-agent swarm under the hood via @agent-relay/gateway.

V3

Full planning pipeline. Planner agent (Opus 4.6) synthesizes context into structured plans and generates executable relay workflow definitions.

Setup

Prerequisites

  • Node.js 20+
  • agent-relay CLI installed
  • A Slack app (Events API, not Socket Mode)
  • Nango account with GitHub integration
  • OpenRouter API key
  • Supermemory API key

1. Install dependencies

npm install

2. Configure environment

cp .env.example .env

Fill in:

VariableSourcePurpose
OPENROUTER_API_KEYopenrouter.ai/keysSonnet 4.6 + web search
SUPERMEMORY_API_KEYsupermemory.aiPersistent memory
SLACK_BOT_TOKENSlack app → OAuth & PermissionsBot identity (xoxb-)
SLACK_SIGNING_SECRETSlack app → Basic InformationWebhook verification
NANGO_SECRET_KEYapp.nango.dev → SettingsNango API access
NANGO_GITHUB_CONNECTION_IDapp.nango.dev → ConnectionsYour GitHub connection
SAGE_WORKSPACE_IDYou choose (e.g. "default")Memory namespace
PORTOptional (default: 3000)Server port

3. Create Slack app

  1. Go to api.slack.com/apps → Create New App → From scratch
  2. OAuth & Permissions → Bot Token Scopes:
    • app_mentions:read
    • chat:write
    • channels:history
    • channels:read
  3. Install to workspace → copy Bot Token
  4. Basic Information → copy Signing Secret
  5. Event Subscriptions → Enable → Subscribe to bot events: app_mention
  6. Set Request URL to your public URL + /api/webhooks/slack

4. Run locally

npm run dev          # Starts Hono server on :3000
ngrok http 3000      # Expose webhook URL for Slack

Paste the ngrok URL into Slack Event Subscriptions as the Request URL:

https://your-ngrok-id.ngrok.io/api/webhooks/slack

5. Use it

Mention @sage in any Slack channel:

  • "What's the best queue library for Node.js?" → web search + synthesis
  • "What open issues do we have about auth?" → GitHub search
  • "I want to add real-time notifications" → clarifying questions before planning
  • Come back to the same thread later → Sage remembers the context

Building with workflows

Sage is built by relay workflows. To rebuild from scratch:

bash workflows/run-v1.sh      # Build V1 (~80 min)
bash workflows/run-v2.sh      # Build V2 (~130 min)
bash workflows/run-v3.sh      # Build V3 (~125 min)
bash workflows/run-all.sh     # Build everything (~5.5 hours)

See workflows/wave-plan.md for the full execution plan.

Project structure

src/
├── server.ts              # Hono HTTP server — webhook entry point
├── slack.ts               # Slack signature verification + event parsing
├── openrouter.ts          # OpenRouter client (Sonnet 4.6 + web search)
├── memory.ts              # Supermemory persistence layer
├── prompt.ts              # Sage system prompt / persona
├── nango.ts               # Nango client wrapper
└── integrations/
    ├── types.ts            # Shared integration types
    └── github.ts           # GitHub search, file read, PR diff via Nango

Part of PDERO

PhaseAgentRole
PlanSage (this repo)Research, clarify, plan
Delegate + ExecutePearAgent orchestration GUI
ReviewMSD + TrajectoriesCode review + decision recording
ObserveNightCTOAI CTO over messaging
CommunicationAgent RelayInter-agent messaging

版本与发布记录

@agentworkforce/sage 共发布 90 个版本,首次发布于 2026/04/10;过去 12 个月发布了 90 个版本。

版本发布日期距今
1.5.41latest2026/05/155 个月前
1.5.402026/05/086 个月前
1.5.392026/05/086 个月前
1.5.382026/05/076 个月前
1.5.372026/05/066 个月前
1.5.362026/05/066 个月前

关于 @agentworkforce/sage 的常见问题

@agentworkforce/sage 是什么?

Research, clarify, plan. The AI agent that turns scattered conversations into executable development workflows.

如何安装 @agentworkforce/sage?

在项目目录运行 npm install @agentworkforce/sage,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 sage-vfs,可以用 npx sage-vfs 直接运行。

@agentworkforce/sage 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@agentworkforce/sage 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@agentworkforce/sage 可以商用吗?

@agentworkforce/sage 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@agentworkforce/sage 的下载量有多少?

根据 npm 官方下载统计,@agentworkforce/sage 在 2026/10/05 – 2026/11/03 这 30 天内被下载 1,730 次,日均约 58 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agentworkforce/sage 还在维护吗?

最新版本 1.5.41 发布于 2026/05/15(5 个月前);至今共发布 90 个版本,其中过去 12 个月发布了 90 个;首次发布于 2026/04/10。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。