plazbot
Version:
Official Plazbot SDK for creating AI agents for WhatsApp, portals, and developers.
67 lines (66 loc) • 1.8 kB
TypeScript
export interface AgentOptions {
workspaceId: string;
apiKey: string;
zone: "LA" | "EU";
customUrl?: string;
}
export declare class Agent {
private workspaceId;
private apiKey?;
private mcpUrl;
private http;
constructor(options: AgentOptions);
addAgent(config: any): Promise<{
agentId: string;
success: boolean;
message: string;
}>;
updateAgent(agentId: string, config: any): Promise<{
success: boolean;
message: string;
}>;
enableWidget(params: {
id: string;
enable?: boolean;
}): Promise<{
success: boolean;
message: string;
script?: string;
}>;
deleteAgent(params: {
id: string;
}): Promise<{
success: boolean;
message: string;
}>;
getAgentById(params: {
id: string;
}): Promise<any>;
getAgents(): Promise<any[]>;
onMessage(params: {
agentId: string;
question: string;
sessionId: string;
file?: string;
multipleAnswers?: boolean;
}): Promise<any>;
addFile(params: {
fileUrl: string;
reference: string;
agentId: string;
tags?: string[];
}): Promise<any>;
validateFile(params: {
fileId: string;
}): Promise<any>;
deleteFile(params: {
fileId: string;
agentId: string;
}): Promise<any>;
setInstructions(agentId: string, instructions: any): Promise<void>;
setGreeting(agentId: string, greeting: string): Promise<void>;
setPersona(agentId: string, persona: any): Promise<void>;
setFallbacks(agentId: string, fallbacks: any): Promise<void>;
setRules(agentId: string, rules: any): Promise<void>;
setTags(agentId: string, tags: string[]): Promise<void>;
}