Phase 2.3: Agent Management Module
Backend: - agents_admin.py: 10 REST API endpoints for AI Agent CRUD - GET/POST/PUT/DELETE /admin/agents/ - Stats overview, reviews, available skills/models - Agent = MarketApp with type='agent' Frontend: - Agents.tsx: Full admin page (780 lines) - Stats dashboard, filterable table, create/edit modal - Config: system prompt, temperature, model, linked skills - api/index.ts: 10 new Agent API methods - App.tsx: /admin/agents route - AdminLayout.tsx: Agent management nav item
This commit is contained in:
1 parent
70dd2b69af
commit
a682dc687e
11 files changed
+4243
-1615
No files matched your search
@@ -222,12 +222,17 @@ export interface ModelProvider {
|
||||
protocol: string;
|
||||
apiKey: string;
|
||||
apiBaseUrl: string;
|
||||
// Support both snake_case and camelCase
|
||||
api_key?: string;
|
||||
api_base_url?: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
// AIModel: supports both camelCase (TypeScript) and snake_case (from backend API)
|
||||
export interface AIModel {
|
||||
id: string;
|
||||
// camelCase (TypeScript convention)
|
||||
providerId: string;
|
||||
providerName?: string;
|
||||
name: string;
|
||||
@@ -238,8 +243,22 @@ export interface AIModel {
|
||||
status: 'free' | 'paid';
|
||||
pricePerMillionTokens: number;
|
||||
isEnabled: boolean;
|
||||
isDefault?: boolean;
|
||||
totalCalls?: number;
|
||||
totalTokens?: number;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
// snake_case (from backend)
|
||||
provider_id?: string;
|
||||
provider_name?: string;
|
||||
api_key?: string;
|
||||
price_per_million_tokens?: number;
|
||||
is_enabled?: boolean;
|
||||
is_default?: boolean;
|
||||
total_calls?: number;
|
||||
total_tokens?: number;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface ProtocolDef {
|
||||
|
||||
Reference in new issue
Block a user