Overview
Shannon uses feature flags to control optional features, experimental functionality, and enterprise extensions without modifying code. This allows clean separation between:- Open-source core features (available to all)
- Enterprise/private features (gated behind flags)
- Experimental features (toggleable for testing)
Zero Recompilation
Enable/disable features without rebuilding services
Environment-Based
Different flags for dev/staging/production
Clean Separation
Enterprise features isolated from OSS core
Gradual Rollout
Test new features before full deployment
Configuration
Configuration File
Feature flags are defined inconfig/shannon.yaml under the features section:
Environment Variables
Feature flags can be overridden via environment variables:SHANNON_FEATURE_<FLAG_NAME_UPPERCASE>
Priority Order
- Environment variables (highest priority)
- Config overlays (
config/overlays/shannon.{env}.yaml) - Base config (
config/shannon.yaml) - Code defaults (lowest priority)
Usage Patterns
In Go Code (Orchestrator)
In Python Code (LLM Service)
Conditional Imports Pattern
Use feature flags with conditional imports for clean separation:Common Feature Flags
| Flag Name | Type | Description | Default |
|---|---|---|---|
ads_research | Enterprise | Ads research workflow with market analysis | false |
parallel_streaming | Experimental | Multi-agent parallel SSE streaming | true |
advanced_synthesis | Enterprise | Custom synthesis templates | false |
vendor_tools_enabled | Integration | Enable vendor-specific tool adapters | false |
enhanced_memory | Experimental | Advanced vector memory with hybrid search | false |
Best Practices
1. Default to Disabled
New features should default tofalse in base config: