Glean Hello World

SkillSearch

'Index documents into Glean and search them back using the Indexing and

Use Glean Hello World in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add Glean Hello World and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the Glean Hello World skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Glean Hello WorldStart free

What this skill tells your AI

The instructions your AI receives, as published by jeremylongshore/tons-of-skills-marketplace in skills/.curated/glean-hello-world/SKILL.md and read by Ahel’s review.

Overview

Index documents into Glean and search them. Two steps: set up a custom datasource with the Indexing API, then query with the Client API.

Prerequisites

  • Use an approved sandbox datasource, scoped non-production credentials, and fictional sample documents only.
  • Prepare one synthetic identity allowed to see the sample and one that must be denied, plus a deletion path for the test records.
  • Record opaque test IDs locally; do not use a production wiki, employee identity, or real result snippet as tutorial data.

Instructions

Step 1: Set Up Custom Datasource

const GLEAN = `https://${process.env.GLEAN_DOMAIN}/api`;
const idxHeaders = {
  'Authorization': `Bearer ${process.env.GLEAN_INDEXING_TOKEN}`,
  'Content-Type': 'application/json',
};

// Create or configure a custom datasource
await fetch(`${GLEAN}/index/v1/adddatasource`, {
  method: 'POST', headers: idxHeaders,
  body: JSON.stringify({
    name: 'my_wiki',
    displayName: 'Internal Wiki',
    datasourceCategory: 'PUBLISHED_CONTENT',
    urlRegex: 'https://wiki.company.com/.*',
    iconUrl: 'https://wiki.company.com/favicon.ico',
  }),
});

Step 2: Index Documents

// Index individual documents
await fetch(`${GLEAN}/index/v1/indexdocuments`, {
  method: 'POST', headers: idxHeaders,
  body: JSON.stringify({
    datasource: 'my_wiki',
    documents: [{
      id: 'doc-001',
      title: 'Getting Started Guide',
      url: 'https://wiki.company.com/getting-started',
      body: { mimeType: 'text/plain', textContent: 'This guide covers onboarding steps...' },
      author: { email: 'jane@company.com' },
      updatedAt: new Date().toISOString(),
      permissions: { allowAnonymousAccess: true },
    }],
  }),
});
console.log('Document indexed.');

Step 3: Search

const searchHeaders = {
  'Authorization': `Bearer ${process.env.GLEAN_CLIENT_TOKEN}`,
  'X-Glean-Auth-Type': 'BEARER',
  'Content-Type': 'application/json',
};

const results = await fetch(`${GLEAN}/client/v1/search`, {
  method: 'POST', headers: searchHeaders,
  body: JSON.stringify({
    query: 'onboarding getting started',
    pageSize: 10,
    requestOptions: { datasourceFilter: 'my_wiki' },
  }),
}).then(r => r.json());

results.results?.forEach((r: any) => {
  console.log(`${r.title} (${r.url}) — score: ${r.score}`);
});

Output

Document indexed.
Getting Started Guide (https://wiki.company.com/getting-started) — score: 0.95

Error Handling

ErrorCauseSolution
datasource not foundDatasource not createdRun adddatasource first
No search resultsIndexing not yet completeWait 1-2 minutes for processing
invalid documentMissing required fieldsInclude id, title, url

Examples

Index two fictional records into sandbox-onboarding, search for sample-policy, then record indexed=2; allowed_probe=1; denied_probe=0; cleanup=complete. This demonstrates the boundary without retaining company content.

Resources

Next Steps

Proceed to glean-local-dev-loop for development workflow setup.

Signals

GitHub stars
3k
Forks
415
Last commit
Oct 2026
Advanced
Item type
skill
Key
glean-hello-world
Source
github.com/jeremylongshore/tons-of-skills-marketplace