Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ Core must build, deploy and run independently of product services, frontends and

### Optional application example

`example/parsar/` is an optional Agent workbench in this repository. Its [README](example/parsar/README.md) owns its product behavior.
`example/parsar/` is an optional task workspace in this repository. Its [README](example/parsar/README.md) owns its product behavior.

- It calls only public `/v1` APIs. Its Project key stays server-side; it never holds a Core key or issues machine credentials. Self-hosted connection displays the public Session installation command unchanged; Core owns bootstrap authorization and machine credential issuance.
- It calls only public `/v1` APIs. Its Project key stays server-side; it never holds a Core key or issues machine credentials. The example uses only Core-managed hosted environments; its environment templates prepare packages, initialization commands, variables and initial files through the public Session contract.
- It may keep a small product-owned SQLite database (Node's built-in module, Node 22.13+), outside the checkout and isolated by Core origin and Project key fingerprint. Provider keys never reach the browser.
- Core owns Skills and all execution and history state. The example stores only Session references and pending creation requests with stable idempotency keys.
- Product resources use `/app/` and never become Core API or database conventions.
- Core owns Skills and authoritative execution/history state. The example owns resource configurations, projects, tasks, comments, interval/Cron plans and Feishu delivery receipts. Session records retain Core references and pending creation requests with stable idempotency keys; product workers use the same public API as interactive flows.
- Product resources use `/app/` and never become Core API or database conventions. Execution uses bypass mode. The local Web operator, Agent-scoped local MCP tokens and configured Feishu routes are the example’s access boundary; it does not implement product accounts or fine-grained permissions.
- It is excluded from Core distributions and cannot become a service dependency.

## Workflow and review
Expand Down
4 changes: 4 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Nodes, Runtime daemons and the self-hosted installer call `/api/v1` with their o
Operator scripts configure independent filesystem storage through Core-key-authenticated `GET` and `PUT /core/v1/workspace-storage`; see [Workspace storage](../../contracts/agents-api/admin-api.md#workspace-storage).

Web and operator scripts update the sandbox idle policy through Core-key-authenticated `PATCH /core/v1/sandbox/deployment`; see [Sandbox deployment](../../contracts/agents-api/sandbox-deployment.md).

The optional [application example](../../CONTRIBUTING.md#optional-application-example) owns its loopback `/app/` product routes. Their caller is its same-origin local UI; in-process workers reuse the product operations. Its server uses a Project API key for public `/v1` calls and accepts no Core administrator credential.

Its loopback `/mcp/agents/<id>` endpoint serves local MCP clients authenticated with a product-issued Agent token; `/oauth/callback` is a read-only OAuth return page. Product route families, callers and credentials are owned by the [Parsar local API](../../example/parsar/README.md#ownership-and-local-api). These are not Core namespaces.
6 changes: 4 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Complete applications built on the [Agents API](./api/public-agent-api.md). Each

| Example | What it shows |
| --- | --- |
| [Parsar Agent workbench](#parsar-agent-workbench) | A product UI: models, Skills, MCP, reusable Agents, and Sessions on any runtime |
| [Parsar Agent workbench](#parsar-agent-workbench) | Projects, task boards, reusable Agents, execution history, recurring work and Feishu dispatch |

## Parsar Agent workbench

A small single-user product built on Core. You save model providers, Skills and MCP servers, combine them into Agents, then start Sessions in a managed sandbox, with no workspace, or on your own machine.
A task workspace built on Core, operated through a local Web UI and trusted Feishu groups. Organize projects, assign tasks to reusable Agents, continue execution Sessions, inspect Artifacts and record delivery progress. Interval plans and Feishu dispatch reuse the public Session flow. Execution runs in bypass mode; product accounts and fine-grained permissions are omitted.

Source: [`example/parsar`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/README.md).

Expand All @@ -22,6 +22,8 @@ Each feature maps to one part of the API. Read the code next to the guide sectio

| Feature | API used | Guide | Code |
| --- | --- | --- | --- |
| Task dispatch and recovery | Public Session creation and durable history | [Create a Session](./api/public-agent-api.md#create-a-session) | [`server/work.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/work.mjs) |
| Feishu and recurring work | Public Sessions, input events, Turns and Items | [Send input](./api/public-agent-api.md#send-input) | [`server/feishu.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/feishu.mjs), [`server/schedules.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/schedules.mjs) |
| Server-side key and headers | Bearer key, `OpenAI-Beta`, route allowlist | [Before you start](./api/public-agent-api.md#before-you-start) | [`server.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server.mjs) |
| Agents with a Harness and model | `x_agents_core.harness`, `model_provider` | [Core extensions](./api/public-agent-api.md#core-extensions-x_agents_core) | [`server/sessions.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/sessions.mjs) |
| Sessions on three runtimes | `openai_hosted`, `none`, `self_hosted` with `workspace_directory` | [Create a Session](./api/public-agent-api.md#create-a-session) | [`server/sessions.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/sessions.mjs) |
Expand Down
6 changes: 5 additions & 1 deletion docs/zh/api/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "API 命名空间和凭据"
source: docs/api/index.md
source_hash: 12a1933c91e95828ccd8bf8405a892726c7da265ddf2bbf6bf99bd156af0f96d
source_hash: d913f9c0750ca03c6fd70fcaf10d5662212ee8ed97adc54325b60e0ad1eab2f4
---

Core 提供三个命名空间。每个命名空间都有一种调用方及其独立凭据,凭据只能在其所属命名空间中使用。
Expand All @@ -25,3 +25,7 @@ Core 提供三个命名空间。每个命名空间都有一种调用方及其独
运维脚本通过经 Core 密钥认证的 `GET` 和 `PUT /core/v1/workspace-storage` 配置独立文件系统存储;参见[工作区存储](../../../contracts/agents-api/zh/admin-api.md#workspace-storage)。

Web 和运维脚本通过 Core 密钥认证的 `PATCH /core/v1/sandbox/deployment` 更新沙箱空闲策略;参见[沙箱部署](../../../contracts/agents-api/zh/sandbox-deployment.md)。

可选的 [应用示例](../../../CONTRIBUTING.md#optional-application-example)拥有自己的回环 `/app/` 产品路由,调用方是同源本地 UI;进程内工作器复用产品操作。其服务器使用 Project API 密钥调用公开 `/v1`,不接受 Core 管理员凭据。

示例的回环 `/mcp/agents/<id>` 端点供本机 MCP 客户端使用,以产品签发的 Agent Token 鉴权;`/oauth/callback` 是只读 OAuth 返回页。产品路由组、调用方与凭据由 [Parsar 本地 API](../../../example/parsar/README.zh.md#ownership-and-local-api) 说明,不属于 Core 命名空间。
8 changes: 5 additions & 3 deletions docs/zh/examples.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: "示例"
source: docs/examples.md
source_hash: 60a228b1b499d11f5f6f122a5e298962fcc9ced9777688f69f5078a2f5df4c9c
source_hash: 55efc4906a38e5bd9e65aef60f686f17c57f75c0e7356e5f6549b436d5e92137
---

基于 [Agents API](api/public-agent-api.md)构建的完整应用。每个示例都使用项目 API 密钥连接真实的 Core 安装。

| 示例 | 展示内容 |
| --- | --- |
| [Parsar Agent 工作台](#parsar-agent-workbench) | 产品 UI:模型、Skills、MCP、可复用 Agent,以及在任意 Runtime 上运行的 Session |
| [Parsar Agent 工作台](#parsar-agent-workbench) | 项目、任务看板、可复用 Agent、执行历史、定时任务和飞书分配 |

## Parsar Agent 工作台 {#parsar-agent-workbench}

基于 Core 构建的小型单用户产品。保存模型提供商、Skills 和 MCP 服务器,将它们组合成 Agent,然后在托管沙箱、无工作区环境或自己的机器上启动 Session。
基于 Core 构建的任务工作空间,通过本地 Web UI 和受信任的飞书群操作。组织项目,将任务分配给可复用 Agent,继续执行 Session,检查 Artifacts 并记录交付进度。间隔计划和飞书分配复用公开 Session 流程。执行使用 bypass 模式;不包含产品账号和细粒度权限。

源码:[`example/parsar`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/README.md)。

Expand All @@ -24,6 +24,8 @@ source_hash: 60a228b1b499d11f5f6f122a5e298962fcc9ced9777688f69f5078a2f5df4c9c

| 功能 | 使用的 API | 指南 | 代码 |
| --- | --- | --- | --- |
| 任务分配与恢复 | 公开 Session 创建和持久历史 | [创建 Session](api/public-agent-api.md#create-a-session) | [`server/work.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/work.mjs) |
| 飞书和定时任务 | 公开 Sessions、输入事件、Turns 和 Items | [发送输入](api/public-agent-api.md#send-input) | [`server/feishu.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/feishu.mjs)、[`server/schedules.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/schedules.mjs) |
| 服务端密钥和请求头 | Bearer 密钥、`OpenAI-Beta`、路由允许列表 | [开始前](api/public-agent-api.md#before-you-start) | [`server.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server.mjs) |
| 带 Harness 和模型的 Agent | `x_agents_core.harness`、`model_provider` | [Core 扩展](api/public-agent-api.md#core-extensions-x-agents-core) | [`server/sessions.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/sessions.mjs) |
| 三种 Runtime 上的 Session | `openai_hosted`、`none`、带 `workspace_directory` 的 `self_hosted` | [创建 Session](api/public-agent-api.md#create-a-session) | [`server/sessions.mjs`](https://github.com/MiniMax-AI/OpenAgentCore/blob/main/example/parsar/server/sessions.mjs) |
Expand Down
Loading
Loading