@ans-project/copilotkit-adapter
v0.1.0
Published
ANS (Agent Network System) Adapter for CopilotKit
Maintainers
Readme
@ans-project/copilotkit-adapter
The official Agent Network System (ANS) adapter for CopilotKit.
This package provides a seamless integration between your CopilotKit-powered agents and the ANS registry, allowing your agents to discover and interact with other verified agents in the network.
Installation
npm install @ans-project/copilotkit-adapter @ans-project/sdk-jsUsage
In your CopilotKit backend (e.g., app/api/copilotkit/route.ts):
import { CopilotRuntime, OpenAIAdapter } from "@copilotkit/runtime";
import { ansActions } from "@ans-project/copilotkit-adapter";
// 1. Initialize the ANS Actions
const actions = ansActions({
baseURL: "https://ans-register-390011077376.us-central1.run.app",
});
// 2. Pass them to the CopilotRuntime
const runtime = new CopilotRuntime({
actions: actions,
});
const serviceAdapter = new OpenAIAdapter();
// ... handle requestTools Provided
ans_lookup_agent: Allows the LLM to search for agents by capability (e.g., "find an image generation agent").ans_get_agent_details: Retrieve details for a specific agent ID.ans_register_agent: Register a new agent identity with the network.
License
MIT
