How codemie-ai/codemie works
CodeMie is the core backend for an AI-agent platform spanning software delivery, modernization, and business workflows. Its principal interaction is a user request entering the REST API, being resolved into an assistant execution, and using agents, tools, and configured language models to produce a response. A separate indexing path ingests enterprise knowledge for retrieval; management APIs and integrations support configuration, OAuth, and cloud-specific capabilities, while analytics and monitoring provide operational insight. The map combines README-documented capabilities with source-index evidence; unsampled subsystem links are omitted where their callers are not shown.
Main entry points: main.py REST API · assistant_engine_builder.py Assistant builder · agents Agent orchestration · llm_service.py LLM service
Components 21
API and assistants
- REST API
src/codemie/rest_api/main.py - User identity
src/codemie/rest_api/security/user.py - Assistant model
src/codemie/rest_api/models/assistant.py - Assistant builder
src/codemie/service/assistant/assistant_engine_builder.py
Agent runtime
- Agent orchestration
src/codemie/agents - Agent tools
src/codemie/agents/tools - LLM service
src/codemie/service/llm_service/llm_service.py - Model configuration
src/codemie/configs/llm_config.py - LiteLLM integration
src/codemie/enterprise/litellm
Knowledge and integrations
- Datasource processors
src/codemie/datasource - Content loaders
src/codemie/datasource/loader - Knowledge search
src/codemie/agents/tools/kb - Elasticsearch
src/codemie/clients/elasticsearch.py - Integration OAuth
src/codemie/service/oauth/flow_engine.py - Bedrock orchestration
src/codemie/service/aws_bedrock/bedrock_orchestration_service.py
Platform operations
- Usage analytics
src/codemie/service/analytics/query_pipeline.py - Metrics repository
src/codemie/repository/metrics_elastic_repository.py - LLM monitoring
src/codemie/service/monitoring/llm_proxy_monitoring_service.py - PostgreSQL
src/codemie/clients/postgres.py
Other components
- User
- Enterprise systems
Connections 19
- User → REST API: sends request
README.md - REST API → User identity: authenticates
- REST API → Assistant builder: runs assistant
- Assistant builder → Assistant model: reads configuration
src/codemie/service/assistant/assistant_engine_builder.py - Assistant builder → Agent orchestration: builds executors
- Agent orchestration → Agent tools: invokes tools
README.md - Agent orchestration → LLM service: requests models
- LLM service → Model configuration: uses settings
src/codemie/service/llm_service/llm_service.py - LLM service → LiteLLM integration: resolves providers
src/codemie/service/llm_service/llm_service.py - Datasource processors → Content loaders: loads content
src/codemie/datasource/base_llm_routing_processor.py - Datasource processors → Elasticsearch: indexes knowledge
src/codemie/datasource/base_llm_routing_processor.py - Agent tools → Knowledge search: includes search
README.md - Knowledge search → Elasticsearch: searches index
- Integration OAuth → Enterprise systems: authorizes access
- Bedrock orchestration → Assistant model: orchestrates agents
src/codemie/service/aws_bedrock/bedrock_orchestration_service.py - Usage analytics → Metrics repository: queries metrics
src/codemie/service/analytics/query_pipeline.py - Metrics repository → Elasticsearch: reads metrics
src/codemie/repository/metrics_elastic_repository.py - LLM monitoring → Enterprise systems: exports telemetry
- Assistant model → PostgreSQL: persists state
src/codemie/rest_api/models/assistant.py