relay-to-agent
Relay messages to AI agents on any OpenAI-compatible API. Supports multi-turn conversations with session management. List agents, send messages, reset sessions.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ericsantos/relay-to-agentRelay To Agent
Send messages to AI agents on any OpenAI-compatible endpoint. Works with Connect Chat, OpenRouter, LiteLLM, vLLM, Ollama, and any service implementing the Chat Completions API.
List available agents
node {baseDir}/scripts/relay.mjs --list
Send a message to an agent
node {baseDir}/scripts/relay.mjs --agent linkedin-alchemist "Transform this article into a LinkedIn post"
Multi-turn conversation
# First message
node {baseDir}/scripts/relay.mjs --agent connect-flow-ai "Analyze our latest campaign"
# Follow-up (same session, agent remembers context)
node {baseDir}/scripts/relay.mjs --agent connect-flow-ai "Compare with last month"
Reset session
node {baseDir}/scripts/relay.mjs --agent linkedin-alchemist --reset "Start fresh with this article..."
Options
| Flag | Description | Default |
|---|---|---|
--agent ID | Target agent identifier | (required) |
--reset | Reset conversation before sending | off |
--list | List available agents | — |
--session ID | Custom session identifier | default |
--json | Raw JSON output | off |
Configuration
agents.json
Configure agents and endpoint in {baseDir}/agents.json:
{
"baseUrl": "https://api.example.com/v1",
"agents": [
{
"id": "my-agent",
"name": "My Agent",
"description": "What this agent does",
"model": "model-id-on-the-api"
}
]
}
Environment variables
export RELAY_API_KEY="sk-..." # API key (required)
export RELAY_BASE_URL="https://..." # Override base URL from config
export RELAY_CONFIG="/path/to/agents.json" # Custom config path
Compatible Services
- Connect Chat —
api.connectchat.ai/api - OpenRouter —
openrouter.ai/api/v1 - LiteLLM —
localhost:4000/v1 - vLLM —
localhost:8000/v1 - Ollama —
localhost:11434/v1 - Any OpenAI-compatible API
Session Management
Sessions are stored locally at ~/.cache/relay-to-agent/sessions/. Each agent+session combination keeps up to 50 messages. Use --session for parallel conversations with the same agent.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ericsantos-relay-to-agent": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
serpapi
Search Google via SerpAPI (Google Search, Google News, Google Local). Use when you need to search the web, find news articles, or look up local businesses. Supports country/language targeting for region-specific results.
jina-reader
Web content extraction via Jina AI Reader API. Three modes: read (URL to markdown), search (web search + full content), ground (fact-checking). Extracts clean content without exposing server IP.
messaging
NexusMessaging Protocol client — ephemeral agent-to-agent sessions. Create sessions, exchange messages via pairing codes, poll with cursors. Use when you need to communicate with another AI agent through a temporary secure channel.
perplexity
Deep search via Perplexity API. Three modes: search (quick facts), reason (complex analysis), research (in-depth reports). Returns AI-grounded answers with citations.
confidant
Secure secret handoff and credential setup wizard for AI agents. Use when you need sensitive information from the user (API keys, passwords, tokens) or need to save credentials to config files. Never ask for secrets via chat — use Confidant instead.