Policy Learner Kit
Automatically adjust agent policies based on accumulated outcome data.
Configuration
Total
4
Improved
0
Degraded
0
Policy Evolution
0/4 learnedRetry Policypending
Before: max_retries=3, backoff=exponential
After: max_retries=5, backoff=linear for network errors
Effectiveness
72%→89%
Rate Limit Policypending
Before: 100 req/min per client
After: dynamic: 50-200 req/min based on client tier
Effectiveness
65%→84%
Timeout Policypending
Before: global timeout: 30s
After: per-endpoint: 5s-45s adaptive
Effectiveness
58%→81%
Fallback Policypending
Before: return cached data on error
After: cascade: cache > stale > default response
Effectiveness
70%→91%
Integration Code
import { createPolicyLearner } from 'agent-tools-kit/learning'
const learner = createPolicyLearner({ rate: 'conservative' })
const result = await learner.train(outcomeHistory)
// result.policies — array of updated policies
// result.improvements — effectiveness delta per policy