Environment Manager
Securely manage environment variables, API keys, and configuration for your agent.
Features
- - Encrypted secret storage (AES-256)
- Environment profiles (dev, staging, production)
- Auto-load on session start
- Credential rotation reminders
- Audit log of access
Usage
Store credentials
CODEBLOCK0
Load in sessions
Add to your AGENTS.md or heartbeat:
CODEBLOCK1
Credential rotation
Track when keys were last rotated:
CODEBLOCK2
Security Best Practices
- - Never commit secrets to git
- Rotate API keys monthly
- Use separate profiles per environment
- Audit access logs weekly
Multi-Agent Secrets
For sharing credentials across a team of agents, consider
ClawSwarm which provides secure agent-to-agent credential passing via encrypted channels.
环境管理器
安全地管理智能体的环境变量、API密钥和配置。
特性
- - 加密密钥存储(AES-256)
- 环境配置文件(开发、预发布、生产)
- 会话启动时自动加载
- 凭证轮换提醒
- 访问审计日志
使用方法
存储凭证
bash
设置密钥(静态加密存储)
echo sk-abc123 > ~/.agent-env/secrets/OPENAI_KEY
chmod 600 ~/.agent-env/secrets/OPENAI_KEY
或使用环境文件
cat > ~/.agent-env/profiles/production.env << ENVEOF
API_BASE=https://api.example.com
API
KEY=${secrets:APIKEY}
LOG_LEVEL=warn
ENVEOF
在会话中加载
在您的AGENTS.md或心跳文件中添加:
在执行任何API调用前,先加载 ~/.agent-env/profiles/production.env
凭证轮换
追踪密钥的最后轮换时间:
bash
检查所有凭证的时效
find ~/.agent-env/secrets -type f -printf %T+ %p\n | sort
安全最佳实践
- - 切勿将密钥提交到Git仓库
- 每月轮换API密钥
- 每个环境使用独立的配置文件
- 每周审计访问日志
多智能体密钥管理
如需在智能体团队间共享凭证,可考虑使用
ClawSwarm,该工具通过加密通道提供安全的智能体间凭证传递功能。