letitloop MCP server
2026년 11월 14일 커밋외부 데몬 없이도 Python 함수와 AI agent 파이프라인의 프로세스 내 내구성과 프로세스 감독 기능을 제공하여 크래시 발생 시 복구를 보장합니다.
다른 이름 sdageltc/letitloop
- 스타
- 6
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 14일
- 라이선스
- MIT
letitloop MCP란?
letitloop은(는) MCP server입니다. 외부 데몬 없이도 Python 함수와 AI agent 파이프라인의 프로세스 내 내구성과 프로세스 감독 기능을 제공하여 크래시 발생 시 복구를 보장합니다.
프로젝트 README에서 생성된 요약
letitloop MCP server 정보
letitloop은 Python 함수와 AI agent 파이프라인이 프로세스 크래시 상황에서도 중단 없이 실행될 수 있도록 지원합니다. 외부 데몬, Redis 큐 또는 복잡한 데이터베이스 클러스터 없이도 프로세스 내 내구성과 프로세스 감독 기능을 제공합니다. 단일 파일 Write-Ahead Log를 사용하여 SIGKILL 또는 OOM 이벤트 발생 후에도 밀리초 단위로 중단된 정확한 단계부터 스크립트를 재개할 수 있습니다.
사용자는 코드에 @durable 또는 @supervise와 같은 데코레이터를 추가하거나, 터미널에서 lil watch 명령을 사용하여 스크립트를 자동 재시작함으로써 이를 구현할 수 있습니다. CrewAI, LangGraph, Microsoft AutoGen, Hugging Face Smolagents와 같은 인기 프레임워크를 위한 전용 어댑터도 포함되어 있습니다. 이 방식은 분산 클러스터를 관리하는 운영 부담 없이, 비용이 많이 드는 LLM 파이프라인에 대해 크래시 방지 실행이 필요한 개발자를 위해 설계되었습니다.
활용 사례
- 1중단된 AI agent 워크플로 복구운영 체제에 의해 프로세스가 종료되더라도 AI agent가 마지막으로 성공한 체크포인트부터 다단계 작업을 재개할 수 있습니다.
- 2외부 API 호출 중복 방지원자적 마커를 사용하여 크래시가 발생하더라도 Slack 알림 전송과 같은 사이드 이펙트가 단 한 번만 발생하도록 보장할 수 있습니다.
- 3장시간 실행되는 Python 스크립트 감독지정된 백오프 및 최대 재시작 제한을 적용하여 스크립트를 자동으로 재시작하는 와처 하에서 기존 스크립트를 실행할 수 있습니다.
- 4agent 프레임워크에 내구성 통합특정 내구성 핸들러 또는 직렬화 도구로 래핑하여 기존의 멀티 에이전트 설정을 크래시 복구 가능하게 만듭니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
DEEPSEEK_API_KEY
| 이름 | 설명 | 유형 |
|---|---|---|
| DEEPSEEK_API_KEY | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능sdageltc/letitloop is public and reachablegithub.com/sdageltc/letitloop ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-14github.com/sdageltc/letitloop ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기let it loop (LIL)
The SQLite of Durable Execution — Zero-daemon in-process durability and process supervisor for Python functions & AI agents.
Official Website • DCP-2.0 Benchmark • GitHub Action v2 • PyPI Package
Temporal is great if you have a DevOps team to manage a cluster. LetItLoop is for developers who want crash-proof Python functions and AI agent pipelines in 3 lines of code without running a single daemon.
⚡ Quickstart
from letitloop import durable, step, atomic_marker
@durable(goal_id="customer_sync")
def sync_workflow():
# If this process crashes or gets SIGKILLed midway,
# completed steps are skipped on resume in <15ms. Zero duplicate tokens wasted.
user = step("fetch_user", fetch_crm_record, user_id=123)
summary = step("summarize", call_claude, user)
# Protect external API mutations against duplicate execution
with atomic_marker("slack_notification") as should_execute:
if should_execute:
step("notify", send_slack, summary)
return summary
if __name__ == "__main__":
sync_workflow()
pip install letitloop
⚡ Async Support: For asynchronous pipelines, use
@durable_asyncandawait async_step(...)with fullasyncio.gather()isolation.
Interactive crash-recovery visualizer
Install the optional UI dependency and run the local Streamlit demo:
python -m pip install -e .
python -m pip install -r examples/interactive_demo/requirements.txt
streamlit run examples/interactive_demo/app.py
The demo lets you inject a real subprocess crash, resume the same five-step workflow from WAL, and inspect cached-step timings. It uses deterministic data only and makes no model/API calls.
🔄 Process Liveness: Auto-Supervision & CLI Watcher
LetItLoop bridges the gap between State Durability (saving steps to disk) and Process Liveness (auto-restarting on SIGKILL 137 / OOM) with zero external daemons:
1. Terminal Watcher (lil watch)
Run any existing Python script under supervisor control with rapid-failure circuit breaking and clean Ctrl+C handling:
# Auto-respawns on SIGKILL (137), resuming from last WAL checkpoint in ~14ms
lil watch agent_pipeline.py --max-restarts 10 --backoff 1.0
2. In-Code Programmatic Supervisor (@supervise)
from letitloop import durable, step, supervise
@supervise(max_restarts=5, backoff=1.0)
@durable(goal_id="equity_analyst")
def run_pipeline():
user = step("fetch_data", fetch_financials)
report = step("generate_report", analyze, user)
return report
if __name__ == "__main__":
run_pipeline()
🔌 Multi-Framework Durability Adapter Suite
Make any major AI multi-agent framework crash-resilient in 2 lines of code with zero daemon overhead:
# 1. CrewAI
from letitloop.adapters.crewai import CrewAIDurabilityHandler
handler = CrewAIDurabilityHandler(session_id="research_crew")
handler.wrap_crew(my_crew)
# 2. Hugging Face Smolagents
from letitloop.adapters.smolagents import SmolagentsWALCallback
agent = CodeAgent(tools=[...], model=model, step_callbacks=[SmolagentsWALCallback()])
# 3. Microsoft AutoGen 0.4
from letitloop.adapters.autogen import AutoGenStateSerializer
serializer = AutoGenStateSerializer(session_id="autogen_chat")
serializer.wrap_agent(assistant_agent)
# 4. LangGraph
from letitloop.adapters.langgraph import LetItLoopCheckpointSaver
app = workflow.compile(checkpointer=LetItLoopCheckpointSaver())
See docs/adapters.md for complete framework recipes, lifecycle callbacks, and benchmark details.
💎 The 4 Architectural Moats
1. Zero-Daemon Local Durability (Zero Infrastructure)
No background Go servers, no Redis queues, and no PostgreSQL cluster configuration. LetItLoop embeds a single-file Write-Ahead Log (LILWAL02) that logs step outputs atomically. If your script dies from SIGKILL (137), OOM, or spot eviction, running the script again instantly fast-forwards to the exact interrupted step in 72 $\mu$s/step.
2. O(N) Discrete Delta Writes & 168x WAL Compaction
Naive state serialization engines rewrite full JSON dictionaries on every step, leading to catastrophic $O(N^2)$ write amplification. LetItLoop v0.7.1 uses discrete delta subkey patching under step_outputs, slashing WAL disk usage by 168x (from 83.2 MB down to 378 KB for 1,000 steps) and accelerating replay recovery by 17.6x.
3. Concurrency-Safe 2-Tier Mutex (atomic_marker)
Guards external side-effects with a two-tier mutex combining process-local thread locks and cross-process FileLock with CAS ownership verification and bounded SHA-256 filenames (m-{sha256[:32]}). Commit publishing uses atomic tempfile replacement (os.fsync + atomic rename), completely preventing multi-worker race conditions.
[!IMPORTANT] Durability Contract Boundary:
atomic_markerguarantees serialized execution and durable local completion records across restarts. For external remote HTTP APIs (e.g. Stripe charges, webhooks), no client-side filesystem marker can prevent replay if a crash strikes between HTTP dispatch and marker publication. For non-idempotent remote calls, pass an upstream idempotency key derived from the task context:idempotency_key=f"{run_id}:{marker_id}".
4. Safe Type Preservation (DurableCodecRegistry)
Preserves native Python types (datetime, uuid.UUID, pathlib.Path, tuple, dataclasses, and Pydantic models) across execution and recovery. Replay yields identical hydrated types without dynamic code execution risks or serialization demotion.
📊 DCP-2.0 Agent Durability Conformance Benchmark
How does LetItLoop compare against heavyweight workflow engines and existing agent frameworks under physical host OS SIGKILL (137) fault injection?
Empirical results from the open DCP-2.0 Durability Benchmark:
| Architecture & Runtime | Durability Mechanism | Crash Recovery ($R_{crash}$) | Resumption Latency ($T_{resume}$) | Duplicate Token Waste ($W_{token}$) | Per-Step Write Overhead | Proof / Audit Trail |
|---|---|---|---|---|---|---|
LetItLoop (@durable WAL) |
Single-File Atomic WAL (LILWAL02) | 98.6% PASS | 14.2 ms | 2.8% (interrupted step) | +3.8 ms (fsync journal) | HMAC-SHA256 Sealed |
| Temporal (Durable Workflows) | Distributed Event Sourcing (Cluster) | 99.2% PASS | 74.0 ms | 1.9% | +18.5 ms (gRPC cluster) | Cluster Event History |
| LangGraph (SQLite Saver) | Superstep Graph Checkpointing | 84.5% PARTIAL | 38.4 ms | 16.8% (node re-run) | +1.2 ms (SQLite row) | Database Row Logs |
| CrewAI (In-Memory Loop) | In-memory process queue | 0.0% LOSS | N/A (Full restart) | 100.0% (Total wipe) | 0.0 ms (Zero disk writes) | None |
| Microsoft AutoGen | In-memory ConversableAgent state | 0.0% LOSS | N/A (Full restart) | 100.0% (Total wipe) | 0.0 ms (Zero disk writes) | None |
| Raw Python (Unmanaged CLI) | Standard runtime globals | 0.0% LOSS | N/A (Full restart) | 100.0% (Total wipe) | 0.0 ms (Zero disk writes) | None |
[!NOTE] Methodological Disclosure & Architectural Trade-offs:
- Why 100% durability is physically impossible: If a non-maskable
SIGKILLstrikes while an uncommitted external network request is actively in flight, that single step must be re-executed upon resume, producing an empirical ~1.4%–2.8% token re-execution overhead.- The I/O Overhead Trade-off: LetItLoop trades ~3.8ms disk fsync write latency per step to guarantee sub-millisecond local recovery. For pure in-memory math loops, this is unnecessary overhead; for LLM/API agent pipelines costing $0.10–$2.00 per step, paying 3.8ms disk I/O to guarantee zero lost progress is an overwhelming net win.
🔄 Durability vs. Liveness (Auto-Supervision)
- Durability (LetItLoop Kernel): Guarantees that completed state is never lost when a process terminates.
- Liveness (Supervisor Runner): When a process gets killed by the OS (
SIGKILL), it requires a supervisor to automatically respawn it. LetItLoop provides built-in supervision:
# Supervise execution and auto-respawn process on unhandled SIGKILL/crash until completion
lil watch agent_script.py --max-restarts 10 --backoff 1.0
🍳 Framework Recipes & Community Cookbooks
Explore runnable self-contained examples in examples/:
| Framework | Recipe / Cookbook | Status | Description |
|---|---|---|---|
| CrewAI | Durable Tools Example | ✅ Ready | Multi-agent tool execution with step-level resumption and zero duplicate side-effects |
| LlamaIndex | Durable Workflows Example | ✅ Ready | Event-driven @step pipeline with crash durability and sub-millisecond fast-forward |
| OpenAI Swarm | Durable Handoff Example | ✅ Ready | Multi-agent context handoff with WAL v2 serialization |
| LangGraph | Financial Analyst Agent | ✅ Ready | 4-step yfinance + DeepSeek StateGraph with independently audited SIGKILL recovery |
| Playwright | Crash-Resilient Web Scraper | ✅ Ready | Multi-page browser scraper with @durable_async checkpointing that skips already-scraped pages (<1ms WAL lookup) |
| Streamlit / UI | Interactive WAL Visualizer | ✅ Ready | Real-time crash injection & fast-forward WAL replay visualizer with token savings metrics |
| DSPy | Issue #83: Prompt Optimizer Pipeline | 🤝 Contributor | Async BootstrapFewShot / Teleprompter tuning with zero lost progress |
| Pydantic AI | Issue #89: Pydantic AI Integration | 🤝 Contributor | Type-safe agent with tool-calling checkpointing and zero token waste |
Install and run the financial analyst without paid API calls:
python -m pip install -e ".[financial-agent]"
python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --offline
python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --offline --demo
For a live investment memo, configure DeepSeek only through the environment:
export DEEPSEEK_API_KEY="your-key"
python examples/cookbooks/langgraph_financial_analyst.py --ticker AAPL --model deepseek:deepseek-v4-flash --live
If a local Python installation has no default CA bundle, set SSL_CERT_FILE="$(python -m certifi)". On POSIX, the demo
sends SIGKILL only after the market data, indicators, and LLM memo have each been committed to WAL (Windows uses
exit 137). It records
yfinance/LLM calls and token usage in a separate fsynced log, then proves those counters do not increase on
recovery. Reported <1ms measurements cover only in-memory async_step cache lookups—not Python startup,
imports, WAL initialization, or the unfinished report node.
🛡️ GitHub Action CI Gate (v2)
Drop letitloop-action@v2 into your CI pipeline to block non-deterministic AI agent regressions:
name: LetItLoop Proof-Carrying CI Gate
on: [pull_request]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sdageltc/letitloop-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
strict-ast: 'true'
📜 Architecture Decision Records (ADRs)
Core design invariants are documented under docs/adr/:
- ADR-0001: Write-Ahead Logging (WAL) & Zero-State Recovery
- ADR-0002: Deterministic AST & Exit-Code Verification Gates
- ADR-0003: Zero-API-Key Headless Agent CLI Failovers
- ADR-0004: Format-Aware Acceptance Checks & Markdown Invariants
👥 Contributors
License
Distributed under the MIT License. Copyright (c) 2026 sdageltc. See LICENSE for details.
letitloop MCP 질문
CrewAI 또는 LangGraph와 같은 기존 AI 프레임워크와 함께 사용할 수 있나요?
네, CrewAI, Hugging Face Smolagents, Microsoft AutoGen, LangGraph를 위한 멀티 프레임워크 내구성 어댑터 제품군을 포함하고 있습니다.
스크립트가 실패할 경우 어떻게 자동으로 재시작할 수 있나요?
터미널 와처 명령인 lil watch를 사용하여 자동 재시작 기능이 있는 감독 제어 하에 스크립트를 실행할 수 있습니다.