-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Description
Currently, the AgentScope Java Runtime primarily loads configuration by hardcoded values. This makes it difficult to:
- Inject secrets (e.g., API keys, access tokens) securely in containerized or cloud environments
- Customize behavior per environment (dev/staging/prod) without rewriting codes
To improve usability in CI/CD, Kubernetes, and local development workflows, we propose adding native support for:
- Loading environment variables (e.g.,
AGENTRUN_ACCESS_KEY) - Parsing
.envfiles (e.g.,./agentscope.envor.envin working directory)
This aligns with common practices in modern Java frameworks (e.g., Spring Boot, Quarkus) and matches the flexibility already available in the Python runtime.
Proposed Behavior
Priority Order (Highest to Lowest)
- Environment variables (e.g.,
AGENTSCOPE_TOOL_PAYMENT_MERCHANT_ID) .envfile (optional, auto-loaded if present)- config file (
config.yaml)
Benefits
- Secure secret management (no hard-coded keys)
- Seamless transition from local → cloud deployment
- Easier testing with different configs
- Consistency with Python runtime and industry standards
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request