Sign in to view customer requests.
Sign in to view customer feedback.
Knowledge Autopilot
Ray and Lex answer product questions in Slack and Intercom, log uncovered ones, and a weekly digest drafts new help-centre articles.
Runtime lives at knowledge/ in this repo · Deployed to Railway.
Configure in Settings → Knowledge.
- Default model
claude-haiku-4-5-20251001- Escalates to
claude-sonnet-4-6- Invoke
@Ray AIor auto-watch- Manifest
knowledge/slack-manifest-ray.yml
prompts/product-thinking.md. Asks sharpening questions when under-specified.
- Model
claude-sonnet-4-6- Triggered by
- Ray flagging
NEEDS_LEX, or@Lex AI - Reads
prompts/product-thinking.md- Manifest
knowledge/slack-manifest-lex.yml
Ray searches recent messages in the channels listed under RAY_KB_CHANNELS (comma-separated channel IDs). He must be invited to each. Good candidates: #product, #support, #eng-help.
Lookback window controlled by RAY_KB_LOOKBACK_DAYS (default 90).
- Hard ceiling per thread
MAX_COST_USD_PER_THREAD· default $1.00- Tool calls per agent
MAX_TOOL_CALLS_PER_AGENT· default 8- Average per thread
- ~20¢ (Ray clean: 3–8¢ · Ray+Lex prioritise: 30–55¢)
An Intercom inbox app surfaces an Ask Ray button on every conversation. Clicking it runs Ray against the conversation context and posts the answer back as a canvas reply — handy for support agents who want a second opinion before responding.
- In Intercom Developer Hub, create an inbox app.
- Set the Initialize and Submit URLs to
https://<your-railway-domain>/intercom/canvas. - Set
INTERCOM_CLIENT_SECRETin Railway env so signature verification works. - Adjust
INTERCOM_CANVAS_PORTif the default3002conflicts. - Install the inbox app on your workspace and pin it to the conversation sidebar.
- Source
knowledge/src/intercom/canvas-kit.ts- Path
POST /intercom/canvas- Healthcheck
GET /intercom/health- Agent used
- Ray (no Lex chain in canvas mode)
data/kb-gaps.jsonl and the live changelog.
Choose which project statuses customers can see, and what to call them. Multiple statuses can share the same customer label — they'll be merged into one group on the portal.
Select which projects customers can see. Per-project: toggle whether to show the target date and description.
knowledge/ service on Railway. The Gap finder calls
GET <url>/knowledge/gap-scan; the runtime fetches Intercom + GitHub server-side using
its own tokens (no secrets in the browser).
INTERCOM_ACCESS_TOKEN,
GITHUB_REPO) — no separate setting in the admin.
- From repo root:
cd knowledge && npm install && cp .env.example .env. - Create two Slack apps (Ray + Lex) using the manifests in
knowledge/. Seeknowledge/README.md§2. - Generate Intercom, Linear, Notion, GitHub, and Anthropic tokens. Paste into
.env. - Run
npm run devlocally to verify both bots come online. - Deploy to Railway:
railway init && railway up. Mirror env vars from.env.example. - Point Slack Event Subscriptions to
/slack/eventson the Railway domain. Turn Socket Mode off. - (Optional) Create the Intercom inbox app pointing to
/intercom/canvas. - (Optional) Create a Notion DB for help-centre drafts and set
NOTION_KB_DRAFT_DB_ID. Schedulenpm run kb-digestweekly.
Configured on Railway, not in this UI. This is a reference checklist.
- Healthcheck
GET /intercom/healthon the Railway service- KB gap log
knowledge/data/kb-gaps.jsonl(gitignored)- Weekly digest
npm run kb-digest· default Monday 9am- Manifests
knowledge/slack-manifest-ray.yml,slack-manifest-lex.yml- Strategic pillars
knowledge/prompts/product-thinking.md