Goal Tracking Kit
Monitor agent progress toward high-level goals with milestone tracking and status indicators.
Goals
Generate quarterly business report
In Progress65% complete2 / 5 milestones
Gather financial data100%
Retrieved data from 3 sources
Analyze trends100%
Identified 5 key trends
Generate visualizations60%
Creating 4 charts
Write executive summary0%
Pending analysis completion
Final review & delivery0%
Integration Code
import { createGoalTracker } from 'agent-tools-kit/reasoning'
const tracker = createGoalTracker({
persistence: 'redis',
onMilestoneComplete: (goal, milestone) => {
notify.send(`Milestone "${milestone.label}" completed for goal "${goal.label}"`)
},
onBlocked: (goal, milestone, reason) => {
escalate.toHuman({ goal, milestone, reason })
},
})
// Create a goal with milestones
const goal = await tracker.create({
label: 'Generate quarterly business report',
milestones: [
{ label: 'Gather data', tools: ['db-query', 'api-call'] },
{ label: 'Analyze trends', tools: ['calculator'] },
{ label: 'Generate charts', tools: ['code-exec'] },
{ label: 'Write summary', tools: [] },
{ label: 'Review & deliver', tools: [] },
],
})
// Update progress during execution
await tracker.update(goal.id, 'm1', { status: 'completed', progress: 100 })
// Query goal status
const status = await tracker.getStatus(goal.id)
// => { progress: 65, milestones: [...], blockers: [] }