# =============================================================================
# Workflow Service Configuration
# =============================================================================

# Service Information
# Basic service identification and network configuration
SERVICE_SUB=sag
SERVICE_NAME=Agent
SERVICE_LOCATION=hf
SERVICE_PORT=8700

# Logging Configuration
# Application logging level and optional log file path
LOG_LEVEL="INFO"
LOG_PATH="./agent/logs"
# Whether to output logs to stdout, 1=enabled, 0=disabled, default: 0
LOG_STDOUT_ENABLE=0

# =============================================================================
# Database Configuration
# =============================================================================

# MySQL Database Settings
# Primary database connection configuration for persistent data storage
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=xxxx
MYSQL_PASSWORD=xxxx
MYSQL_DB=xxxx

# Redis Cache Settings
# Redis cluster configuration for caching, session management, and real-time data
# Only one cluster address and stand-alone address can be configured, and the cluster address has high priority.
# Cluster address
REDIS_CLUSTER_ADDR=127.0.0.1:1234,127.0.0.1:1234,127.0.0.1:1234
# Stand-alone address
#REDIS_ADDR=127.0.0.1:6379
REDIS_PASSWORD=xxxx
# Cache expiration time in seconds (1 hour = 3600 seconds)
REDIS_EXPIRE=3600

# =============================================================================
# OpenTelemetry Observability Configuration
# =============================================================================

# OTLP (OpenTelemetry Protocol) Configuration
# Distributed tracing and metrics collection settings
# OTLP endpoint for telemetry data submission
OTLP_ENDPOINT=127.0.0.1:1234
# Enable/disable telemetry reporting (1=enabled, 0=disabled)
OTLP_ENABLE=1

# Metrics Collection Configuration
# SDK metric reporting interval, recommended < 30000ms, default: 1000ms
OTLP_METRIC_EXPORT_INTERVAL_MILLIS=3000
# Metrics export timeout to server in milliseconds, default: 5000ms
OTLP_METRIC_EXPORT_TIMEOUT_MILLIS=3000
# Server connection establishment timeout in milliseconds, default: 5000ms
OTLP_METRIC_TIMEOUT=3000

# Distributed Tracing Configuration
# Server connection establishment timeout in milliseconds, default: 5000ms
OTLP_TRACE_TIMEOUT=3000
# Maximum queue size for BatchSpanProcessor data export, default: 2048
OTLP_TRACE_MAX_QUEUE_SIZE=2048
# Delay interval between consecutive exports in BatchSpanProcessor, default: 5000ms
OTLP_TRACE_SCHEDULE_DELAY_MILLIS=3000
# Maximum batch size for BatchSpanProcessor data export, default: 512
OTLP_TRACE_MAX_EXPORT_BATCH_SIZE=500
# Maximum allowed time for data export from BatchSpanProcessor, default: 30000ms
OTLP_TRACE_EXPORT_TIMEOUT_MILLIS=3000

# =============================================================================
# Message Queue
# =============================================================================

# Apache Kafka Configuration
# Message queue settings for asynchronous processing and event streaming
KAFKA_SERVERS=127.0.0.1:1234,127.0.0.1:1234,127.0.0.1:1234
KAFKA_TIMEOUT=10
KAFKA_TOPIC=xxxx

# =============================================================================
# External Service Configuration
# =============================================================================

# link
GET_LINK_URL=http://127.0.0.1:18888/api/v1/tools
VERSIONS_LINK_URL=http://127.0.0.1:18888/api/v1/tools/versions
RUN_LINK_URL=http://127.0.0.1:18888/api/v1/tools/http_run
LINK_CALL_TIMEOUT=90

# workflow
GET_WORKFLOWS_URL=http://127.0.0.1:7880/sparkflow/v1/protocol/get
WORKFLOW_SSE_BASE_URL=http://127.0.0.1:7880/workflow/v1
WORKFLOWS_CALL_TIMEOUT=90

# knowledge
CHUNK_QUERY_URL=http://127.0.0.1:30007/knowledge/v1/chunk/query
KNOWLEDGE_CALL_TIMEOUT=90

# mcp
LIST_MCP_PLUGIN_URL=http://127.0.0.1:18888/api/v1/mcp/tool_list
RUN_MCP_PLUGIN_URL=http://127.0.0.1:18888/api/v1/mcp/call_tool
MCP_CALL_TIMEOUT=90

# app auth
APP_AUTH_HOST=127.0.0.1:1234
APP_AUTH_ROUTER=/v2/app/details
APP_AUTH_API_KEY_PATH=/v2/app/key/api_key
APP_AUTH_PROT=http
APP_AUTH_API_KEY=xxxx
APP_AUTH_SECRET=xxxx

# auth permission
# Auth permission service URL for bot access control
AUTH_ADD_API_URL=http://127.0.0.1:6770/auth/v1/add
AUTH_GET_API_URL=http://127.0.0.1:6770/auth/v1/get

# Auth Required Username
# Username required for /agent/v1/auth endpoint authorization binding
# Only this username can create authorization bindings
# Default: 2hhikfuh
AUTH_REQUIRED_USERNAME=xxxx

# ElkUploadConfig
UPLOAD_NODE_TRACE=true
UPLOAD_METRICS=true

# LLM Request Configuration
# Skip SSL certificate verification (only for development/testing)
# WARNING: Setting this to true in production is a security risk
# Set to true only if you encounter SSL certificate errors with HTTPS URLs
SKIP_SSL_VERIFY=false
DEFAULT_LLM_TIMEOUT=90
DEFAULT_LLM_MAX_TOKEN=8000
