Files
agentscope-ai--agentscope/examples/web_ui/frontend/src/api/agent.ts
T
wehub-resource-sync c3bf08ac8d
K8s Workspace Integration Tests / k8s-workspace-tests (push) Has been cancelled
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Web UI / check (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:27 +08:00

24 lines
721 B
TypeScript

import { client } from './client';
import type {
AgentListResponse,
AgentView,
AgentSchemaV2Response,
CreateAgentRequest,
CreateAgentResponse,
UpdateAgentRequest,
} from './types';
export const agentApi = {
list: () => client.get<AgentListResponse>('/agent/'),
getSchema: () => client.get<AgentSchemaV2Response>('/agent/schema/v2'),
create: (body: CreateAgentRequest, options?: { silent?: boolean }) =>
client.post<CreateAgentResponse>('/agent/', body, undefined, options),
update: (agentId: string, body: UpdateAgentRequest, options?: { silent?: boolean }) =>
client.patch<AgentView>(`/agent/${agentId}`, body, undefined, options),
delete: (agentId: string) => client.delete(`/agent/${agentId}`),
};