agent-guard
v0.1.3Constitutional guardrails and loop detection for AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
register_agent
Register an agent for loop monitoring. Configure iteration limits and progress thresholds.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Unique identifier for the agent |
max_iterations | integer | Maximum iterations before forced stop (default 100) |
progress_threshold | number | Minimum ratio of unique/total actions to consider "making progress" (default 0.3) |
log_action
Log an agent action for loop detection. Maintains a rolling window of the last 50 actions and returns early warnings.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent identifier |
args * | object | Arguments passed to the tool |
tool_name * | string | Name of the tool being called |
result_preview | string | Brief preview of the result (max 200 chars) |
detect_loop
Check if an agent is stuck in an infinite loop. Analyzes action patterns, uniqueness ratio, and repeated signatures.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent identifier to check |
set_circuit_breaker
Configure a circuit breaker to auto-terminate or warn when an action pattern repeats too many times.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent identifier |
action | string | What to do when triggered: warn (allow but warn), block (prevent execution), suggest_alternative (allow but suggest different approach) |
max_repeats | integer | Maximum times an identical action can repeat before triggering (default 3) |
check_circuit_breaker
Check if a proposed action should be allowed or blocked by the circuit breaker. Call this BEFORE executing a tool.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent identifier |
proposed_args * | object | Arguments the agent wants to pass |
proposed_tool * | string | Tool name the agent wants to call |
get_stuck_report
Get a detailed analysis of why an agent is stuck, including action history, patterns, token waste estimate, and recovery recommendations.
| Parameter | Type | Description |
|---|---|---|
agent_id * | string | Agent identifier to analyze |
get_health_dashboard
Get an overview of all monitored agents with their current loop risk scores and status.