# MyClaw

A local AI agent terminal built on LangGraph that organizes reasoning and tool calls as a state machine, restricting tool execution to a sandbox and interrupting the agent when it detects a repeating loop.

MyClaw is a terminal-based AI agent designed around visible boundaries rather than open-ended tool access: every model input, tool call, and result is written to a structured audit log, an iteration counter with repeated-tool detection interrupts the agent when it loops, subprocess environment variables are limited to an allow list so shell tools cannot read arbitrary API keys, and file access is confined to a workspace directory with real-path resolution to defend against symlink escapes.

It keeps a three-layer memory of user profile, conversation summaries, and a knowledge base with hybrid keyword and embedding search, supports OpenAI, Anthropic, Alibaba Cloud, Tencent, Z.AI, and Ollama as model providers, and extends its capabilities through Markdown-based skill files that are indexed lightly and only fully loaded once a task matches them. It also includes an offline evaluation mode using scripted models and mock tools to test tool selection, loop detection, and memory recall without an API key.

Website: https://github.com/lzz-zzuli/MyClaw
