feat(agent): Refactor search agents and implement SpeedSearchAgent
- Updated FileSearchAgent to improve code readability and formatting. - Refactored SynthesizerAgent for better prompt handling and document processing. - Enhanced TaskManagerAgent with clearer file context handling. - Modified AgentSearch to maintain consistent parameter formatting. - Introduced SpeedSearchAgent for optimized search functionality. - Updated metaSearchAgent to support new SpeedSearchAgent. - Improved file processing utilities for better document handling. - Added test attachments for sporting events queries.
This commit is contained in:
parent
de3d26fb15
commit
d66300e78e
19 changed files with 832 additions and 996 deletions
11
.github/copilot-instructions.md
vendored
11
.github/copilot-instructions.md
vendored
|
|
@ -15,6 +15,7 @@ The system works through these main steps:
|
|||
## Architecture Details
|
||||
|
||||
### Technology Stack
|
||||
|
||||
- **Frontend**: React, Next.js, Tailwind CSS
|
||||
- **Backend**: Node.js
|
||||
- **Database**: SQLite with Drizzle ORM
|
||||
|
|
@ -23,29 +24,31 @@ The system works through these main steps:
|
|||
- **Content Processing**: Mozilla Readability, Cheerio, Playwright
|
||||
|
||||
### Database (SQLite + Drizzle ORM)
|
||||
|
||||
- Schema: `src/lib/db/schema.ts`
|
||||
- Tables: `messages`, `chats`, `systemPrompts`
|
||||
- Configuration: `drizzle.config.ts`
|
||||
- Local file: `data/db.sqlite`
|
||||
|
||||
### AI/ML Stack
|
||||
|
||||
- **LLM Providers**: OpenAI, Anthropic, Groq, Ollama, Gemini, DeepSeek, LM Studio
|
||||
- **Embeddings**: Xenova Transformers, similarity search (cosine/dot product)
|
||||
- **Agents**: `webSearchAgent`, `analyzerAgent`, `synthesizerAgent`, `taskManagerAgent`
|
||||
|
||||
### External Services
|
||||
|
||||
- **Search Engine**: SearXNG integration (`src/lib/searxng.ts`)
|
||||
- **Configuration**: TOML-based config file
|
||||
|
||||
### Data Flow
|
||||
|
||||
1. User query → Task Manager Agent
|
||||
2. Web Search Agent → SearXNG → Content extraction
|
||||
3. Analyzer Agent → Content processing + embedding
|
||||
4. Synthesizer Agent → LLM response generation
|
||||
5. Response with cited sources
|
||||
|
||||
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `/src/app`: Next.js app directory with page components and API routes
|
||||
|
|
@ -117,22 +120,26 @@ When working on this codebase, you might need to:
|
|||
## Code Style & Standards
|
||||
|
||||
### TypeScript Configuration
|
||||
|
||||
- Strict mode enabled
|
||||
- ES2017 target
|
||||
- Path aliases: `@/*` → `src/*`
|
||||
- No test files (testing not implemented)
|
||||
|
||||
### Formatting & Linting
|
||||
|
||||
- ESLint: Next.js core web vitals rules
|
||||
- Prettier: Use `npm run format:write` before commits
|
||||
- Import style: Use `@/` prefix for internal imports
|
||||
|
||||
### File Organization
|
||||
|
||||
- Components: React functional components with TypeScript
|
||||
- API routes: Next.js App Router (`src/app/api/`)
|
||||
- Utilities: Grouped by domain (`src/lib/`)
|
||||
- Naming: camelCase for functions/variables, PascalCase for components
|
||||
|
||||
### Error Handling
|
||||
|
||||
- Use try/catch blocks for async operations
|
||||
- Return structured error responses from API routes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue