Skip to main content

CodeMie API Configuration Reference

This document provides a comprehensive reference for all configuration parameters available in the CodeMie API.

These parameters control application behavior, AI provider integrations, tools configuration, storage, security, and more. Configure them through environment variables or .env files.

Core Application Settings

These settings control fundamental application behavior, deployment environment, and runtime characteristics.

Application Metadata

ParameterTypeDefaultDescription
APP_VERSIONstring"0.16.0"Application version displayed in UI and logs for tracking deployments
ENVstring"local"Deployment environment identifier affecting logging format and feature flags
MODELS_ENVstring"dial"LLM configuration profile to load (points to llm-{value}-config.yaml)
LOG_LEVELstring"INFO"Minimum log severity to output; use DEBUG for troubleshooting, INFO for production
TIMEZONEstring"UTC"System timezone for timestamp normalization across distributed components
API_ROOT_PATHstring""URL prefix for API endpoints when behind reverse proxy (e.g., /api/v1)
WORKERSinteger1Uvicorn worker processes; increase for production to handle concurrent requests

Callback Configuration

ParameterTypeDefaultDescription
CALLBACK_API_BASE_URLstring"http://host.docker.internal:8080"Base URL for asynchronous webhook callbacks from external services

Mermaid Diagram Rendering

Converts Mermaid diagram syntax to images for documentation and visualizations.

ParameterTypeDefaultDescription
MERMAID_SERVER_URLstring"http://localhost:8082"Local Mermaid rendering service URL for diagram generation
MERMAID_SERVER_TIMEOUTinteger50Max seconds to wait for diagram rendering before timeout
MERMAID_USE_MERMAID_INCbooleanfalseUse public Mermaid Inc. service (requires outbound internet connection) or locally installed server

Agent-to-Agent (A2A) Communication

Enable CodeMie agents to communicate with external AI agents and services.

ParameterTypeDefaultDescription
A2A_AGENT_CARD_FETCH_TIMEOUTfloat30.0Max seconds to fetch agent capability cards for discovery
A2A_AGENT_REQUEST_TIMEOUTfloat30.0Max seconds to wait for responses from external agents

Platform & Marketplace

Configure marketplace integration for sharing and discovering assistants.

ParameterTypeDefaultDescription
PLATFORM_MARKETPLACE_DATASOURCE_NAMEstring"marketplace_assistants"Datasource name for marketplace assistant catalog
PLATFORM_DATASOURCES_SYNC_ENABLEDbooleanfalseAutomatically sync platform datasources on startup

State Management & Import/Export

Configure data migration, backup, and state import/export capabilities.

ParameterTypeDefaultDescription
STATE_IMPORT_DIRstring"./state_import"Directory containing state files for bulk import
STATE_IMPORT_ENABLEDbooleanfalseEnable state import on startup (for migrations)
CODEMIE_EXPORT_ROOTstring"/app"Root path for exported data and backups
THREAD_POOL_MAX_WORKERSinteger5Worker threads for parallel background tasks

Feature Flags & Experimental Features

Enable or disable experimental features and beta functionality.

ParameterTypeDefaultDescription
AMNA_AIRN_PRECREATE_WORKFLOWSbooleanfalsePre-create AMNA-AIRN workflows on deployment (beta feature)
LLM_REQUEST_ADD_MARKDOWN_PROMPTbooleantrueAdd markdown formatting hint to improve LLM output structure

Support & Help

ParameterTypeDefaultDescription
CODEMIE_SUPPORTstring"https://epa.ms/codemie-support"URL for user support and documentation portal

Configuration File Paths

These parameters define paths to configuration files and directories. Typically auto-detected and rarely need manual configuration.

ParameterTypeDefaultDescription
PROJECT_ROOTPathAuto-detectedProject root directory (auto-detected from installation)
LLM_TEMPLATES_ROOTPathconfig/llmsDirectory containing LLM model configuration YAML files
DATASOURCES_CONFIG_DIRPathconfig/datasourcesDatasource connector definitions and schemas
ASSISTANT_TEMPLATES_DIRPathconfig/templates/assistantPre-built assistant templates for quick setup
WORKFLOW_TEMPLATES_DIRPathconfig/templates/workflowWorkflow templates for common automation patterns
CUSTOMER_CONFIG_DIRPathconfig/customerCustomer-specific customizations and branding
ASSISTANT_CATEGORIES_CONFIG_DIRPathconfig/categoriesAssistant categorization and organization
AUTHORIZED_APPS_CONFIG_DIRPathconfig/authorized_applicationsExternal application access control definitions
INDEX_DUMPS_DIRPathconfig/index-dumpsPre-built index snapshots for faster deployment
ALEMBIC_MIGRATIONS_DIRPathexternal/alembicDatabase schema migration scripts
ALEMBIC_INI_PATHPathexternal/alembic/alembic.iniAlembic database migration configuration

AI Providers Configuration

Configure connections to AI model providers. At least one provider must be configured for CodeMie to function.

OpenAI / Azure OpenAI

For LLMs and embedding models via Azure OpenAI Service.

ParameterTypeDefaultDescription
OPENAI_API_TYPEstring"azure"Provider type: azure for Azure OpenAI, openai for direct OpenAI API
OPENAI_API_VERSIONstring"2024-12-01-preview"Azure OpenAI API version; update to access new features or model capabilities
AZURE_OPENAI_API_KEYstring""Authentication key from Azure OpenAI resource (required for Azure deployments)
AZURE_OPENAI_URLstring""Azure OpenAI endpoint URL from resource overview page
AZURE_OPENAI_MAX_RETRIESinteger5Retry attempts for failed requests due to rate limits or transient errors

Anthropic (Claude)

For Claude (Sonnet and Haiku models) via Anthropic's native API.

ParameterTypeDefaultDescription
ANTHROPIC_API_KEYstring""API key from Anthropic Console (required for direct Anthropic access)
ANTHROPIC_MAX_RETRIESinteger2Retry attempts; lower default due to Anthropic's robust infrastructure

AWS Bedrock

For Claude, Llama, Titan, and other models via AWS Bedrock managed service.

ParameterTypeDefaultDescription
AWS_BEDROCK_MAX_RETRIESinteger5Retry attempts for throttled or failed Bedrock API calls
AWS_BEDROCK_READ_TIMEOUTinteger60000Request timeout in milliseconds; increase for long-running generations
AWS_BEDROCK_REGIONstring""AWS region hosting Bedrock service (e.g., us-east-1, us-west-2)

Google Vertex AI

For Gemini, and Claude via Google Cloud's Vertex AI platform.

ParameterTypeDefaultDescription
GOOGLE_VERTEXAI_REGIONstring""Region for Vertex AI models (e.g., us-central1, europe-west4)
GOOGLE_CLAUDE_VERTEXAI_REGIONstring""Separate region for Claude on Vertex AI if different from main region
GOOGLE_VERTEXAI_MAX_RETRIESinteger5Retry attempts for rate-limited or failed Vertex AI requests
GOOGLE_PROJECT_IDstring""GCP project ID where Vertex AI is enabled
GOOGLE_REGIONstring""Default GCP region for all Google services
GCP_API_KEYstring""Base64-encoded service account JSON key for GCP authentication

Additional AI Service Integrations

Additional AI services for multimodal capabilities beyond text generation.

DALL-E Image Generation

Enables AI-generated images for visual content creation within assistants.

ParameterTypeDefaultDescription
DALLE_API_URLstring""Endpoint URL for DALL-E image generation API
DALLE_API_KEYstring""Authentication key for DALL-E service access

Speech-to-Text (STT)

Converts voice input to text for conversational interfaces and voice commands.

ParameterTypeDefaultDescription
STT_API_URLstring""Whisper or compatible STT service endpoint
STT_API_KEYstring""Authentication key for STT service
STT_API_DEPLOYMENT_NAMEstring""Azure-specific deployment identifier if using Azure Speech
STT_MODEL_NAMEstring""Model variant (e.g., whisper-1) to use for transcription

Azure Speech Services

Microsoft's speech-to-text and text-to-speech services for Azure deployments.

ParameterTypeDefaultDescription
AZURE_SPEECH_REGIONstring""Azure region for Speech resource (e.g., eastus, westeurope)
AZURE_SPEECH_SERVICE_KEYstring""Subscription key from Azure Speech resource

Database Configuration

Configure persistent data storage for conversations, users, workflows, and application state.

PostgreSQL

Primary relational database for structured data and transactional operations.

ParameterTypeDefaultDescription
POSTGRES_HOSTstring"localhost"PostgreSQL server hostname or IP address
POSTGRES_PORTinteger5432PostgreSQL server port
POSTGRES_DBstring"postgres"Database name for CodeMie tables and data
POSTGRES_USERstring"postgres"Database username with read/write permissions
POSTGRES_PASSWORDstring"password"Database password (use secrets manager in production)
PG_URLstring""Complete connection string (overrides individual params if set)
PG_POOL_SIZEinteger10Connection pool size; increase for high concurrency workloads
DEFAULT_DB_SCHEMAstring"codemie"PostgreSQL schema for organizing CodeMie tables

Elasticsearch

Document store for full-text search, analytics, and unstructured data.

ParameterTypeDefaultDescription
ELASTIC_URLstring"http://localhost:9200"Elasticsearch cluster endpoint URL
ELASTIC_PASSWORDstring""Password for elastic user or configured username
ELASTIC_USERNAMEstring""Username for Elasticsearch authentication

Elasticsearch Indexes

Index names for different data types. Customize to avoid collisions in shared clusters.

ParameterTypeDefaultDescription
ELASTIC_APPLICATION_INDEXstring"applications"Indexed applications and their metadata
ELASTIC_GIT_REPO_INDEXstring"repositories"Code repository metadata and indexing status
ELASTIC_LOGS_INDEXstring"codemie_infra_logs*"Infrastructure logs pattern for monitoring and debugging
FEEDBACK_INDEX_NAMEstring"ca_feedback"User feedback and ratings on AI responses
BACKGROUND_TASKS_INDEXstring"background_tasks"Async task queue and execution status
USER_CONVERSATION_INDEXstring"codemie_raw_user_conversations"Complete conversation history and messages
USER_CONVERSATION_FOLDER_INDEXstring"codemie_conversation_folder"Folder organization for conversation management
CONVERSATIONS_METRICS_INDEXstring"codemie_conversation_metrics"Analytics data on conversation usage and performance
SHARED_CONVERSATION_INDEXstring"codemie_shared_conversations"Conversations shared across users or teams
KZ_USERS_INDEXstring"codemie_kz_users_data"User profiles and searchable user data
ASSISTANTS_INDEXstring"codemie_assistants"Assistant definitions, configurations, and templates
WORKFLOWS_INDEXstring"workflows"Workflow definitions and templates
SETTINGS_INDEXstring"codemie_user_settings"User preferences and personalization data
USER_DATA_INDEXstring"codemie_user_data"Additional user-related data and metadata
INDEX_STATUS_INDEXstring"index_status"Status tracking for repository and datasource indexing
PROVIDERS_INDEXstring"providers"AI provider configurations and availability
WORKFLOW_EXECUTION_INDEXstring"workflows_execution_history"Historical workflow runs and outcomes
WORKFLOW_EXECUTION_STATE_INDEXstring"workflows_execution_states"Current state of running workflows
WORKFLOW_EXECUTION_STATE_THOUGHTS_INDEXstring"workflows_execution_state_thoughts"Workflow reasoning and decision logs
TOOLS_INDEX_NAMEstring"codemie_tools"Semantic index for intelligent tool selection
INDEXES_PERMITTED_FOR_SEARCHlist[string]["codemie_kz_users_data"]Indexes accessible via general search API

File Storage Configuration

Configure where and how CodeMie stores uploaded files, attachments, and generated content.

General Storage Settings

ParameterTypeDefaultDescription
FILES_STORAGE_TYPEstring"filesystem"Storage backend: filesystem (local on pod), aws (S3), azure (blob), gcp (bucket)
FILES_STORAGE_DIRstring"./codemie-storage"Local directory path when using filesystem storage type
FILES_STORAGE_MAX_UPLOAD_SIZEinteger104857600Maximum file size in bytes (100 MB default); increase for large document processing
REPOS_LOCAL_DIRstring"./codemie-repos"Directory for cloned Git repositories during code indexing

Cloud Storage - AWS S3

Configuration for Amazon S3 storage backend (requires FILES_STORAGE_TYPE=aws).

ParameterTypeDefaultDescription
AWS_S3_REGIONstring""S3 bucket region (e.g., us-east-1) for low-latency access
AWS_S3_BUCKET_NAMEstring""S3 bucket name for user files and attachments
CODEMIE_STORAGE_BUCKET_NAMEstring"codemie-global-storage"Bucket for system-level shared assets and resources

Cloud Storage - Azure Blob

Configuration for Azure Blob Storage backend (requires FILES_STORAGE_TYPE=azure).

ParameterTypeDefaultDescription
AZURE_STORAGE_CONNECTION_STRINGstring""Complete connection string from Azure Storage account
AZURE_STORAGE_ACCOUNT_NAMEstring""Storage account name for alternative authentication methods

Cloud Storage - GCP

Configuration for Google Cloud Storage backend (requires FILES_STORAGE_TYPE=gcp).

ParameterTypeDefaultDescription
FILES_STORAGE_GCP_REGIONstring"US"Multi-region or region for Cloud Storage buckets

Security & Encryption

Protect sensitive data at rest using cloud key management services or HashiCorp Vault.

Encryption Configuration

ParameterTypeDefaultDescription
ENCRYPTION_TYPEstring"plain"Encryption method: plain (none), aws (KMS), azure (Key Vault), gcp (Cloud KMS), vault (HashiCorp Vault with Transit Engine)

AWS KMS

Encrypt secrets and sensitive data using AWS Key Management Service.

ParameterTypeDefaultDescription
AWS_KMS_KEY_IDstring""KMS key ID or ARN for encryption/decryption operations
AWS_KMS_REGIONstring""AWS region where KMS key is located

Azure Key Vault

Encrypt data using Azure Key Vault's encryption keys and secrets management.

ParameterTypeDefaultDescription
AZURE_KEY_VAULT_URLstring""Key Vault URL (e.g., https://mykeyvault.vault.azure.net/)
AZURE_KEY_NAMEstring""Name of encryption key within Key Vault
AZURE_SUBSCRIPTION_IDstring""Azure subscription ID for service principal authentication
AZURE_TENANT_IDstring""Azure AD tenant ID for authentication
AZURE_CLIENT_IDstring""Service principal application (client) ID
AZURE_CLIENT_SECRETstring""Service principal secret for authentication

GCP KMS

Encrypt data using Google Cloud Key Management Service.

ParameterTypeDefaultDescription
GOOGLE_KMS_PROJECT_IDstringUses GOOGLE_PROJECT_IDGCP project containing KMS resources
GOOGLE_KMS_KEY_RINGstring"codemie"Key ring grouping encryption keys
GOOGLE_KMS_CRYPTO_KEYstring"codemie"Specific crypto key for encryption operations
GOOGLE_KMS_REGIONstringUses GOOGLE_REGIONRegion where KMS key ring is located

HashiCorp Vault

Encrypt data using Vault's Transit secrets engine for centralized key management.

ParameterTypeDefaultDescription
VAULT_URLstring""Vault server URL (e.g., https://vault.company.com:8200)
VAULT_TOKENstring""Authentication token with transit engine permissions
VAULT_NAMESPACEstring""Vault namespace for multi-tenant deployments
VAULT_TRANSIT_KEY_NAMEstring"codemie"Transit engine key name for encryption
VAULT_TRANSIT_MOUNT_POINTstring"transit"Mount path for Transit secrets engine

Identity & Access Management

Configure authentication providers and access control for users and administrators.

IDP Configuration

ParameterTypeDefaultDescription
IDP_PROVIDERstring"local"Identity provider: keycloak (recommended), local (for development), oidc (generic OIDC for specific client needs)
KEYCLOAK_LOGOUT_URLstring""Keycloak logout endpoint for proper session termination
ADMIN_USER_IDstring""User ID to automatically grant admin privileges on startup
ADMIN_ROLE_NAMEstring"admin"Role name identifying administrators in the system

External User Configuration

Control access for external users (e.g., contractors, partners) with limited permissions.

ParameterTypeDefaultDescription
EXTERNAL_USER_TYPEstring"external"User type identifier for external user classification
EXTERNAL_USER_ALLOWED_PROJECTSlist[string]["codemie"]Projects accessible to external users for collaboration

Integration Services

Connect CodeMie to external services for enhanced tools capabilities.

Search Services

Enable web search capabilities for assistants to access current information.

ParameterTypeDefaultDescription
GOOGLE_SEARCH_API_KEYstring""API key for Google Custom Search integration. Can be registered in your GCP account
GOOGLE_SEARCH_CSE_IDstring""Custom Search Engine ID for scoped web searches. Can be registered here https://programmablesearchengine.google.com/controlpanel/all
TAVILY_API_KEYstring""Tavily API key for AI-optimized web search and extraction

Kubernetes Integration

Enable deployment, monitoring, and management of Kubernetes resources via assistants.

ParameterTypeDefaultDescription
KUBERNETES_API_URLstring""Kubernetes API server URL (typically in-cluster or external endpoint)
KUBERNETES_API_TOKENstring""Service account token with appropriate RBAC permissions

Version Control Systems

Configure Git provider detection for repository indexing and code analysis.

ParameterTypeDefaultDescription
GITHUB_IDENTIFIERSlist[string]["github"]URL patterns identifying GitHub repositories
GITLAB_IDENTIFIERSlist[string]["gitlab"]URL patterns identifying GitLab repositories
BITBUCKET_IDENTIFIERSlist[string]["bitbucket"]URL patterns identifying Bitbucket repositories
AZURE_DEVOPS_REPOS_IDENTIFIERSlist[string]["dev.azure.com"]URL patterns identifying Azure DevOps repositories

NATS Message Broker Configuration

Configure NATS for plugin communication, event streaming, and distributed messaging.

Connection Settings

ParameterTypeDefaultDescription
NATS_SERVERS_URIstring"nats://nats:4222"NATS server cluster URI; supports multiple comma-separated servers
NATS_CLIENT_CONNECT_URIstring""Alternative client connection URI if different from server URI
NATS_USERstring"codemie"Username for NATS authentication
NATS_PASSWORDstring"codemie"Password for NATS authentication (use secrets in production)
NATS_SKIP_TLS_VERIFYbooleanfalseSkip TLS certificate validation (only for development/testing)
NATS_CONNECT_TIMEOUTinteger5Connection establishment timeout in seconds

Connection Behavior

ParameterTypeDefaultDescription
NATS_MAX_RECONNECT_ATTEMPTSinteger-1Max reconnection attempts (-1 for unlimited retries with backoff)
NATS_RECONNECT_TIME_WAITinteger10Seconds to wait between reconnection attempts
NATS_MAX_OUTSTANDING_PINGSinteger5Max unanswered pings before connection considered dead
NATS_PING_INTERVALinteger120Seconds between keepalive pings to detect connection issues
NATS_VERBOSEbooleanfalseEnable detailed NATS protocol logging for debugging

Connection Pool

Optimize NATS performance with connection pooling for high-throughput scenarios.

ParameterTypeDefaultDescription
NATS_CONNECTION_POOL_SIZEinteger20Number of NATS connections to maintain in pool
NATS_CONNECTION_POOL_MAX_AGEinteger300Max connection age in seconds before recycling
NATS_CONNECTION_POOL_ACQUIRE_TIMEOUTfloat10.0Max seconds to wait for available connection from pool

Plugin Configuration

Configure NATS-based plugin system for extending CodeMie capabilities.

ParameterTypeDefaultDescription
NATS_PLUGIN_KEY_CHECK_ENABLEDbooleanfalseValidate plugin authentication keys before allowing execution
NATS_PLUGIN_PING_TIMEOUT_SECONDSinteger1Max seconds to wait for plugin health check response
NATS_PLUGIN_UPDATE_INTERVALinteger60Seconds between plugin availability refresh checks
NATS_PLUGIN_LIST_TIMEOUT_SECONDSinteger15Max seconds to wait for plugin discovery responses
NATS_PLUGIN_MAX_VALIDATION_ATTEMPTSinteger3Max attempts to validate plugin before marking unavailable
NATS_PLUGIN_V2_ENABLEDbooleantrueEnable enhanced plugin protocol v2 with improved features
NATS_PLUGIN_TOOL_TIMEOUTinteger302Max seconds for plugin tool execution (5 min + buffer)
NATS_PLUGIN_EXECUTE_TIMEOUTinteger302Max seconds for plugin command execution

MCP (Model Context Protocol) Configuration

Configure Model Context Protocol for enhanced AI context management and tool integration.

MCP Connect

ParameterTypeDefaultDescription
MCP_CONNECT_ENABLEDbooleantrueEnable MCP functionality for advanced context handling
MCP_CONNECT_URLstring"http://localhost:3000"MCP server endpoint for context coordination
MCP_CONNECT_BUCKETS_COUNTinteger10Number of context buckets for partitioning and isolation
MCP_TOOL_TOKENS_SIZE_LIMITinteger30000Max tokens for tool definitions to prevent context overflow

MCP Client Configuration

ParameterTypeDefaultDescription
MCP_CLIENT_TIMEOUTfloat300.0Max seconds for MCP operations (5 minutes for complex contexts)

MCP Caching

Improve MCP performance by caching toolkit instances and reducing initialization overhead.

ParameterTypeDefaultDescription
MCP_TOOLKIT_SERVICE_CACHE_SIZEinteger100Max cached toolkit instances to retain in memory
MCP_TOOLKIT_SERVICE_CACHE_TTLinteger3600Toolkit cache lifetime in seconds (1 hour)
MCP_TOOLKIT_FACTORY_CACHE_SIZEinteger50Max cached toolkit factories to retain
MCP_TOOLKIT_FACTORY_CACHE_TTLinteger600Factory cache lifetime in seconds (10 minutes)

MCP Header Propagation

Control which HTTP headers are forwarded to MCP servers for security and privacy.

ParameterTypeDefaultDescription
MCP_BLOCKED_HEADERSstring"authorization,cookie,..."Comma-separated headers to block from MCP server propagation (security)

LLM Proxy & LiteLLM Configuration

Configure LiteLLM proxy for unified LLM access, budget management, and usage tracking.

Proxy Mode

ParameterTypeDefaultDescription
LLM_PROXY_MODEstring"internal"Proxy mode: internal (built-in routing), lite_llm (external LiteLLM proxy)
LLM_PROXY_ENABLEDbooleanfalseEnable LLM proxy for centralized model access control
LLM_PROXY_BUDGET_CHECK_ENABLEDbooleantrueEnforce budget limits before allowing LLM requests
LLM_PROXY_TIMEOUTinteger60Max seconds to wait for proxy responses

LiteLLM Connection

Connect to external LiteLLM proxy for advanced features like load balancing and fallbacks.

ParameterTypeDefaultDescription
LITE_LLM_URLstring""LiteLLM proxy server URL (e.g., http://litellm:4000)
LITE_LLM_APP_KEYstring""Application-specific key for LiteLLM authentication
LITE_LLM_MASTER_KEYstring""Master key for LiteLLM administrative operations

LiteLLM Model Tagging

Tag LLM requests for cost tracking and usage analytics.

ParameterTypeDefaultDescription
LITE_LLM_PROJECTS_TO_TAGS_LISTstring""Comma-separated project names to include as request tags
LITE_LLM_TAGS_HEADER_VALUEstring"default"Default tag value when project doesn't match configured list

LiteLLM Budget Configuration

Set spending limits per user or team to control LLM usage costs.

ParameterTypeDefaultDescription
DEFAULT_SOFT_BUDGET_LIMITfloat200Soft limit in USD triggering warnings before hard cutoff
DEFAULT_HARD_BUDGET_LIMITfloat500Hard limit in USD completely blocking requests when exceeded
DEFAULT_BUDGET_DURATIONstring"30d"Budget reset period (e.g., 30d for monthly, 7d for weekly)
DEFAULT_BUDGET_IDstring"default"Identifier for default budget configuration

LiteLLM Cache & Optimization

Reduce latency and API costs by caching metadata and responses.

ParameterTypeDefaultDescription
LITELLM_CUSTOMER_CACHE_TTLinteger300Customer info cache duration in seconds (5 minutes)
LITELLM_MODELS_CACHE_TTLinteger1800Available models list cache duration (30 minutes)
LITELLM_REQUEST_TIMEOUTfloat5.0Timeout for metadata requests to LiteLLM proxy
LITELLM_FAIL_OPEN_ON_503booleantrueAllow requests when LiteLLM proxy unavailable (bypass mode)

Agent & Workflow Configuration

Control AI agent behavior, workflow execution limits, and parallel processing.

AI Agent Settings

ParameterTypeDefaultDescription
AI_AGENT_RECURSION_LIMITinteger150Max agent reasoning steps to prevent infinite loops
ENABLE_LANGGRAPH_AITOOLS_AGENTbooleantrueUse LangGraph-based agent for advanced tool orchestration
DISABLE_PARALLEL_TOOLS_CALLING_MODELSlist[string]["gpt-4o", "gpt-4.1"]Models incompatible with parallel tool execution

Workflow Configuration

ParameterTypeDefaultDescription
WORKFLOW_MAX_CONCURRENCYinteger5Max simultaneous workflow executions to control resource usage
WORKFLOW_DEFAULT_CONCURRENCYinteger2Default concurrency when not specified by workflow

Trigger Engine

Enable time-based or event-driven workflow automation.

ParameterTypeDefaultDescription
TRIGGER_ENGINE_ENABLEDbooleanfalseEnable scheduled workflows and event triggers
SCHEDULER_PROMPT_SIZE_LIMITinteger4000Max prompt tokens for scheduled workflow inputs

CodeMie Tools Configuration

Configure AI tool selection, code analysis integrations, tool execution limits, and tool-specific environment variables for individual CodeMie tool behaviors. These parameters control execution environments, security policies, and feature access for built-in tools.

Code Analysis Tools

ParameterTypeDefaultDescription
MAX_CODE_TOOLS_OUTPUT_SIZEinteger50000Max characters in code analysis tool output to prevent context overflow

Smart Tool Selection

Automatically select relevant tools based on user queries to improve response quality.

ParameterTypeDefaultDescription
TOOL_SELECTION_ENABLEDbooleanfalseEnable AI-powered tool selection from available toolkits
TOOL_SELECTION_THRESHOLDinteger3Min tools before triggering smart selection (use all if below)
TOOL_SELECTION_LIMITinteger3Max tools to select per query to optimize token usage

Code Analysis Services

Integration with advanced code analysis platforms (e.g., AICE).

ParameterTypeDefaultDescription
CODE_ANALYSIS_SERVICE_PROVIDER_NAMEstring"CodeAnalysisServiceProvider"Provider name for code analysis tool integration
CODE_EXPLORATION_SERVICE_PROVIDER_NAMEstring"CodeExplorationServiceProvider"Provider name for code exploration capabilities

Code Executor & Python Sandbox

Configure secure Python code execution in isolated Kubernetes pods for running user-generated code safely.

ParameterTypeDefaultDescription
CODE_EXECUTOR_EXECUTION_MODEstring"local"Execution mode: sandbox (isolated K8s pod, recommended for production), local (embedded kernel, less secure)
CODE_EXECUTOR_KUBECONFIG_PATHstring""Path to kubeconfig for Kubernetes authentication (optional, uses in-cluster config if empty). Set if you want to move code execution to a dedicated cluster
CODE_EXECUTOR_WORKDIR_BASEstring"/home/codemie"Base working directory for code execution inside containers
CODE_EXECUTOR_NAMESPACEstring"codemie-runtime"Kubernetes namespace for executor pods
CODE_EXECUTOR_DOCKER_IMAGEstring"epamairun/codemie-python:2.2.13-1"Docker image with Python environment and dependencies for code execution
CODE_EXECUTOR_EXECUTION_TIMEOUTfloat30.0Max seconds for code execution before timeout (prevents infinite loops)
CODE_EXECUTOR_SESSION_TIMEOUTfloat300.0Max session lifetime in seconds before automatic cleanup
CODE_EXECUTOR_DEFAULT_TIMEOUTfloat30.0Default timeout for operations in seconds
CODE_EXECUTOR_MEMORY_LIMITstring"256Mi"Kubernetes memory limit for executor pods
CODE_EXECUTOR_MEMORY_REQUESTstring"256Mi"Kubernetes memory request for executor pods
CODE_EXECUTOR_CPU_LIMITstring"1"Kubernetes CPU limit for executor pods (cores)
CODE_EXECUTOR_CPU_REQUESTstring"500m"Kubernetes CPU request for executor pods (millicores)
CODE_EXECUTOR_MAX_POD_POOL_SIZEinteger5Max number of executor pods in dynamic pool for concurrent executions
CODE_EXECUTOR_POD_NAME_PREFIXstring"codemie-executor-"Prefix for dynamically created executor pod names
CODE_EXECUTOR_RUN_AS_USERinteger1001Unix user ID for pod security context (non-root execution)
CODE_EXECUTOR_RUN_AS_GROUPinteger1001Unix group ID for pod security context
CODE_EXECUTOR_FS_GROUPinteger1001Filesystem group ID for pod volume permissions
CODE_EXECUTOR_SECURITY_THRESHOLDstring"LOW"Security policy: SAFE (permissive), LOW, MEDIUM, HIGH (restrictive)
CODE_EXECUTOR_YAML_POLICY_PATHstring""Path to custom YAML security policy file (optional, overrides default policy)
CODE_EXECUTOR_VERBOSEbooleanfalseEnable verbose logging for executor debugging
CODE_EXECUTOR_KEEP_TEMPLATEbooleantruePersist pod template after execution for performance optimization
CODE_EXECUTOR_SKIP_ENVIRONMENT_SETUPbooleanfalseSkip environment initialization in sandbox (faster startup but may break dependencies)
Security Considerations

Local Mode: CODE_EXECUTOR_EXECUTION_MODE=local provides less isolation and security. Use sandbox mode in production where untrusted code execution is required.

Security Threshold: The security policy controls what operations are allowed:

  • SAFE (0): Most permissive, blocks almost nothing
  • LOW (1): Allows common operations like HTTP requests (recommended default)
  • MEDIUM (2): More restrictive, blocks potentially dangerous operations
  • HIGH (3): Very restrictive, only allows safe operations

Azure DevOps Integration

Configuration for Azure DevOps work items, test plans, and wiki integrations.

ParameterTypeDefaultDescription
AZURE_DEVOPS_CACHE_DIRstring""Cache directory for Azure DevOps API responses (empty string disables caching)

Observability & Monitoring

Track LLM usage, performance metrics, and debugging information.

Langfuse Configuration

Send LLM traces to Langfuse for observability, debugging, and prompt optimization.

ParameterTypeDefaultDescription
LANGFUSE_TRACESbooleanfalseEnable detailed LLM tracing (requires Langfuse account)
LANGFUSE_BLOCKED_INSTRUMENTATION_SCOPESlist[string]["elasticsearch-api"]Exclude noisy scopes from instrumentation
info

When LANGFUSE_TRACES is enabled, you must also set the following environment variables (provided by Langfuse):

  • LANGFUSE_PUBLIC_KEY - Public API key from Langfuse project
  • LANGFUSE_SECRET_KEY - Secret key for authentication
  • LANGFUSE_HOST - Langfuse instance URL (cloud or self-hosted)

Memory Profiling

Track memory usage and identify memory leaks during application runtime using Python's tracemalloc module.

ParameterTypeDefaultDescription
MEMORY_PROFILING_ENABLEDbooleanfalseEnable tracemalloc and psutil based memory profiling
MEMORY_PROFILING_INTERVAL_MINUTESinteger10Interval between automatic snapshots (in minutes)
MEMORY_PROFILING_DETAIL_LEVELstring"file"Detail level: "file" (fast, groups by file) or "line" (slower, shows exact lines)
MEMORY_PROFILING_SNAPSHOT_PREFIXstring"memory_snapshots"Prefix path for snapshot storage location
info

Memory profiling uses Python's built-in tracemalloc module to capture memory allocation snapshots at regular intervals. Choose detail level based on your needs:

  • file: Faster, groups memory usage by file (recommended for production debugging)
  • line: Slower, shows exact line numbers (use for detailed analysis in development)
warning

Memory profiling adds CPU overhead and should be used cautiously in production environments. The file detail level has lower performance impact compared to line. Consider increasing the interval (e.g., 30-60 minutes) for production use to minimize resource consumption.


Environment-Specific Configuration

Loading Configuration

CodeMie uses Pydantic Settings to load configuration from multiple sources with precedence:

  1. Environment variables - Highest priority, overrides all other sources
  2. .env file - Loaded from project root, convenient for local development
  3. Default values - Specified in configuration classes as fallbacks

Sensitive Information

The following parameter patterns are automatically masked in logs and exports:

  • Any parameter ending with: KEY, PASSWORD, SECRET, TOKEN
  • Explicitly masked: AZURE_STORAGE_CONNECTION_STRING, PG_URL, ELASTIC_URL

Security Best Practice: Use secret management services in production rather than plain environment variables.

Environment Detection

The application detects deployment environment using the ENV parameter:

config.is_local  # Returns True when ENV == "local"

This affects logging format (JSON vs human-readable) and security defaults.


LLM Model Configuration

LLM models are configured via YAML files located at LLM_TEMPLATES_ROOT/llm-{MODELS_ENV}-config.yaml.

Model Configuration Structure

Each model entry supports these configuration options:

FieldTypeDescription
base_namestringCanonical model identifier (e.g., gpt-4, claude-3-opus-20240229)
deployment_namestringProvider-specific deployment name (Azure deployment, Bedrock model ID)
labelstringHuman-friendly display name shown in UI model selector
multimodalbooleanModel supports vision (images/video) in addition to text
react_agentbooleanCompatible with ReAct agent pattern (reasoning + acting)
enabledbooleanModel available for selection (allows disabling without removal)
providerstringProvider type: azure_openai, aws_bedrock, google_vertexai, anthropic
default_for_categorieslistCategories where this model is auto-selected
cost.inputfloatUSD per million input tokens for cost tracking
cost.outputfloatUSD per million output tokens
cost.cache_read_input_token_costfloatUSD per million cached tokens (for providers supporting caching)
max_output_tokensintegerMaximum generation length supported by model
features.streamingbooleanSupports streaming responses for real-time output
features.toolsbooleanSupports function calling / tool use
features.parallel_tool_callsbooleanCan execute multiple tools simultaneously

Model Categories

Models can be designated as defaults for specific use cases:

  • global - Fallback default for all operations
  • chat - Conversational interactions and general Q&A
  • code - Code generation, review, and analysis
  • documentation - Technical documentation generation
  • summarization - Long-form text summarization
  • translation - Language translation tasks
  • knowledge_base - Information retrieval and RAG
  • workflow - Workflow step execution
  • file_analysis - Document and file content analysis
  • reasoning - Complex reasoning and problem-solving
  • planning - Strategic planning and task decomposition

Customer Configuration

Customer-specific settings are loaded from CUSTOMER_CONFIG_DIR/customer-config.yaml for specific clients configuration.

Components Configuration

Enable/disable features and integrations per deployment:

components:
- id: component-id
settings:
enabled: true # Component active
availableForExternal: true # External users can access
name: Component Name # Display name
url: https://component.url # Deep link or service URL
icon_url: https://icon.url # UI icon

Preconfigured Assistants

Define assistants automatically created on deployment:

preconfigured_assistants:
- id: assistant-slug # Unique assistant identifier
settings:
enabled: true # Assistant active
index_name: custom_index # Override default search index
project: project-name # Restrict to specific project

Authorized Applications Configuration

External applications that can access CodeMie APIs via JWT authentication are configured in AUTHORIZED_APPS_CONFIG_DIR/authorized-applications-config.yaml.

Application Configuration Structure

authorized_applications:
- name: app-name # Application identifier
public_key_url: https://app.com/.well-known/public-key # JWT verification key URL
# OR
public_key_path: /path/to/public/key.pem # Local public key file
allowed_resources: # Permitted resource types
- ASSISTANT
- WORKFLOW
- CONVERSATION

Resource Types

Control granular access to CodeMie resources:

  • ASSISTANT - Create, read, update assistant configurations
  • WORKFLOW - Execute workflows and access results
  • CONVERSATION - Read/write conversation history
  • USER - User profile management
  • PROJECT - Project-level access

See Also