@absolutejs/agent

中文文档
0.37.0发布于 2026/10/21MITTypeScriptES Module近 30 天下载 1927

The production-grade, provider-neutral agent stack for AbsoluteJS: auth, actions, runtime, sandboxing, trust, memory, inbox, discovery, MCP, A2A, policy, wallet limits, controls, and conformance.

原始使用文档

@absolutejs/agent

The production-grade, provider-neutral agent stack for AbsoluteJS.

This is the cohesive entry point, not another agent runtime. Each engine remains independently installable and replaceable; this package provides one documented golden path, typed subpath exports, production-readiness checks, and an AbsoluteJS manifest that lets coding agents discover the whole stack.

The facade is the single Agency runtime owner. A2A, MCP, Agent Control, Wallet, and other extensions declare Agency as a required peer, externalize it from their builds, and test a conservative compatibility window. The facade installs the matching real Agency dependency, so one application cannot silently create parallel action types or ledgers.

import { assertProductionReady, defineAgentStack } from "@absolutejs/agent";
import { createAgentRuntime } from "@absolutejs/agent/runtime";
import { createAgency } from "@absolutejs/agent/actions";

const stack = defineAgentStack([
  { capability: "durability", instance: runtime, name: "runtime" },
  { capability: "authorization", instance: agency, name: "actions" },
] as const);

await assertProductionReady(stack); // fails until every production concern is wired

Stable subpaths

  • @absolutejs/agent/auth — native auth.md registration, ID-JAG, scoped delegation
  • @absolutejs/agent/actions — terminal approvals/rejections, leases, receipts, kill switches, handoffs
  • @absolutejs/agent/runtime — durable runs, checkpoints, budgets, effects
  • @absolutejs/agent/sandbox — deny-by-default HTTP, filesystem, and process grants
  • @absolutejs/agent/trust — provenance, taint propagation, safe context and sinks
  • @absolutejs/agent/memory — scoped, authorized, erasable durable memory
  • @absolutejs/agent/inbox — verified webhooks, schedules, retries, dead letters
  • @absolutejs/agent/discovery — signed well-known documents, cards, text, sitemaps, registry
  • @absolutejs/agent/execution — certified tenant adapter installations, transactional outbox, retries, signed provider evidence ingestion, reconciliation, compensation
  • @absolutejs/agent/exchange — experimental, model-blind sensitive-value exchange with explicit one-time or signed standing-mandate approval, single-use leases, authenticated E2EE, replay defense, revocation, and redacted receipts
  • @absolutejs/agent/mcp, /a2a, /arazzo, and /webmcp — open interoperability, workflow, and browser transports
  • @absolutejs/agent/policy — versioned policy and AuthZEN adapters
  • @absolutejs/agent/wallet — reservations, idempotent settlement, spending policy
  • @absolutejs/agent/control — operator inventory, revoke, restore, kill switches
  • @absolutejs/agent/conformance — adversarial protocol and action suites

The package deliberately does not introduce an Absolute-only wire protocol. Applications expose standard MCP, A2A, OAuth, RFC 9728/RFC 8414, auth.md, and AuthZEN surfaces while Absolute supplies provider-neutral implementation seams.

/auth.md is the open auth.md registration profile's conventional discovery route. Absolute Auth generates it from the application's authoritative OAuth metadata and implements the flow natively; it is not a WorkOS adapter and does not require a WorkOS service.

One authenticated delegation

createAuthAgencyDelegationAuthority() bridges the delegation already verified by Absolute Auth directly into Agency. Put an authAgencyAuthorizationDetail() in the Auth grant to bind its audience, canonical actions, effects, resource types, and optional resource IDs. Agency then re-reads that same grant before an action request, lease, and execution; there is no second grant ID or shadow state to synchronize.

版本与发布记录

@absolutejs/agent 共发布 110 个版本,首次发布于 2026/07/16;过去 12 个月发布了 110 个版本。

版本发布日期距今
0.37.0latest2026/10/2118 天前
0.36.02026/10/2118 天前
0.35.02026/09/131 个月前
0.34.02026/09/131 个月前
0.33.02026/09/131 个月前
0.32.02026/09/131 个月前

关于 @absolutejs/agent 的常见问题

@absolutejs/agent 是什么?

The production-grade, provider-neutral agent stack for AbsoluteJS: auth, actions, runtime, sandboxing, trust, memory, inbox, discovery, MCP, A2A, policy, wallet limits, controls, and conformance.

如何安装 @absolutejs/agent?

在项目目录运行 npm install @absolutejs/agent,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:drizzle-orm(>=1.0.0-rc.4 <2)、@absolutejs/auth(>=0.57.6 <1)、@absolutejs/execution(>=0.14.10 <0.15)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@absolutejs/agent 支持 TypeScript 吗?

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

@absolutejs/agent 支持 ESM 还是 CommonJS?

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

@absolutejs/agent 可以商用吗?

@absolutejs/agent 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@absolutejs/agent 的下载量有多少?

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

@absolutejs/agent 还在维护吗?

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