@agentskit/integrations

中文文档
0.8.3发布于 2026/10/24MITTypeScriptESM + CJS构建来源已验证近 30 天下载 5865

Unified, plug-and-play service integrations for AgentsKit agents — one descriptor per service projected into tools, connectors, triggers, and auth.

原始使用文档
文档目录9 节
  1. Verified proof
  2. How this fits the ecosystem
  3. Install
  4. Quick start
  5. Authoring a new integration
  6. Execution boundaries (resilience & security)
  7. Stability
  8. Maturity and compatibility
  9. Contributing

@agentskit/integrations

Profile: major-package

AgentsKit

Tags: agentskit · typescript · ai-agents

stability

Unified, plug-and-play service integrations for AgentsKit agents — one descriptor per service, projected into tools, connectors, triggers, and auth. Every integration is HTTP/fetch-only: no vendor SDKs are bundled or required (see ADR-0012). HTTP retry, timeout-signal, and bounded-reader behavior uses the @agentskit/net runtime dependency.

Verified proof

How this fits the ecosystem

@agentskit/integrations turns SaaS APIs into agent-ready tools, connectors, triggers, and auth from one service descriptor.

  • AgentsKit: compose it with the other packages in this repo to build agents from small, swappable parts.
  • Registry: look for ready agents and templates that already use this layer at registry.agentskit.io.
  • Playbook: learn the production patterns behind this layer at playbook.agentskit.io.

Docs: package guide · agent handoff

Install

npm install @agentskit/integrations

Quick start

// Most consumers don't author integrations directly — they pull ready-made
// service descriptors from the registry and project them into tools:
import { integrationTools } from '@agentskit/integrations'

export const tools = integrationTools('slack', {
  credential: process.env.SLACK_BOT_TOKEN,
})

Service descriptors live under src/services/. The descriptor declares the service's actions, triggers, auth, and CONFIG_FIELDS; the projection helpers turn one descriptor into the surface each consumer needs (a ToolDefinition for the runtime, a connect-form for an app, a webhook trigger, etc.).

The catalog is a bundled, fetch-only set of ~50 services (ADR-0012). @agentskit/tools consumes this package rather than re-shipping integrations.

Authoring a new integration

import { defineIntegration, defineAction } from '@agentskit/integrations'

export const myService = defineIntegration({
  name: 'my-service',
  http: { baseUrl: 'https://api.example.com' },
  actions: [
    defineAction({
      name: 'send',
      schema: { type: 'object', properties: { to: { type: 'string' } }, required: ['to'] },
      execute: (args, { http }) => http({ method: 'POST', path: '/send', body: args }),
    }),
  ],
})

Execution boundaries (resilience & security)

Projection and HTTP share a small set of safety contracts (ADR-0026):

  • HttpToolOptions.signal / ProjectionConfig.signal — caller cancellation composed with the per-request timeout.
  • HttpToolOptions.retry — opt-in retries for idempotent methods only: one total attempt by default, with GET / PUT / DELETE retrying 408, 425, 429, 500, 502, 503, and 504 when configured for more attempts. Backoff starts at 100 ms, caps at 2 seconds, and has no jitter. Retry-After is bounded by that cap; delta seconds are rounded to the nearest millisecond by the shared parser. Network errors are not retried.
  • Retry seams — sleep(delayMs) remains a one-argument callback; now() supplies the clock for HTTP-date Retry-After values. The overall timeout also ends a pending custom sleep wait.
  • Timeout compatibility — composeTimeoutSignal remains deprecated through version 0.10.0 and for at least 90 days. Its cleanup() detaches the compatibility relay; the native timeout signal expires on its own clock.
  • Origin-confined auth-bound HTTP — when baseUrl is set, httpJson rejects cross-origin paths and disables automatic redirects so bound credentials cannot leave that origin.
  • Derived confirmation — projection forces requiresConfirmation for actions with sideEffect of write, external, or destructive (descriptors cannot opt out).
  • ProjectionConfig.fetchUntrusted — policy-enforcing fetch for model-controlled URLs. Direct Whisper (and similar) consumers must inject an egress-policy fetch; the deprecated @agentskit/tools Whisper facade injects safeFetch independently of provider fetch.

Stability

beta — usable in production; the descriptor, registry, and projection contract are shipped, the fetch-only catalog is populated, and execution boundaries are explicit (ADR-0026). Not yet stable: public surface may still move in minor releases with CHANGELOG notes. Prefer ~x.y.z if you need tighter pins.

Maturity and compatibility

  • Stability: beta — see docs/STABILITY.md
  • Node.js 20+ and TypeScript strict mode
  • Published as @agentskit/integrations

Contributing

See CONTRIBUTING.md and the monorepo LICENSE.

版本与发布记录

@agentskit/integrations 共发布 31 个版本,首次发布于 2026/06/10;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.8.3latest2026/10/2412 天前
0.8.22026/10/1026 天前
0.8.12026/10/031 个月前
0.8.02026/10/031 个月前
0.7.52026/09/291 个月前
0.7.42026/09/261 个月前

关于 @agentskit/integrations 的常见问题

@agentskit/integrations 是什么?

Unified, plug-and-play service integrations for AgentsKit agents — one descriptor per service projected into tools, connectors, triggers, and auth.

如何安装 @agentskit/integrations?

在项目目录运行 npm install @agentskit/integrations,或使用 pnpm add / yarn add / bun add。

@agentskit/integrations 支持 TypeScript 吗?

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

@agentskit/integrations 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@agentskit/integrations 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.19。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@agentskit/integrations 可以商用吗?

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

@agentskit/integrations 的下载量有多少?

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

@agentskit/integrations 还在维护吗?

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