async-repl-protocol
Scannednpx machina-cli add skill parcadei/Continuous-Claude-v3/async-repl-protocol --openclawFiles (1)
SKILL.md
634 B
Async REPL Protocol
When working with Agentica's async REPL harness for testing.
Rules
1. Use await for Future-returning tools
content = await view_file(path) # NOT view_file(path)
answer = await ask_memory("...")
2. Single code block per response
Compute AND return in ONE block. Multiple blocks means only first executes.
# GOOD: Single block
content = await view_file(path)
return any(c.isdigit() for c in content)
# BAD: Split blocks (second block never runs)
content = await view_file(path)
Source
git clone https://github.com/parcadei/Continuous-Claude-v3/blob/main/.claude/skills/async-repl-protocol/SKILL.mdView on GitHub Overview
Defines how to interact with Agentica's async REPL harness during testing. It enforces awaiting futures and delivering results in a single code block to keep execution deterministic.
How This Skill Works
In practice, any function that returns a Future must be awaited (e.g., content = await view_file(path)). Each response should consist of one code block; multiple blocks will trigger only the first to execute. This protocol keeps test runs consistent and predictable when using Agentica's async REPL harness.
When to Use It
- When testing tools that return futures (e.g., view_file, ask_memory) in the async REPL harness
- When you need deterministic execution where only a single code block runs per response
- During integration tests for Agentica prompts and memory queries
- When benchmarking or validating end-to-end async flows
- When documenting expected REPL behavior for teammates
Quick Start
- Step 1: Identify futures-returning calls (e.g., view_file, ask_memory) and use await
- Step 2: Write a single coherent code block that computes and returns the final value
- Step 3: Run in the async REPL harness and verify the output matches expectations
Best Practices
- Always use await for any Future-returning tool
- Return results in a single code block; avoid extra blocks
- Keep the code block self-contained and readable
- Test both successful and edge-case inputs in one block
- Document any quirks of the REPL in comments
Example Use Cases
- content = await view_file(path)
- answer = await ask_memory("What's the status?")
- content = await view_file(path) return any(c.isdigit() for c in content)
- # BAD: Split blocks (second block never runs) content = await view_file(path) return len(content) > 0
- content = await view_file(path) return content.upper()
Frequently Asked Questions
Add this skill to your agents