Julia Relay Skill
When a user sends me a message that I should forward to Julia (the primary orchestrating AI), use this skill.
WHEN TO USE THIS SKILL
Use this skill when:
- The user asks a complex question that needs Julia's full reasoning
- The user explicitly asks to "talk to Julia" or "ask Julia"
- The task involves code, planning, or agentic work
- You receive a message you cannot handle confidently on your own
HOW IT WORKS
User → Telegram → Me (OpenClaw) → POST to bridge → Julia reads it via MCP
Julia thinks → sends reply via MCP → bridge stores reply
OpenClaw polls bridge → gets Julia's reply → sends to user via Telegram
STEP-BY-STEP PROCEDURE
Step 1: Forward the message to the bridge
curl -s -X POST http://localhost:3001/incoming \
-H 'Content-Type: application/json' \
-d '{"chatId": "<CHAT_ID>", "userId": "<USER_ID>", "username": "<USERNAME>", "text": "<MESSAGE_TEXT>"}'
Save the messageId from the JSON response.
Step 2: Acknowledge to the user (optional but friendly)
Send a brief acknowledgment while Julia processes:
"⏳ Forwarding to Julia — one moment..."
Step 3: Poll for Julia's reply (up to 60 seconds)
# Poll the REST endpoint — replies are auto-consumed to prevent stale data
for i in $(seq 1 20); do
REPLY=$(curl -s "http://localhost:3001/pending-reply/<CHAT_ID>?consume=true" | jq -r '.reply // empty')
if [ -n "$REPLY" ]; then
echo "$REPLY"
break
fi
sleep 3
done
Step 4: Send Julia's reply to the user
Send the reply text as a normal Telegram message to the user.
If no reply arrives after 60 seconds:
"⚠️ Julia is not available right now. Please try again."
CHECK IF BRIDGE IS RUNNING
Before forwarding, verify the bridge is up:
curl -s http://localhost:3001/health | jq .
If the bridge is not running (Connection refused), inform the user:
"⚠️ The Julia bridge is offline. Please start it with:
cd bridge && npm run dev"
IMPORTANT RULES
- Always check bridge health first — don't forward if bridge is down
- Always acknowledge to the user that you're forwarding
- Always replace placeholders (CHAT_ID, USER_ID, USERNAME, MESSAGE_TEXT) with real values from the Telegram event
- Never fabricate Julia's reply — only send what the bridge returns
- Log what you forward in memory so you can correlate replies