Policy Queries¶
Query Zubbl for optimized task strategies before execution.
Usage¶
policies = zubbl.query(
task_type="code_review",
limit=5,
)
for policy in policies:
print(f"{policy.pattern}: {policy.score}")
How Policies Work¶
- Zubbl analyzes all past trajectories for the given task type
- Patterns are scored by success rate, efficiency, and feedback
- Top patterns are returned as policy recommendations
- Your agent uses these to guide its approach
Scoring Factors¶
| Factor | Weight | Description |
|---|---|---|
| Success Rate | 40% | Historical success of the pattern |
| Token Efficiency | 30% | Lower token usage = better |
| Latency | 20% | Faster execution = better |
| Feedback | 10% | Human/automated ratings |