Here we document installing teh basic tools for WAT. The first thing we need to get straight is setting up Python on MacOS properly.
# Install Required Tools
pip install open-interpreter
See Install AI Tooling and Open Interpreter. Once this is all set up and we have installed the alias we can enter into the python configured ai environment and launch open-interpreter like this:
ai-dev
We also want n8n:
brew install n8n
or use n8n desktop
# Get Anthropic Claude API Key Create an account and key at [https://console.anthropic.com/](https://console.anthropic.com/) Edit your config:
```bash nano ~/.interpreter/config.toml ```
Paste:
```toml [model] provider = "anthropic" model = "claude-3-opus-20240229" [anthropic] api_key = "your_api_key_here" ```
# Prepare Your Test Files In this folder: ``` ~/.wiki/localhost/assets/yam-demo ``` Place: | File | Description | | --------------- | ------------------------------------- | | `test.md` | Input markdown with Yam Back Matter | | `expected.json` | Desired JSON output | | `yam.js` | JS parser file to improve | | `test-suite.js` | CLI Node test runner comparing output | | `run-agent.sh` | Script to launch Open Interpreter | Example `run-agent.sh`: ```bash #!/bin/bash interpreter --run "Your task is to edit yam.js so that running \`node test-suite.js\` matches expected.json. Iterate until test passes." ``` Make it executable: ```bash chmod +x run-agent.sh ```
# Set Up n8n Workflow In `n8n`: 1. Add **File Trigger** to watch `yam.js`, `test.md`, or `expected.json` 2. Add **Execute Command** to run `./run-agent.sh` 3. Optionally: * Add Slack/email alert after success * Add Git commit node * Add HTTP request to update wiki if needed
# What Happens * Edit `test.md` or `yam.js` * `n8n` detects change and runs the agent * `Open Interpreter` uses Claude to improve `yam.js` * `test-suite.js` is run after each change * Stops when output matches `expected.json`
# Next Steps * Add multiple test files (`test-1.md`, `test-2.md`, etc.) * Enable visual test diffing in Federated Wiki * Add optional versioning with `git` in the agent loop * Define additional roles for planning/failure recovery