
Product
Introducing Data Exports
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.
@ag-kit/adapter-adp
Advanced tools
Tencent Cloud ADP (Agent Development Platform) adapter for AG-Kit agents. This package provides integration between AG-Kit and Tencent Cloud's LKE (Large Knowledge Engine) service, enabling you to use ADP chatbots with AG-Kit's agent infrastructure.
npm install @ag-kit/agents @ag-kit/adapter-adp
Configure the following environment variables:
ADP_APP_KEY=your-adp-app-key # ADP application key, required if not passed in config when creating the agent
TENCENTCLOUD_SECRETID=your-tencent-cloud-secret-id
TENCENTCLOUD_SECRETKEY=your-tencent-cloud-secret-key
TENCENTCLOUD_SESSIONTOKEN=your-tencent-cloud-session-token # Optional, for temporary credentials
import { AdpAgent } from "@ag-kit/adapter-adp";
// Create the agent
const agent = new AdpAgent({
name: "my-adp-agent",
description: "A Tencent Cloud ADP chatbot agent",
adpConfig: {
appKey: process.env.ADP_APP_KEY, // Optional if set in env
},
});
import { AdpAgent } from "@ag-kit/adapter-adp";
const agent = new AdpAgent({
name: "my-adp-agent",
description: "An ADP agent with inline credentials",
adpConfig: {
appKey: "your-app-key", // Optional if ADP_APP_KEY env is set
credential: {
secretId: "your-secret-id", // Optional if TENCENTCLOUD_SECRETID env is set
secretKey: "your-secret-key", // Optional if TENCENTCLOUD_SECRETKEY env is set
token: "your-session-token", // Optional if TENCENTCLOUD_SESSIONTOKEN env is set
},
},
});
import { AdpAgent } from "@ag-kit/adapter-adp";
const agent = new AdpAgent({
name: "my-adp-agent",
description: "An ADP agent with custom config",
adpConfig: {
appKey: "your-app-key",
request: {
baseUrl: "https://wss.lke.cloud.tencent.com", // Custom base URL (leave empty for default value)
endpoint: "/v1/qbot/chat/sse", // Custom endpoint (leave empty for default value)
body: {
modelName: "gpt-4", // Specify model
searchNetwork: "enable", // Enable web search
workflowStatus: "enable", // Enable workflows
systemRole: "You are a helpful assistant", // Custom system prompt
},
},
},
});
import { randomUUID } from "crypto";
const runId = randomUUID();
const threadId = randomUUID();
const observable = agent.run({
runId,
threadId,
messages: [
{
id: randomUUID(),
role: "user",
content: "Hello, how can you help me?",
},
],
forwardedProps: {
// Request body options
visitorBizId: "user-123", // Visitor (User) ID
customVariables: {
key1: "value1",
},
},
});
observable.subscribe({
next: (event) => console.log(event),
complete: () => console.log("Done"),
error: (err) => console.error(err),
});
Agent class that extends AbstractAgent and connects to Tencent Cloud ADP services.
Constructor:
constructor(config: AgentConfig & { adpConfig: AdpConfig })
Configuration options for the ADP adapter.
interface AdpConfig {
appKey?: string; // ADP application key (optional if ADP_APP_KEY env is set)
credential?: {
secretId?: string; // Tencent Cloud secret ID (optional if TENCENTCLOUD_SECRETID env is set)
secretKey?: string; // Tencent Cloud secret key (optional if TENCENTCLOUD_SECRETKEY env is set)
token?: string; // Session token (optional if TENCENTCLOUD_SESSIONTOKEN env is set)
};
historyCount?: number; // Number of history messages to retrieve (reserved)
request?: {
baseUrl?: string; // Base URL for ADP API (default: https://wss.lke.cloud.tencent.com)
endpoint?: string; // API endpoint (default: /v1/qbot/chat/sse)
body?: Partial<AdpChatRequest>; // Additional request body options
};
}
For further information, please check the ADP product documentation.
interface AdpChatRequest {
streamingThrottle?: number; // Stream reply frequency control
customVariables?: Record<string, string>; // Custom parameters for workflows
systemRole?: string; // Role instructions (prompt)
incremental?: boolean; // Whether to output content incrementally
searchNetwork?: "" | "enable" | "disable"; // Web search toggle
modelName?: string; // Specify model name
stream?: "" | "enable" | "disable"; // Streaming toggle
workflowStatus?: "" | "enable" | "disable"; // Workflow toggle
}
The adapter emits the following AG-UI events:
RUN_STARTED / RUN_FINISHED / RUN_ERROR - Run lifecycle eventsTEXT_MESSAGE_CHUNK (TEXT_MESSAGE_START / TEXT_MESSAGE_CONTENT / TEXT_MESSAGE_END) - Streaming text response chunksTHINKING_START / THINKING_END - Thinking process boundariesTHINKING_TEXT_MESSAGE_START / THINKING_TEXT_MESSAGE_CONTENT / THINKING_TEXT_MESSAGE_END - Thinking content eventsTOOL_CALL_START / TOOL_CALL_ARGS / TOOL_CALL_END / TOOL_CALL_RESULT - Workflow tool call events@ag-ui/client: AG-UI client protocolaxios: HTTP client for API requestsrxjs: Reactive extensions for JavaScripttencentcloud-sdk-nodejs-lke: Tencent Cloud LKE SDKFAQs
ADP adapter for AG-Kit agents
The npm package @ag-kit/adapter-adp receives a total of 1 weekly downloads. As such, @ag-kit/adapter-adp popularity was classified as not popular.
We found that @ag-kit/adapter-adp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.

Research
/Security News
Docker and Socket have uncovered malicious Checkmarx KICS images and suspicious code extension releases in a broader supply chain compromise.