返回 Skill 列表
extension
分类: 内容与媒体无需 API Key

libagent

libagent - 用于会话AI的代理编排库。AgentMind类协调LLM补全、记忆管理、工具执行和多轮对话。AgentAction处理工具调用和动作处理。可用于构建聊天代理、RAG管道和AI助手。与libmemory、librpc和libllm集成。

person作者: jakexiaohubgithub

libagent Skill

When to Use

  • Building conversational AI agents with tool capabilities
  • Coordinating LLM completions with memory context
  • Processing multi-turn conversations with state
  • Implementing RAG (retrieval-augmented generation) pipelines

Key Concepts

AgentMind: Core reasoning engine that processes requests through LLM completions, manages conversation state, and coordinates tool execution.

AgentAction: Handles individual tool calls, executes actions, and returns results to the conversation flow.

Usage Patterns

Pattern 1: Basic agent request

import { AgentMind } from "@copilot-ld/libagent";

const mind = new AgentMind(memoryClient, llmClient, toolClient);
const response = await mind.process({
  resourceId: conversationId,
  content: "What is the weather?",
});

Pattern 2: Streaming responses

for await (const chunk of mind.stream(request)) {
  process.stdout.write(chunk.content);
}

Integration

Works with libmemory for context windows, librpc for gRPC clients, and libllm for completions. Used by the Agent service.