A sophisticated multi-agent orchestration system implementing TRIZ (Theory of Inventive Problem Solving) methodology with Gemini-style streaming architecture.
- Multi-Agent Orchestration: Gemini-style async streaming with 5 specialized agents
- Chat Interface: Real-time web UI with Server-Sent Events
- REST APIs: Chat (streaming/non-streaming), Search, Problems management
- Vector Search: 79.6% accuracy using local Ollama embeddings
- Database: PostgreSQL with 16 comprehensive models via Prisma ORM
triz-agent-project/
βββ src/
β βββ routes/ # SvelteKit pages & API endpoints
β β βββ api/
β β β βββ chat/ # Chat API with SSE streaming
β β β βββ search/ # Vector search endpoint
β β β βββ problems/ # Problem CRUD operations
β β β βββ workflows/ # Workflow management
β β βββ chat/ # Web chat interface
β β βββ problems/ # Problem management UI
β β βββ search/ # Search interface
β βββ lib/
β βββ server/
β β βββ orchestration/
β β β βββ gemini-style-orchestrator.ts
β β βββ services/
β β β βββ agents/ # 5 TRIZ agents
β β β βββ vector-database.service.ts
β β βββ workflow/ # Workflow manager
β βββ cli/ # CLI interface
β βββ types/ # TypeScript definitions
βββ prisma/
β βββ schema.prisma # Database schema (16 models)
βββ scripts/ # Utility scripts
βββ tests/ # Test files
βββ docs/ # Documentation
- PostgreSQL 14+
- Node.js 18+
- Ollama (for local embeddings)
- Gemini API key
# 1. Clone repository
git clone <repository-url>
cd triz-agent-project
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
# 4. Setup database
npx prisma generate
npx prisma db push
# 5. Start Ollama
ollama serve
ollama pull nomic-embed-text
# 6. Seed TRIZ principles
node scripts/seed-principles.js
# 7. Start application
npm run devAccess the application at: http://localhost:5173
- Problem Analysis Agent - Extracts constraints and requirements
- Contradiction Identifier - Identifies technical/physical contradictions
- Solution Generator - Generates solutions using TRIZ principles
- Principle Applicator - Applies specific TRIZ principles
- Evaluation Agent - Evaluates and ranks solutions
# Non-streaming
curl -X POST http://localhost:5173/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "What is TRIZ?", "streaming": false}'
# Streaming (Server-Sent Events)
curl -X POST http://localhost:5173/api/chat \
-H "Content-Type: application/json" \
-d '{"message": "Explain segmentation principle", "streaming": true}'curl -X POST http://localhost:5173/api/search \
-H "Content-Type: application/json" \
-d '{"query": "segmentation", "type": "principles"}'# Create problem
curl -X POST http://localhost:5173/api/problems \
-H "Content-Type: application/json" \
-d '{
"title": "Weight Reduction Challenge",
"description": "Reduce component weight by 30%",
"industry": "Aerospace"
}'
# List problems
curl http://localhost:5173/api/problems- Frontend: SvelteKit, TypeScript, Tailwind CSS
- Backend: Node.js, Prisma ORM
- Database: PostgreSQL
- AI/ML: Gemini 2.0 Flash, Ollama (nomic-embed-text)
- Architecture: CSR (Controller-Service-Repository)
- Streaming: Async generators with Server-Sent Events
16 comprehensive models including:
- Core: Problem, Solution, TrizPrinciple, EngineeringParameter
- Analysis: ProblemAnalysis, Contradiction, Evaluation
- Knowledge: Patent, Material, CrossIndustryPattern
- Workflow: WorkflowSession, AgentLog
- Vector: VectorIndex for embeddings
Dark theme with custom colors:
- Primary:
#003135(dark-petrol) - Secondary:
#024950(teal-dark) - Accent:
#0FA4AF(cyan) - Text:
#AFDDE5(soft-blue)
- Vector Search Accuracy: 79.6%
- Response Time: < 100ms for search
- Streaming Latency: Real-time with SSE
- Database: 16 models, optimized indexes
# Run all tests
npm test
# Test specific components
node tests/test-system.js
node tests/test-agents.js
node tests/test-vector-search.js/src- Source code/prisma- Database schema/scripts- Utility scripts/tests- Test files/docs- Documentation/public- Static assets
- Authentication intentionally deferred to production phase
- Workflow endpoint has minor import issues (non-critical)
- Tailwind custom colors work but show warnings
- β Fixed all critical bugs (Prisma enums, async generators, imports)
- β Cleaned up duplicate files and organized project structure
- β All 5 TRIZ agents implemented and operational
- β Chat and Search APIs fully functional
- β Web interface working with real-time streaming
MIT License
- Follow CSR architectural pattern
- Use TypeScript throughout
- Maintain existing code style
- Add proper error handling
- Update documentation for API changes
For issues or questions, please open an issue on GitHub.
System Status: β Fully Operational | Version: 1.0.0 | Last Updated: September 7, 2025