Execution guard for AI agents — prevents duplicate tool calls on retry.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-azender1-safeagent": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Execution guard for AI agents — prevents duplicate tool calls on retry.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationBe the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for io.github.azender1/safeagent and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
AI agents retry. Retries fire side effects twice.
Duplicate payment. Duplicate email. Duplicate trade. Duplicate ticket.
SafeAgent is an execution guard that sits between an agent decision and an irreversible action. It gives every tool call a request ID, records a durable receipt on first execution, and returns that receipt on every retry — without running the side effect again.
pip install safeagent-exec-guard
Python 3.10+ · Apache-2.0 · Live demo
agent calls tool
↓
network timeout
↓
agent retries
↓
side effect runs twice
Most agent frameworks handle retries at the transport layer. None of them know whether the side effect already happened. SafeAgent does.
from settlement.settlement_requests import SettlementRequestRegistry
registry = SettlementRequestRegistry()
def send_invoice():
print("Sending invoice...")
# First call — executes the side effect
receipt = registry.execute(
request_id="invoice:C123",
action="send_invoice",
payload={"to": "c123@example.com"},
execute_fn=send_invoice,
)
# Retry with the same request_id — returns the original receipt, no second send
receipt = registry.execute(
request_id="invoice:C123",
action="send_invoice",
payload={"to": "c123@example.com"},
execute_fn=send_invoice,
)
Same request_id → original receipt returned → side effect runs exactly once.
Every execution goes through a four-step control plane:
Agent decision
→ Finality gate (is this outcome confirmed?)
→ Request-ID dedup (has this exact call run before?)
→ Execute once (run the side effect)
→ Receipt stored (durable, survives restarts)
State machine: OPEN → RESOLVED → IN_RECONCILIATION → FINAL → SETTLED
Execution is only permitted from FINAL. Replays at any state return the stored receipt.
# Duplicate execution prevention
python examples/safe_agent_demo.py
# Stochastic agent signal simulation
python examples/simulate_ai.py
# Restart safety (run twice)
python examples/persist_demo.py
python examples/persist_demo.py
SafeAgent is a reference implementation and pattern library. If you're deploying this in a production agent system, see LICENSING.md for commercial options.
Apache-2.0