๐Ÿš€ v0.3.0 - Now with 27 tools for AI agents

Memory + Self-Awareness Layerfor AI Agents

Give AI agents the ability to remember, replay, and undo their actions. The infrastructure layer that makes agents self-aware.

โœ“ Claude โœ“ Cursor โœ“ Windsurf โœ“ LangChain
27
MCP Tools
2
Languages
5+
Integrations
MIT
License

Quick Install

npx statecli-mcp-server

Or add to your MCP config:

{
  "mcpServers": {
    "statecli": {
      "command": "npx",
      "args": ["-y", "statecli-mcp-server"]
    }
  }
}

Why Agents Need Memory + Self-Awareness

AI agents are powerful but blind. They don't remember what they changed, can't undo mistakes, and have no awareness of their impact. StateCLI fixes this.

โŒ Problem

"I changed something but don't know what"

โœ… Solution

statecli_replay(entity)

โŒ Problem

"I broke something and need to undo"

โœ… Solution

statecli_undo(entity)

โŒ Problem

"I want to try something risky"

โœ… Solution

statecli_checkpoint(entity)

โŒ Problem

"Will this change break other files?"

โœ… Solution

statecli_predict_impact(file)

27 Tools for AI Agents

Core

  • โ€ข statecli_track
  • โ€ข statecli_replay
  • โ€ข statecli_undo
  • โ€ข statecli_checkpoint
  • โ€ข statecli_log

File Tracking

  • โ€ข statecli_track_file
  • โ€ข statecli_file_history

Error Recovery

  • โ€ข statecli_analyze_error
  • โ€ข statecli_auto_recover
  • โ€ข statecli_safe_execute

Test Awareness

  • โ€ข statecli_run_tests
  • โ€ข statecli_test_impact
  • โ€ข statecli_suggest_tests

Dependencies

  • โ€ข statecli_analyze_dependencies
  • โ€ข statecli_dependency_tree
  • โ€ข statecli_find_circular

Impact Analysis

  • โ€ข statecli_predict_impact
  • โ€ข statecli_is_safe
  • โ€ข statecli_preview_undo

Works With

๐ŸŒŠ Windsurf โšก Cursor ๐Ÿค– Claude ๐Ÿ”— LangChain ๐Ÿ‘ฅ CrewAI

Python Integration

pip install statecli

from statecli import StateCLI, get_statecli_tools

# Direct usage
cli = StateCLI()
cli.checkpoint("project:myapp", "before-refactor")
cli.track("file", "src/index.py", {"action": "modified"})
result = cli.replay("file:src/index.py")

# LangChain integration
from statecli import get_statecli_tools
tools = get_statecli_tools()
agent = initialize_agent(tools, llm)

Real-World Use Cases

See how AI agents use StateCLI to code more reliably

๐Ÿ”„ Safe Refactoring

Before touching core files, the agent checks dependencies and creates a checkpoint. If tests fail, it rolls back instantly.

statecli_checkpoint() โ†’ edit โ†’ statecli_undo()

๐Ÿ› Error Recovery

When an error occurs, the agent analyzes what changed and automatically suggests or executes a fix.

statecli_analyze_error() โ†’ statecli_auto_recover()

๐Ÿ“Š Impact Prediction

Before renaming a function, the agent predicts which files will break and in what order to update them.

statecli_predict_impact() โ†’ statecli_safe_change_order()

๐Ÿงช Test Awareness

After editing a file, the agent knows exactly which tests to run and tracks pass/fail history.

statecli_test_impact() โ†’ statecli_run_tests()

Ready to Supercharge Your AI Agent?

Install in 30 seconds. No configuration required.

// Add to your mcp_config.json
{
  "mcpServers": {
    "statecli": {
      "command": "npx",
      "args": ["-y", "statecli-mcp-server"]
    }
  }
}