npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cicctencent/agent-core

v0.1.18

Published

Core engine for AI agent — LLM orchestration, tool execution, MCP, skill routing, security, and memory pipeline.

Readme

@cicctencent/agent-core

内部库,仅供项目内部使用,不对外发布。

AI Agent 核心引擎,提供 ReAct 循环编排、多 LLM 供应商抽象、工具注册与执行、MCP 协议集成、Skill 路由、安全守卫、渐进式记忆管道、A2A 协议互操作(流式事件透传),以及工具风险评估、审批管理、运行注册表、引擎复用池、JSON 存储、可观测性日志等应用级能力。

文档

快速开始

pnpm add @cicctencent/agent-core
import { AgentEngine, createLLMProvider, ToolRegistry, ContextManager } from '@cicctencent/agent-core';

const llm = createLLMProvider({ provider: 'openai', model: 'gpt-4o', apiKey: process.env.OPENAI_API_KEY! });
const toolRegistry = new ToolRegistry();
const engine = new AgentEngine({ llmProvider: llm, toolRegistry, contextManager: new ContextManager(), maxIterations: 10 });

for await (const event of engine.run({ sessionId: 'session-001', message: 'Hello' })) {
  if (event.type === 'message') process.stdout.write(event.content);
  if (event.type === 'done') console.log('\nDone:', event.content);
}

A2A 协议集成

支持将远程 A2A Agent 包装为 SubAgentRunner,与本地 Specialist 并列注册到 delegate_task

import { A2AClient, createA2ARemoteRunner, createDelegateTool } from '@cicctencent/agent-core';

const client = new A2AClient();
const card = await client.discoverAgent('https://remote-agent.example.com');

const remoteRunner = createA2ARemoteRunner({
  agentUrl: card.url,
  name: `[Remote] ${card.name}`,
  description: card.description,
  streaming: card.capabilities.streaming,
  client,
  skillId: 'specialist_123',  // 可选,供服务端路由到对应的 specialist
});

const delegateTool = createDelegateTool([localSpecialist, remoteRunner]);
if (delegateTool) registry.register(delegateTool);

核心特性

  • 事件透传:Core 不对 A2A SSE 事件做过滤,服务端发的所有事件均透传给调用方
  • 流式自动降级:远程不支持流式时自动回退到同步模式
  • 取消支持:流式传输支持 AbortSignal 外部取消
  • 心跳重置超时:逐次读取超时,心跳可重置计时器,适合长时间任务

详见 A2A 协议文档

构建

pnpm typecheck   # 类型检查
pnpm build       # 生成 .d.ts

运行时要求

Node.js >= 22