Ralph Attach logo

Ralph Attach

Community
jmagly
ralph-attach

Attach to a running agent loop's live output stream

Overview

Publisherjmagly
Repositoryaiwg
Skill nameralph-attach
Stars
225
Forks
34
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jmagly on GitHub. Read the source before you install it.

Installation

Install the Ralph Attach AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/agent-loop/skills/ralph-attach
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jmagly/aiwg.git /tmp/aiwg
mkdir -p .claude/skills
cp -r /tmp/aiwg/agentic/code/addons/agent-loop/skills/ralph-attach .claude/skills/ralph-attach
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ralph Attach in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ralph Attach on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ralph Attach is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Al Attach

Attach to a running external agent loop and tail its output log in real time. Press Ctrl+C to detach without interrupting the loop.

Natural Language Triggers

Users may say:

  • "ralph attach"
  • "attach to ralph"
  • "follow ralph"
  • "watch ralph output"
  • "tail the agent loop"
  • "stream ralph progress"

Parameters

--loop-id (optional)

The ID of the loop to attach to. If omitted, attaches to the most recently started active loop.

/ralph-attach --loop-id abc123

When multiple loops are active, you must specify --loop-id. Run /ralph-status first to list active loop IDs.

Behavior

When triggered:

  1. Read .aiwg/ralph-external/loops/ to find active loop state files
  2. If --loop-id is not provided, select the loop with the most recent startedAt timestamp that has status: "running"
  3. If no active loop is found, report clearly and exit
  4. If multiple loops are active and no --loop-id is given, list them and prompt the user to specify
  5. Resolve the loop's logFile path from its state JSON (typically .aiwg/ralph-external/logs/<loop-id>.log)
  6. Begin reading the log file from the current end, streaming new lines as they are appended
  7. Display each new line to the user as it arrives, prefixed with a timestamp
  8. Continue until the user presses Ctrl+C or the loop reaches a terminal state (succeeded, failed, aborted)
  9. On loop completion, print a final status banner and exit cleanly

Output format while tailing:

[10:42:01] Agent loop abc123 — ACTIVE (iteration 3/10)
[10:42:01] Running verification: npm test
[10:42:03] PASS src/auth/auth.test.ts
[10:42:03] Tests: 12 passed, 0 failed
[10:42:04] Iteration 3: VERIFIED — criteria met
[10:42:04] Agent loop: SUCCESS

On loop completion:

═══════════════════════════════════════════
Agent Loop Completed: SUCCESS
Loop ID: abc123
Iterations: 3
Duration: 4m 12s
Report: .aiwg/ralph-external/reports/abc123.md
═══════════════════════════════════════════

Detached from loop abc123.

Error Handling

No active loops:

No active agent loops found.

Start one with:
  aiwg ralph "your task" --completion "criteria"

Or check completed loops with:
  /ralph-status --all

Loop ID not found:

Loop 'xyz999' not found in .aiwg/ralph-external/loops/.

Active loops:
  abc123 — Fix auth tests (running, iteration 2/10)
  def456 — Migrate to ESM (running, iteration 5/20)

Attach with: /ralph-attach --loop-id abc123

Log file missing or unreadable:

Cannot read log for loop abc123.

Expected: .aiwg/ralph-external/logs/abc123.log
Check that the loop process is still running and has write access to the log directory.

Multiple loops active (no --loop-id):

Multiple active agent loops. Specify which to attach to:

  abc123 — Fix auth tests (running, iteration 2/10, started 10:38)
  def456 — Migrate to ESM (running, iteration 5/20, started 09:15)

Usage: /ralph-attach --loop-id <id>

State File Location

  • Loop states: .aiwg/ralph-external/loops/<loop-id>.json
  • Loop logs: .aiwg/ralph-external/logs/<loop-id>.log
  • Reports: .aiwg/ralph-external/reports/<loop-id>.md

Examples

Example 1: Attach to the only active loop

/ralph-attach

Response: Streams live output from the single running agent loop.

Example 2: Attach to a specific loop by ID

/ralph-attach --loop-id abc123

Response: Streams output only from loop abc123.

Example 3: Detach without stopping

Press Ctrl+C while attached. Response: Returns to normal prompt; the agent loop continues running unaffected.

Related

  • /ralph-status — Check loop IDs and current iteration progress
  • /ralph-abort — Stop a loop entirely
  • /ralph-resume — Resume a paused loop
  • /ralph-external — Start a new crash-resilient external loop

References

  • @$AIWG_ROOT/src/cli/handlers/ralph.ts — Al handler (attachToLoopOutput)
  • @$AIWG_ROOT/src/cli/handlers/ralph-launcher.ts — Loop launcher and state management
  • @$AIWG_ROOT/agentic/code/addons/agent-loop/README.md — Al documentation
  • @$AIWG_ROOT/tools/ralph-external/README.md — External loop architecture

Frequently asked questions

What does the Ralph Attach AI skill do?

Attach to a running agent loop's live output stream

Why use Ralph Attach on TypingMind?

Because you install it once and use it with any model. Ralph Attach is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ralph Attach in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jmagly/aiwg/tree/main/agentic/code/addons/agent-loop/skills/ralph-attach. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ralph Attach?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ralph Attach?

As many as you like. As long as a model supports skills, you can use Ralph Attach with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ralph Attach AI skill free?

Yes. It is published on GitHub by jmagly under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇