# Agent Self-Reflection Sentiment Scanner MCP for AI Agents AI Agent Connect

> Agent Self-Reflection Sentiment Scanner analyzes execution logs to find self-correction markers and measure agent stability. It tracks how often your agents realize they've made a mistake and fix it, giving you a clear metric for how reliable your autonomous workflows actually are.

## Overview
- **Category:** observability
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_zVnWh5laIaPjvHbRTMRdjkz3bR3SOhCs4DZa8Sib/ai-agent-connect
- **Tags:** agent, logs, self-correction, stability, metrics

## Description

Running autonomous agents often feels like a black box. You trigger a task and hope for the best, but when things go wrong, it's hard to tell if the agent is actually learning from its mistakes or just spinning its wheels in an infinite loop. This MCP changes that by turning raw execution logs into actionable stability metrics. Instead of squinting at thousands of lines of text to see if an agent caught its own error, you get a clear picture of the self-correction frequency. You can see exactly how often an agent recognizes a mistake and successfully pivots to a new approach. By connecting this to your preferred AI client through the Vinkius catalog, you gain a way to quantify the reliability of your agentic loops. It moves you from guessing whether your workflows are stable to knowing exactly how much self-correction is happening in real-time. You'll finally be able to distinguish between a truly intelligent agent that fixes itself and a broken process that's just failing repeatedly.

## Tools

### calculate_rate
Computes the statistical frequency of self-corrections relative to the number of loops performed. This gives you a hard number for agent stability.

### get_summary
Aggregates all scanning and calculation data into a single high-level report. It provides a quick snapshot of an entire execution run.

### scan_logs
Analyzes raw log files to identify and count specific markers. It finds where agents realize they've failed or succeeded.

## Prompt Examples

**Prompt:** 
```
Can you check these logs and tell me how stable this agent was?
```

**Response:** 
```
Based on the logs provided, the agent shows a **High Stability** profile.

| Metric | Value |
| :--- | :--- |
| Total Loops | 12 |
| Self-Corrections | 2 |
| **Correction Rate** | **0.16** |

The agent successfully identified errors in 16% of its loops, indicating a reliable execution path.
```

**Prompt:** 
```
Give me a summary of the last execution run.
```

**Response:** 
```
Here is the summary for the recent execution:

* **Status:** Completed
* **Success Markers:** 8
* **Error Markers:** 3
* **Stability Score:** 0.27

The agent encountered 3 errors but successfully pivoted in all instances to complete the task.
```

**Prompt:** 
```
How many times did the agent realize it made a mistake in this log?
```

**Response:** 
```
I found **4 error recognition markers** in the log content. This suggests the agent was actively monitoring its own output and correcting its course during the process.
```

## Capabilities

### Detect self-correction markers
Finds specific instances where an agent recognizes an error and attempts a fix.

### Measure loop stability
Calculates how reliable an agentic workflow is based on its correction frequency.

### Generate execution reports
Aggregates scanning data into a high-level summary of successes and errors.

### Quantify error rates
Turns raw log data into statistical rates of self-correction per loop.

### Audit agentic behavior
Provides visibility into the decision-making patterns within execution logs.

## Use Cases

### Debugging runaway agent loops
An engineer notices an agent is costing too much. They use scan_logs to see if the agent is stuck in a repetitive error loop or actually trying to fix itself.

### Validating new agent architectures
A researcher compares two different prompting styles by using calculate_rate to see which one results in more successful self-corrections.

### Production monitoring for autonomous workflows
An MLOps engineer uses get_summary to check the daily health of agent deployments, looking for sudden drops in stability.

### Auditing agentic decision making
A developer uses the scanner to verify that an agent is actually recognizing its own errors rather than just repeating the same failed command.

## Benefits

- Stop guessing agent reliability by using calculate_rate to get a hard stability score.
- Identify failing loops instantly by using scan_logs to find error recognition markers.
- Get a bird's-eye view of execution health with the get_summary reporting tool.
- Reduce debugging time by automating the search for self-correction patterns in logs.
- Quantify agent intelligence by measuring how often they successfully pivot after a mistake.

## How It Works

The bottom line is you get a mathematical way to measure how well your agents fix their own mistakes.

1. Point your agent's execution logs toward the scanner.
2. The system parses the logs for specific success and error recognition markers.
3. You receive a statistical breakdown of the agent's stability and correction rates.

## Frequently Asked Questions

**How can the Agent Self-Reflection Sentiment Scanner help me debug agents?**
It automates the process of finding where an agent realizes it has made an error. Instead of reading every line, you get a count of how many times the agent self-corrected.

**Can I use the Agent Self-Reflection Sentiment Scanner with any agentic workflow?**
Yes, as long as your agent produces logs that contain markers for errors and successes, this MCP can parse them to give you stability metrics.

**What is a 'self-correction frequency rate' in the Agent Self-Reflection Sentiment Scanner?**
It is a mathematical ratio that tells you how often your agent fixes its own mistakes compared to the total number of loops it performs.

**Does the Agent Self-Reflection Sentiment Scanner work with Claude or Cursor?**
Yes, you can connect this MCP to any compatible client like Claude, Cursor, or Windsurf to analyze your agent's performance directly in your workflow.

**How does the Agent Self-Reflection Sentiment Scanner measure agent stability?**
It measures stability by looking at the relationship between error recognition and successful task completion within the execution logs.

**What are self-correction markers?**
They are specific linguistic phrases like 'I made a mistake' or 'The task is complete' that indicate an agent's internal state transition.

**How is the stability score calculated?**
The stability score is derived from the frequency rate of error recognition markers relative to the total number of completed execution loops.

**Can I use this with Claude Desktop?**
Yes, this MCP server can be connected to Claude Desktop, Cursor, VS Code, Windsurf, and any other MCP-compatible client via Vinkius Edge.