New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

dingdawg-loop

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dingdawg-loop

DingDawg Loop Protocol (DDLP) — safe scheduled AI agents with governance gates. Every loop execution is verified, receipted, and fail-closed. MCP-native, works with CrewAI, LangGraph, Claude Code, Cursor.

Source
npmnpm
Version
2.0.7
Version published
Weekly downloads
36
-45.45%
Maintainers
1
Weekly downloads
 
Created
Source

dingdawg-loop

DingDawg Loop Protocol (DDLP) — a framework for safe, scheduled, proactive AI agents with built-in governance gates. Agents declare what they WILL do, pass a governance check, and only then execute. If governance denies or errors, the loop skips that cycle. Fail-closed by default — no silent autonomous action.

Why DDLP Matters

AI agents running on a schedule without governance is a liability. An agent that sends emails every hour, syncs data nightly, or processes payments weekly needs a gate between "I want to act" and "I acted." DDLP puts that gate in place: every scheduled execution is governed, audited, and reversible. Proactive agents become safe by default.

Quick Start

Install

# Add to Claude Code
claude mcp add dingdawg-loop npx dingdawg-loop

# Or run directly
npx dingdawg-loop

1. Register a loop

{
  "tool": "register_loop",
  "arguments": {
    "name": "daily-report-sender",
    "schedule": "0 9 * * *",
    "action_type": "generate_report",
    "risk_tier": "low",
    "description": "Generate and save a daily analytics summary report to the reports directory every morning at 9am."
  }
}

Returns a loop_id you use for all subsequent operations.

2. Execute the loop (governance gate runs automatically)

{
  "tool": "execute_loop",
  "arguments": {
    "loop_id": "loop_abc123",
    "execution_notes": "Manual trigger for Monday report"
  }
}

The governance gate evaluates the loop's action type, description, and risk tier. Three possible outcomes:

  • allow — loop executes, receipt recorded
  • deny — loop blocked, violations listed, nothing executes
  • review — loop queued for human approval, nothing executes until approved

3. Audit execution history

{
  "tool": "loop_audit",
  "arguments": {
    "loop_id": "loop_abc123",
    "limit": 10
  }
}

Returns every execution with its governance decision, risk score, and outcome.

Tools

register_loop

Register a new scheduled agent loop.

ParameterTypeRequiredDescription
namestringyesUnique human-readable name for this loop
schedulestringyesCron expression (0 9 * * *) or shorthand (@hourly, @daily)
action_typestringyesWhat the loop does (send_email, generate_report, sync_data)
risk_tierenumyeslow, medium, high, or critical
descriptionstringyesDetailed description (min 10 chars) — governance evaluates this
metadataobjectnoKey-value pairs (owner, team, target_system)

execute_loop

Manually trigger a loop. Governance gate runs BEFORE execution.

ParameterTypeRequiredDescription
loop_idstringyesThe loop_id from register_loop
execution_notesstringnoWhy this manual execution was triggered

list_loops

List all registered loops with status and last execution.

ParameterTypeRequiredDescription
status_filterenumnoall, active, or paused (default: all)

pause_loop

Pause a loop so it cannot be executed.

ParameterTypeRequiredDescription
loop_idstringyesThe loop_id to pause
reasonstringnoWhy this loop is being paused

resume_loop

Resume a paused loop.

ParameterTypeRequiredDescription
loop_idstringyesThe loop_id to resume

loop_audit

Get execution history and governance decisions for a loop.

ParameterTypeRequiredDescription
loop_idstringyesThe loop_id to audit
limitnumbernoMax records to return (default: 20)

Safety Model

  • Fail-closed: If the governance gate throws an error, the loop does NOT execute. Period.
  • Governance receipt: Every execution (allowed, denied, or errored) gets a receipt with risk score and policy violations.
  • Pause/resume: Loops can be safely paused without losing history.
  • Audit trail: Every execution is persisted to ~/.dingdawg/loops/executions/ as JSON.
  • No silent action: The loop protocol requires explicit execute_loop calls in v1. No background daemon.

Peer Dependency

DDLP requires dingdawg-governance as a peer dependency. In v1, the governance logic runs locally inside the loop server. In v2+, it will call the governance server directly via MCP-to-MCP transport.

npm install dingdawg-governance dingdawg-loop

Storage

Loop definitions and execution records are stored locally:

~/.dingdawg/loops/
  loop_abc123.json          # loop definition
  executions/
    exec_xyz789.json        # execution record with governance receipt

Roadmap

  • v1 (current): Manual execution via execute_loop. Schedule stored but not auto-executed.
  • v2: Background daemon that executes loops on their cron schedule, with governance gate on every tick.
  • v3: Cloud API integration — governance decisions from DingDawg cloud, centralized audit trail.

License

MIT

Keywords

ai

FAQs

Package last updated on 09 Apr 2026

Related posts