Skip to content
Back to skills

Relay To Agent

ASecurity

Relay messages to AI agents on any OpenAI-compatible API. Supports multi-turn conversations with session management. List agents, send messages, reset sessions.

  • 665 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 7, 2026
ai-agentsbashnodeapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add openclaw/skills --skill relay-to-agent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Relay To Agent?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Relay To Agent
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/openclaw-relay-to-agent/badge)](https://www.skillsdirectory.com/skills/openclaw-relay-to-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: relay-to-agent
description: "Relay messages to AI agents on any OpenAI-compatible API. Supports multi-turn conversations with session management. List agents, send messages, reset sessions."
homepage: https://platform.openai.com/docs/api-reference/chat
metadata: {"clawdbot":{"emoji":"πŸ€–","requires":{"bins":["node"]},"primaryEnv":"RELAY_API_KEY"}}
---

# Relay 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

```bash
node {baseDir}/scripts/relay.mjs --list
```

## Send a message to an agent

```bash
node {baseDir}/scripts/relay.mjs --agent linkedin-alchemist "Transform this article into a LinkedIn post"
```

## Multi-turn conversation

```bash
# 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

```bash
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`:

```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

```bash
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.

Files in this skill

  • SKILL.md2.5 KB
  • _meta.json284 B
  • agents.example.json213 B
  • package-lock.json1.1 KB
  • package.json304 B
  • scripts/relay.mjs5.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.