Skip to main content

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:

  1. Collects metrics -- tokens, cost, duration, and step counts from completed runs
  2. Calculates baselines -- average and standard deviation over a configurable window (default: 7 days)
  3. Generates limits -- recommended limit = 2x average, anomaly threshold = 3x average
  4. 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

TypeCategoryWhat it suggestsMinimum runs needed
Token budgetCostDaily token limit based on agent's average usage5
Cost budgetCostDaily cost limit based on agent's average spend5
TimeoutOperationsExecution timeout based on agent's average duration10
Step limitSafetyMax steps per run based on agent's average step count10

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

  1. Deploy support-bot with no policies
  2. 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
  3. Recommendations generated:
    • Token budget: 5,000 tokens/run (2x average)
    • Cost budget: $0.16/run (2x average)
    • Timeout: 10 seconds (2x average)
  4. You accept the token budget recommendation -- a cost policy is created automatically
  5. A day later, a run uses 8,000 tokens (3.2x average) -- anomaly recommendation fires immediately

Next Steps