Configuration Reference
📍 AgentMap → Deployment → Configuration
AgentMap offers flexible configuration options to customize agent behavior, API integrations, and system settings for different deployment environments. This guide covers all available configuration parameters for development, staging, and production deployments.
Environment Variables
Core Settings
# API Configuration
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
GOOGLE_API_KEY=your_google_api_key
# AgentMap Settings
AGENTMAP_LOG_LEVEL=INFO
AGENTMAP_MAX_RETRIES=3
AGENTMAP_TIMEOUT=30
# Storage Configuration
AGENTMAP_STORAGE_PATH=./data
AGENTMAP_TEMP_PATH=./temp
Database Configuration
# Vector Database
VECTOR_DB_URL=your_vector_db_url
VECTOR_DB_API_KEY=your_vector_db_key
# Traditional Database
DATABASE_URL=postgresql://user:password@localhost:5432/agentmap
REDIS_URL=redis://localhost:6379
Agent Configuration
Default Agent Settings
{
"default_agent_config": {
"temperature": 0.7,
"max_tokens": 1000,
"timeout": 30,
"retry_attempts": 3,
"model": "gpt-3.5-turbo"
}
}
LLM Agent Configuration
Context
"{'temperature': 0.7, 'model': 'gpt-4', 'max_tokens': 500, 'top_p': 0.9}"
Available Parameters:
temperature
: Controls randomness (0.0-2.0)model
: LLM model to usemax_tokens
: Maximum response lengthtop_p
: Nucleus sampling parameterfrequency_penalty
: Reduces repetitionpresence_penalty
: Encourages topic diversity
File Agent Configuration
Context
"{'encoding': 'utf-8', 'mode': 'read', 'chunk_size': 1000}"
Available Parameters:
encoding
: File encoding (utf-8, ascii, etc.)mode
: File operation mode (read, write, append)chunk_size
: Size for chunked readingshould_split
: Split large files into chunks
CSV Agent Configuration
Context
"{'format': 'records', 'delimiter': ',', 'id_field': 'id'}"
Available Parameters:
format
: Output format (records, dict, list)delimiter
: CSV delimiter characterid_field
: Primary key field nameencoding
: File encoding
System Configuration
Logging Configuration
# logging_config.py
LOGGING_CONFIG = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'standard': {
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
},
},
'handlers': {
'default': {
'level': 'INFO',
'formatter': 'standard',
'class': 'logging.StreamHandler',
},
'file': {
'level': 'DEBUG',
'formatter': 'standard',
'class': 'logging.FileHandler',
'filename': 'agentmap.log',
},
},
'loggers': {
'agentmap': {
'handlers': ['default', 'file'],
'level': 'INFO',
'propagate': False
}
}
}
Performance Configuration
# performance_config.py
PERFORMANCE_CONFIG = {
'max_concurrent_agents': 10,
'agent_timeout': 30,
'memory_limit_mb': 512,
'enable_caching': True,
'cache_ttl_seconds': 3600,
'enable_metrics': True,
'metrics_port': 8080
}
Advanced Configuration
Custom Agent Registration
from agentmap import AgentMap, Agent
# Register custom agent type
class CustomAgent(Agent):
def execute(self, input_data):
# Custom implementation
return processed_data
# Register with AgentMap
agent_map = AgentMap()
agent_map.register_agent_type('custom', CustomAgent)
Service Injection Configuration
# services_config.py
SERVICES_CONFIG = {
'database': {
'type': 'postgresql',
'url': 'postgresql://localhost:5432/agentmap',
'pool_size': 10
},
'cache': {
'type': 'redis',
'url': 'redis://localhost:6379',
'ttl': 3600
},
'messaging': {
'type': 'rabbitmq',
'url': 'amqp://localhost:5672',
'exchange': 'agentmap'
}
}
Security Configuration
# security_config.py
SECURITY_CONFIG = {
'api_key_encryption': True,
'secure_temp_files': True,
'input_validation': True,
'output_sanitization': True,
'allowed_file_types': ['.csv', '.json', '.txt', '.md'],
'max_file_size_mb': 100,
'enable_audit_logging': True
}
Configuration Files
agentmap.config.json
{
"version": "1.0",
"agents": {
"default_timeout": 30,
"max_retries": 3,
"enable_parallel_execution": true
},
"storage": {
"temp_directory": "./temp",
"output_directory": "./output",
"auto_cleanup": true
},
"logging": {
"level": "INFO",
"file": "agentmap.log",
"rotate": true
},
"performance": {
"memory_limit": "1GB",
"cpu_limit": "80%"
}
}
Environment-Specific Configs
# development.env
AGENTMAP_ENV=development
AGENTMAP_DEBUG=true
AGENTMAP_LOG_LEVEL=DEBUG
# production.env
AGENTMAP_ENV=production
AGENTMAP_DEBUG=false
AGENTMAP_LOG_LEVEL=INFO
AGENTMAP_ENABLE_METRICS=true