Policy Recommendations
Waxell analyzes your agents' runtime behavior and automatically generates policy recommendations. Instead of guessing what limits to set, let the platform suggest them based on real data.
How It Works
The recommendation engine uses statistical analysis of your agents' execution history:
- Collects metrics -- tokens, cost, duration, and step counts from completed runs
- Calculates baselines -- average and standard deviation over a configurable window (default: 7 days)
- Generates limits -- recommended limit = 2x average, anomaly threshold = 3x average
- Creates recommendations -- pending suggestions that you can accept or dismiss
No ML models involved -- just straightforward statistical heuristics that work from day one.
Recommendation Types
| Type | Category | What it suggests | Minimum runs needed |
|---|---|---|---|
| Token budget | Cost | Daily token limit based on agent's average usage | 5 |
| Cost budget | Cost | Daily cost limit based on agent's average spend | 5 |
| Timeout | Operations | Execution timeout based on agent's average duration | 10 |
| Step limit | Safety | Max steps per run based on agent's average step count | 10 |
Two Modes
Batch Mode (Daily)
Runs on a schedule to generate recommendations for all agents with enough data:
# Generate for all agents (last 7 days)
python manage.py generate_recommendations
# Generate for a specific agent
python manage.py generate_recommendations --agent support-bot
# Custom time window
python manage.py generate_recommendations --days 14 --tenant acme
Per-Run Anomaly Detection
Fires immediately when a single run is 3x the agent's 7-day average. This catches anomalies in real-time -- if your agent suddenly uses 10x its normal tokens, you'll get a recommendation within seconds.
Triggered automatically after each run completes. Requires at least 3 prior runs for the agent.
Managing Recommendations
Via Dashboard
Navigate to Governance > Recommendations to see all pending suggestions:
- Pending -- New recommendations waiting for review
- Accepted -- Recommendations you've turned into active policies
- Dismissed -- Recommendations you've declined
Accepting a recommendation creates a new policy with the suggested configuration. You can customize the policy before it's enabled.
Via API
# List pending recommendations
curl -H "Authorization: Bearer $TOKEN" \
"https://acme.waxell.dev/waxell/v1/recommendations/?status=pending"
# Accept a recommendation (creates a policy)
curl -X POST -H "Authorization: Bearer $TOKEN" \
"https://acme.waxell.dev/waxell/v1/recommendations/{uuid}/accept/"
# Dismiss a recommendation
curl -X POST -H "Authorization: Bearer $TOKEN" \
"https://acme.waxell.dev/waxell/v1/recommendations/{uuid}/dismiss/"
Via Platform Assistant
Ask the assistant for a governance check:
"What governance recommendations do I have?" "Show me recommendations for my support-bot agent"
The assistant can walk you through accepting or dismissing recommendations interactively. See Platform Assistant for details.
Example Flow
- Deploy
support-botwith no policies - After 10+ runs, the recommendation engine analyzes behavior:
- Average tokens per run: 2,500
- Average cost per run: $0.08
- Average duration: 4.2 seconds
- Recommendations generated:
- Token budget: 5,000 tokens/run (2x average)
- Cost budget: $0.16/run (2x average)
- Timeout: 10 seconds (2x average)
- You accept the token budget recommendation -- a cost policy is created automatically
- A day later, a run uses 8,000 tokens (3.2x average) -- anomaly recommendation fires immediately
Next Steps
- Policy Categories & Templates -- All policy categories and pre-built templates
- Governance -- Policy enforcement in your agent code
- Platform Assistant -- Manage recommendations via chat