feat: Day 10-11 - Agent Configuration System completed

Backend:
- Create agents.yaml config file with 12 agents definition
- Create Prompt templates for topic-evaluation agent
- Implement agentService.ts for loading and managing agent configs
- Create agentController.ts with CRUD operations
- Create agent routes (GET /agents, /agents/:id, etc.)
- Register agent routes in main server

Frontend:
- Create agentApi.ts service module
- Update AgentChatPage to dynamically load agent config from API
- Add loading state and error handling
- Display agent details (description, category, model)

Build: Both frontend and backend build successfully
This commit is contained in:
AI Clinical Dev Team
2025-10-10 20:13:08 +08:00
parent 59522eaab7
commit 864a0b1906
13 changed files with 1077 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ import cors from '@fastify/cors';
import { config } from './config/env.js';
import { testDatabaseConnection, prisma } from './config/database.js';
import { projectRoutes } from './routes/projects.js';
import { agentRoutes } from './routes/agents.js';
const fastify = Fastify({
logger: {
@@ -55,6 +56,9 @@ fastify.get('/api/v1', async () => {
// 注册项目管理路由
await fastify.register(projectRoutes, { prefix: '/api/v1' });
// 注册智能体管理路由
await fastify.register(agentRoutes, { prefix: '/api/v1' });
// 启动服务器
const start = async () => {
try {