Secrets
Securely store API keys, tokens, and environment variables in an encrypted vault. Scope secrets to specific agents and enable automatic rotation.
What Are Secrets?
Secrets are encrypted key-value pairs stored securely in Fluxgate. They let you manage sensitive credentials (API keys, database passwords, tokens) without hardcoding them in agent configs or tool definitions.
Create a Secret
Create Secretbash
curl -X POST http://localhost:8000/api/v1/secrets \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "OPENAI_API_KEY",
"value": "sk-your-key-here",
"type": "api_key",
"scope": "agent",
"agent_id": "AGENT_ID",
"rotation_days": 90
}'Secret Types
| Type | Use Case |
|---|---|
| api_key | External API keys (OpenAI, Stripe, etc.) |
| token | OAuth tokens, JWT secrets |
| password | Database passwords, service credentials |
| env_var | Environment variables for tools |
Security Note
Secret values are encrypted at rest and never returned in API responses. Once stored, you can only update or delete them — not read the raw value.