relay-to-agentRelay messages to AI agents on any OpenAI-compatible API. Supports multi-turn conversations with session management. List agents, send messages, reset sessions.
Install via ClawdBot CLI:
clawdbot install ericsantos/relay-to-agentRequires:
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.
node {baseDir}/scripts/relay.mjs --list
node {baseDir}/scripts/relay.mjs --agent linkedin-alchemist "Transform this article into a LinkedIn post"
# 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"
node {baseDir}/scripts/relay.mjs --agent linkedin-alchemist --reset "Start fresh with this article..."
| 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 |
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"
}
]
}
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
api.connectchat.ai/apiopenrouter.ai/api/v1localhost:4000/v1localhost:8000/v1localhost:11434/v1Sessions 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.
Generated Mar 1, 2026
Marketing teams can use this skill to generate and refine content across multiple platforms, such as transforming articles into LinkedIn posts or creating campaign analyses. It supports multi-turn conversations for iterative content improvement, making it ideal for agencies managing diverse client needs.
Businesses can deploy AI agents to handle initial customer inquiries, with session management allowing for context-aware follow-ups. This reduces response times and frees up human agents for complex issues, suitable for e-commerce or tech support services.
Researchers can leverage this skill to interact with AI models for data interpretation, such as analyzing campaign metrics or comparing monthly reports. The ability to reset sessions ensures clean starts for new datasets, beneficial in academic or business intelligence contexts.
Developers can integrate this skill into custom workflows to test and deploy AI agents across various OpenAI-compatible APIs like Ollama or vLLM. It facilitates rapid prototyping and model switching, useful in software development and AI experimentation.
Media companies can use this skill to tailor content for different audiences by sending messages to specialized agents. Session management enables personalized conversations, enhancing user engagement in publishing or entertainment industries.
Offer this skill as part of a subscription-based platform for businesses needing AI agent relay services. Revenue comes from tiered plans based on usage limits, agent counts, and premium features like advanced session management.
Provide consulting services to help companies configure and deploy this skill with their existing OpenAI-compatible APIs. Revenue is generated through project-based fees for setup, customization, and ongoing support.
License this skill to other businesses for rebranding and integration into their own products. Revenue streams include licensing fees and royalties based on client usage, targeting tech companies seeking to enhance their offerings.
💬 Integration Tip
Ensure the RELAY_API_KEY is securely set in environment variables and verify the agents.json configuration matches your API endpoints for smooth operation.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection