AI Layer Architecture
Codmir uses a 6-layer cognitive architecture to optimize AI responses based on complexity, latency requirements, and resource needs.
Layer Pyramid
AI Layer Architecture6 layers
L5Orchestrator
7120s+
L4Analysis
660s
L3Deep
830s
L2Standard
65s
L1Fast
6500ms
L0Instant
750ms
Local: L0-L2Remote: L3-L5
Key Concepts
- ●Local Layers (L0-L2)
Fast responses under 5 seconds. Run on edge or local infrastructure.
- ●Remote Layers (L3-L5)
Heavy processing over 30 seconds. Require cloud GPU or multi-agent orchestration.
Layer Details
L0
Instant
(50ms)LocalCache hits, pattern matching, instant responses
Cached answersPattern recognitionQuick lookups
L1
Fast
(500ms)LocalLightweight LLM for simple tasks and quick completions
Simple Q&AText completionQuick classification
L2
Standard
(5s)LocalBalanced processing with routing decisions
Complex queriesMulti-step tasksContext building
L3
Deep
(30s)RemoteChain-of-thought reasoning for complex problems
Code analysisProblem solvingDetailed explanations
L4
Analysis
(60s)RemoteDeep code analysis, search, and RAG operations
Codebase searchDocument retrievalSemantic analysis
L5
Orchestrator
(120s+)RemoteMulti-agent coordination and GPU-intensive tasks
Agent swarmsComplex workflowsGPU operations
Intelligent Routing
The AI automatically routes requests to the appropriate layer based on:
Request Analysis
- • Query complexity
- • Required context depth
- • Tool requirements
Resource Optimization
- • Latency constraints
- • Cost efficiency
- • Available capacity