@alfe.ai/agent-api-client

中文文档
0.28.0发布于 2026/11/05UNLICENSEDTypeScriptESM + CJS零依赖近 30 天下载 4774

Agent self-service API client for Alfe's agent-authenticated endpoints

原始使用文档
文档目录3 节
  1. Install
  2. Usage
  3. Links

@alfe.ai/agent-api-client

Agent self-service API client for Alfe's agent-authenticated endpoints. It resolves identity from the bearer token, so callers never place their own agentId in a self-service path.

Part of Alfe — the operating system for AI agents: build, deploy, and run agents with persistent memory, identity, integrations, and channels. See the documentation to get started.

Install

npm install @alfe.ai/agent-api-client

Usage

import { AgentApiClient } from "@alfe.ai/agent-api-client";

const client = new AgentApiClient({ apiKey, apiUrl });
const manifest = await client.syncGetManifest();

Construct one client for the daemon/plugin lifetime and reuse it. JSON methods unwrap Alfe's { data } response envelope and attach the HTTP status to thrown errors. Safe reads retry one transient failure; mutations do not retry unless a method has an explicit server-side idempotency contract. S3 presigned URLs and raw voice audio use their dedicated binary/direct-transfer paths.

The flat AgentApiClient surface is assembled from domain modules for chat, Connect credentials, database, GPU instances, identity, integrations, knowledge, memory, mobile, search, secrets, sync/shared files, voice, webhooks, and workspace configuration. Thrown request errors carry the HTTP status and, when the server sends one, its machine-readable code.

版本与发布记录

@alfe.ai/agent-api-client 共发布 58 个版本,首次发布于 2026/04/03;过去 12 个月发布了 58 个版本。

版本发布日期距今
0.28.0latest2026/11/051 天前
0.27.02026/10/289 天前
0.26.12026/10/289 天前
0.26.02026/10/2214 天前
0.25.02026/10/2016 天前
0.24.02026/10/2017 天前

关于 @alfe.ai/agent-api-client 的常见问题

@alfe.ai/agent-api-client 是什么?

Agent self-service API client for Alfe's agent-authenticated endpoints

如何安装 @alfe.ai/agent-api-client?

在项目目录运行 npm install @alfe.ai/agent-api-client,或使用 pnpm add / yarn add / bun add。

@alfe.ai/agent-api-client 支持 TypeScript 吗?

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

@alfe.ai/agent-api-client 支持 ESM 还是 CommonJS?

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

@alfe.ai/agent-api-client 可以商用吗?

@alfe.ai/agent-api-client 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@alfe.ai/agent-api-client 的下载量有多少?

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

@alfe.ai/agent-api-client 还在维护吗?

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