Install
openclaw skills install ruby-on-rails-gatewayConfigure and operate a Ruby On Rails Agent Gateway integration from the OpenClaw side for briefing pull workflows. Use when setting up OpenClaw to read app data through a Rails `/agent-gateway/:secret/briefing` endpoint, validating tokens/URL env vars, testing connectivity, and generating summary pulls for reports or automations.
openclaw skills install ruby-on-rails-gatewayThis skill works in tandem with the
agent_gateway Ruby gem,
a mountable Rails engine that must be installed and configured on the
Rails side (gem "agent_gateway" + initializer). This skill handles
the OpenClaw-side setup and usage for pulling data from that endpoint.
Require these variables before any live fetch:
AGENT_GATEWAY_TOKEN (bearer token — set in the Rails app initializer as c.auth_token)AGENT_GATEWAY_SECRET (path secret — set as c.path_secret)The OpenClaw helper script may also read:
RAILS_GATEWAY_URL (full /briefing URL, e.g. https://myapp.com/agent-gateway/<secret>/briefing)RAILS_GATEWAY_TOKEN (maps to bearer token)If env vars are missing, stop and show the exact export commands needed.
The gem uses two-layer auth:
/agent-gateway/<secret>/briefing). Wrong value returns 404 (endpoint appears nonexistent).Authorization header. Wrong/missing value returns 401.Both are compared using timing-safe secure_compare.
curl -H "Authorization: Bearer $AGENT_GATEWAY_TOKEN" \
"https://myapp.com/agent-gateway/$AGENT_GATEWAY_SECRET/briefing?period=7d&resources=users,orders"
Prefer the local helper script when present:
/home/node/.openclaw/workspace/scripts/rails-gateway-briefing --period 7d
With explicit env vars:
RAILS_GATEWAY_URL='https://myapp.com/agent-gateway/<secret>/briefing' \
RAILS_GATEWAY_TOKEN='***' \
/home/node/.openclaw/workspace/scripts/rails-gateway-briefing --period 7d --resources users,orders
| Param | Description | Example |
|---|---|---|
period | Time window: 1d, 7d, 30d, 90d, 1y, all | ?period=30d |
resources | Comma-separated resource keys | ?resources=users,orders |
latest | Override latest count for all resources | ?latest=10 |
Resources are configured per-app via the gem's DSL. Common examples:
--resources users--resources ordersUse --latest N to cap detailed rows while keeping counts.
The gem DSL also supports aggregations (count, sum, avg) on numeric
columns — these appear in the response alongside count and latest.
briefing endpoint usage only).If calls fail:
/agent-gateway/<secret>/briefing.AGENT_GATEWAY_TOKEN).--resources users --period 7d --latest 1).For reusable command snippets and output interpretation, read
references/usage.md.