aga_start_monitoring
Start or restart behavioral monitoring with a new baseline to enforce security policies and track AI agent tool usage.
Instructions
Start or restart behavioral monitoring with a new baseline.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| behavioral_baseline | No |
Implementation Reference
- src/tools/start-monitoring.ts:8-23 (handler)The handler function for the aga_start_monitoring tool which resets the behavioral monitor and optionally sets a new baseline.
export async function handleStartMonitoring(args: StartMonitoringArgs, ctx: ServerContext) { if (!ctx.portal.artifact) return ctx.error('No artifact loaded. Call aga_create_artifact first.'); if (ctx.portal.state !== 'ACTIVE_MONITORING') return ctx.error(`Cannot start monitoring in state ${ctx.portal.state}`); ctx.behavioralMonitor.reset(); if (args.behavioral_baseline) { ctx.behavioralMonitor.setBaseline(args.behavioral_baseline); } return ctx.json({ success: true, portal_state: ctx.portal.state, monitoring_active: true, baseline_set: !!args.behavioral_baseline, }); } - src/tools/start-monitoring.ts:4-6 (schema)Input schema/interface for aga_start_monitoring.
export interface StartMonitoringArgs { behavioral_baseline?: BehavioralBaseline; } - src/server.ts:152-165 (registration)Registration of aga_start_monitoring tool with its schema definition and handler.
// 6. aga_start_monitoring (governed) governedTool('aga_start_monitoring', 'Start or restart behavioral monitoring with a new baseline.', { behavioral_baseline: z.object({ permitted_tools: z.array(z.string()), rate_limits: z.record(z.number()), forbidden_sequences: z.array(z.array(z.string())), window_ms: z.number(), }).optional(), }, async (args) => handleStartMonitoring(args, ctx), );