@fleek-platform/agents-ui
Version:
The Fleek Platform Agents UI provides a simple interface for deploying, monitoring, and configuring your agents––making management straightforward
265 lines (264 loc) • 8.18 kB
TypeScript
import { type PersonaGenApiVersions } from '@utils/url';
import type { CharacterfileSchema } from '@base/config/schema';
import type { ChatMessage } from '@base/pages/agentDraft/useAgentDraftStore';
export type CreateAgentDraftParams = {
projectId?: string;
characterfile?: string;
accessToken?: string;
name?: string;
avatar?: string;
frameworkVersion?: string;
};
export declare const createAgentDraft: import("./withSafeApi").Handler<CreateAgentDraftParams, AiAgent>;
export declare const deployAgent: import("./withSafeApi").Handler<{
projectId?: string;
characterfile?: string;
avatar?: string;
accessToken: string;
draftId?: string;
frameworkVersion?: string;
managedModelName?: string;
tee?: boolean;
}, string>;
type DeploymentStepStatus = 'true' | 'false';
export type DeploymentStatus = Record<string, DeploymentStepStatus>;
export type AiAgentStatus = 'Draft' | 'Created' | 'Pending' | 'Running' | 'Stopped' | 'Failed';
export type AiAgent = {
avatar?: string;
status: AiAgentStatus;
frameworkVersion?: string;
frameworkName?: string;
characterFile: string;
createdAt: string;
createdBy: string;
deletedAt?: string;
host: string;
id: string;
name: string;
projectId: string;
slotNumber: number;
updatedAt: string;
publicToken: string;
publicChat: boolean;
tee?: boolean;
};
export declare const getAgentsByProjectId: import("./withSafeApi").Handler<{
projectId?: string;
accessToken?: string;
}, AiAgent[]>;
export type GetSubscriptionsRequestProps = {
projectId?: string;
accessToken?: string;
};
export type SubscriptionItem = {
quantity: number;
id: string;
metadata?: Record<string, string>;
productId: string;
unitAmount: number;
priceId: string;
usageType: string;
};
export type Subscription = {
id: string;
status: string;
startDate: string;
periodStartDate: string;
periodEndDate: string;
productId: string;
endDate?: string | null;
items: SubscriptionItem[];
scheduleId: string;
};
export declare const getSubscriptions: import("./withSafeApi").Handler<GetSubscriptionsRequestProps, Subscription[]>;
export type CreateSubscriptionCheckoutRequestProps = {
projectId?: string;
productId?: string;
accessToken?: string;
referralId?: string;
};
export declare const createSubscriptionCheckout: import("./withSafeApi").Handler<CreateSubscriptionCheckoutRequestProps, string>;
export type GetPlansRequestProps = {
accessToken?: string;
};
export type Plan = {
id: string;
name: string;
description: string | null;
price: number;
createdAt: string;
updatedAt: string;
metadata: Record<string, string>;
};
export declare const getPlans: import("./withSafeApi").Handler<GetPlansRequestProps, Plan[]>;
export interface GetAgentLogsParams {
agentId: string;
accessToken: string;
pageCursor?: string;
pageSize?: number;
}
export type AgentLog = {
id: number;
timestamp: number;
message: string;
priority: number;
};
export type PaginatedResponse<DataType> = {
data: DataType[];
next_page: string;
prev_page: string;
};
export declare const getAgentLogs: import("./withSafeApi").Handler<GetAgentLogsParams, PaginatedResponse<AgentLog>>;
export interface GetAgentAttestationParams {
agentId: string;
}
export type AgentAttestation = Uint8Array<ArrayBufferLike>;
export declare const getAgentAttestation: import("./withSafeApi").Handler<GetAgentAttestationParams, AgentAttestation>;
export declare const getAgentStatus: import("./withSafeApi").Handler<{
accessToken?: string;
agentId: string;
}, "true" | "false">;
export declare const updateAgentById: import("./withSafeApi").Handler<{
accessToken?: string;
agentId: string;
payload: string;
}, AiAgent>;
export type ChangeAgentStatusAction = 'start' | 'stop';
export declare const changeAgentStatus: import("./withSafeApi").Handler<{
agentId: string;
accessToken?: string;
action: ChangeAgentStatusAction;
}, void>;
export type DeleteAgentParams = {
id: string;
accessToken?: string;
};
export declare const deleteAgent: import("./withSafeApi").Handler<DeleteAgentParams, string>;
export type ApiTokenResponse = {
id: string;
name: string;
token_prefix: string;
created_at: string;
expires_at: string | null;
last_used_at: string | null;
token: string | null;
};
export declare const getApiTokens: import("./withSafeApi").Handler<{
accessToken?: string;
}, ApiTokenResponse[]>;
export type CreateApiTokenPayload = {
expires_in_days: string | null;
name: string;
};
export declare const createApiToken: import("./withSafeApi").Handler<{
accessToken?: string;
payload: CreateApiTokenPayload;
}, ApiTokenResponse>;
export declare const deleteApiToken: import("./withSafeApi").Handler<{
accessToken?: string;
tokenId: string;
}, void>;
export type UpdateSubscriptionParams = {
subscriptionId?: string;
projectId?: string;
productId?: string;
accessToken?: string;
quantity?: number;
};
export declare const updateSubscription: import("./withSafeApi").Handler<UpdateSubscriptionParams, Subscription>;
interface GetElizaAgentParams {
agentId?: string;
accessToken?: string;
timeout?: number;
version?: PersonaGenApiVersions;
}
export interface Agent {
id: string;
name: string;
clients: string[];
}
export interface AgentsData {
agents: Agent[];
}
export declare const getElizaAgent: import("./withSafeApi").Handler<GetElizaAgentParams, AgentsData>;
interface SendMessageParams {
agentId: string;
agentElizaId: string;
accessToken?: string;
message: string;
version?: PersonaGenApiVersions;
}
export declare const sendMessageAgent: import("./withSafeApi").Handler<SendMessageParams, {
user: string;
text: string;
action: string;
}[]>;
export type ElizaVersionResponse = {
name: string;
versions: string[];
};
export declare const getElizaOsVersions: import("./withSafeApi").Handler<{
accessToken?: string;
}, ElizaVersionResponse>;
export type Project = {
id: string;
name: string;
avatar: string | null;
};
export declare const getProjects: import("./withSafeApi").Handler<{
accessToken?: string;
}, Project[]>;
interface GetModelsParams {
accessToken?: string;
}
export declare const getModels: import("./withSafeApi").Handler<GetModelsParams, string[]>;
type GetCreditsRequestProps = {
accessToken?: string;
projectId?: string;
};
type Credits = {
balance: number;
projectId: string;
teamId: string;
};
export declare const getCredits: import("./withSafeApi").Handler<GetCreditsRequestProps, Credits>;
type CreateCreditsCheckoutProps = {
accessToken?: string;
projectId?: string;
};
type CreditsCheckoutResponse = {
url: string;
};
export declare const createCreditsCheckout: import("./withSafeApi").Handler<CreateCreditsCheckoutProps, CreditsCheckoutResponse>;
export type CreateSubscriptionRequestProps = {
projectId?: string;
productId?: string;
accessToken?: string;
referralId?: string;
};
export declare const createSubscription: import("./withSafeApi").Handler<CreateSubscriptionRequestProps, Subscription>;
export type UpdateSubscriptionQuantityProps = {
subscriptionId: string;
projectId?: string;
accessToken?: string;
updateBy: number;
};
export declare const updateSubscriptionQuantity: import("./withSafeApi").Handler<UpdateSubscriptionQuantityProps, Subscription>;
export declare const sendAssistantMessageStream: import("./withSafeApi").Handler<{
content: string;
messages: ChatMessage[];
accessToken?: string;
version?: PersonaGenApiVersions;
}, ReadableStreamDefaultReader<Uint8Array<ArrayBufferLike>> | undefined>;
export declare const generateCharacterfile: import("./withSafeApi").Handler<{
messages: unknown[];
accessToken?: string;
version?: PersonaGenApiVersions;
}, {
apiKey: string;
baseURL: string;
data: CharacterfileSchema;
model: string;
status: "success";
}>;
export {};