Skip to main content

HR fields the same PTO and benefits questions on repeat. The answers are already in your docs.

This recipe builds a private Replit page that looks those answers up in Glean. Nobody on the team has to write a backend.

A Replit account with Agent access
A Glean Client API token with the CHAT scope. Create it in Admin Console → API access → Client API tokens, and keep it in Replit Secrets. Every request uses that token owner's access
A private Repl. Multi-user deployments require authenticated per-user Glean OAuth
1

Copy your instance name

Copy the instance name from the lookup on this page, or from https://app.glean.com/admin/about-glean. For https://acme-be.glean.com that value is acme, not the full URL and not app.glean.com. Cookbook plugin users can run resolve-backend.mjs with the work email and use the instance field.

2

Copy the prompt into a private Repl

Click Copy Replit prompt. Replace <your-glean-instance> with your instance name. Paste the result into a new private Repl at https://replit.com/new and open Agent. Cookbook plugin users: the same text is in replit-agent-prompt.md next to this skill.

3

Add secrets when Replit asks

When Replit Agent asks, add GLEAN_API_TOKEN and GLEAN_INSTANCE in the Secrets tab, never in the chat. This token is one person's Glean access. Keep the Repl private.

4

Ask a PTO question, then an off-topic one

Ask "What is our PTO policy?" and confirm a cited answer from your own docs. Then ask "what's our revenue?" and confirm the assistant does not invent an answer when Glean cites nothing.

Take it further
  • Scope the CHAT token even further if your Glean plan supports per-collection tokens, so this tool can only ever answer from HR content.
  • Compare this to no-code-it-helpdesk-lovable. Same Chat API call, same constraint that the browser never holds the token, different no-code tool and persona.

What is our PTO policy?

A cited answer from your own HR docs, with a real title and URL.

what's our revenue?

No fabricated answer when Glean cites nothing. The page shows that it does not know.

View source

Paste into a new private Replit project. Replace <your-glean-instance> first.

Auth

Create a Client API token with CHAT in Token Management. Keep it in the host's secret store, never in a prompt. Steps: Glean-issued tokens.

At a glance
SurfacesClient API
StatusShowcase
Time~45 min
Required scopes
CHAT