Skip to content

Knowledge ​

The knowledge base is the primary source Ogma searches when answering tickets and Playground questions. Open it from Knowledge base under AI & knowledge in the sidebar.

The page has two panes. On the left are search (press /), the documents you've pinned under Always read, and your folder tree. Hover a row and use its ⋯ button, or right-click it, to rename, move or delete it. On the right is whatever you selected: a folder lists its contents, and a document shows exactly what Ogma reads, with its source and sync settings above. The URL keeps your place (?doc= or ?folder=), so you can share a link to a document.

What counts as knowledge ​

  • Uploaded files (Markdown, plain text, HTML, JSON, CSV — not PDF)
  • Pasted text blocks with an optional title
  • Synced URLs that Ogma re-fetches on a schedule (public pages)
  • GitHub repositories — selected files from a docs repo, kept in sync
  • Web scraper sources — Ogma POSTs to a URL you control; your server verifies the request and returns page content (for docs behind your auth gateway)

All content is chunked, embedded, and stored per server. Nothing is shared across servers.

Adding content ​

Use Add knowledge at the top of the page, or Add to folder on a folder. New content goes into the folder you have open, and the import dialog shows where it will land.

Upload ​

Drop up to 25 documents at a time (max 5 MB each), or pick a folder to keep its structure. Ogma extracts text and indexes it. Re-upload a file to refresh it.

Supported formats are .txt, .text, .md, .markdown, .html, .htm, .json, and .csv (not PDF).

Write a document ​

Type or paste documentation, answers, or notes directly into the editor. Give it a title so you can find it later. Good for internal runbooks or short procedures.

URL ​

Choose Import a web page and add a publicly accessible page. With Keep in sync on, Ogma fetches it again on the schedule you pick under Check for changes (the options depend on your plan). You can change the schedule or turn syncing off later from the document itself.

PlanMinimum intervalDefault for new URL sourcesMax sources
Free24 hours24 hours1
Basic6 hours12 hours2
Plus1 hour3 hours5
Enterprise15 minutes1 hour50

You can set a custom refresh interval per source (minimum depends on plan). URL and web scraper sources share the Max sources limit.

If a URL fails to sync, the status column shows an error. Common causes:

  • The page requires login or is behind a firewall.
  • The site blocks scrapers or returns non-HTML content.
  • The URL redirects through pages that require auth.

Fix the URL or visibility, then trigger Update now from the source detail view.

GitHub repository ​

Use Import a GitHub repo to import a docs repository. Connect your GitHub account to reach private repositories (public ones may work without it), then choose the branch, an optional subfolder, and which files to index — Ogma can suggest a selection for you. Imported files land in a folder you pick.

With auto-sync on, Ogma re-syncs the repository on a schedule and re-indexes only the files that changed. Sync intervals follow the same plan minimums as URL sources, and you can Sync repository manually at any time. Imports run as background jobs.

PlanRepositoriesFiles per repository
Free1100
Basic1250
Plus3500
Enterprise102,000

Only the same file types as uploads are imported.

Web scraper ​

Use a web scraper source when the page is not publicly fetchable, but you can expose an HTTPS endpoint that returns the document after verifying Ogma. In Import a web page, turn on Page needs authentication.

Ogma does not use HTTP basic auth. It signs each request with your server's guild signing secret: your endpoint checks Authorization and X-Ogma-Signature before returning content.

URL importWeb scraper
HTTP methodGET (Ogma fetches the page directly)POST (your server handles the request)
AuthenticationNone (page must be public)Guild signing secret (+ optional custom headers)
Best forPublic docs, blogs, status pagesInternal docs, admin-only pages, auth gateways

Auto-sync intervals and per-plan source limits are the same as URL sources above.

How Ogma calls your endpoint ​

On import and on each scheduled refresh, Ogma sends:

POST <configured-url>
Content-Type: application/json
Accept: text/html,application/xhtml+xml,text/plain,application/json;q=0.9,*/*;q=0.8
Authorization: Bearer <guild-signing-secret>   (when webhook signing is enabled)
X-Ogma-Signature: t=<unix>,v1=<hmac-sha256-hex> (when webhook signing is enabled)
User-Agent: OgmaBot/1.0 (+https://github.com/ogma)

Any outgoing headers you configure in the dashboard are merged in (values are encrypted at rest and never shown again). You cannot set Authorization, X-Ogma-Signature, Host, Content-Length, or Transfer-Encoding.

Request body (JSON):

json
{
  "guildId": "123456789012345678",
  "url": "https://docs.example.com/internal/runbook",
  "timestamp": 1712345678
}
  • guildId — Discord server ID for this Ogma workspace.
  • url — Normalized source URL stored for this knowledge document (http/https only).
  • timestamp — Unix seconds; also used in the signature header as t=.

When Webhook signing is enabled in the import dialog (default), Ogma uses the guild’s signing secret. If none exists yet, Ogma creates one automatically on the first signed sync. Check its status and rotate it from Manage signing secret in the import dialog (under Page needs authentication) — the new secret is shown once, so copy it into your endpoint's configuration straight away. Rotating invalidates the previous secret for every scraper source on the server. Disable signing only for endpoints that do not require auth.

Verify the request on your server ​

Ogma computes:

HMAC-SHA256(signing-secret, timestamp + "." + raw-json-body)

…and sends the hex digest in X-Ogma-Signature as t=<timestamp>,v1=<hex>.

Always verify using the raw request body string — do not re-serialize parsed JSON. Reject timestamps older than five minutes.

Node.js: @ogmasupport/webhook ​

Ogma publishes a small npm package for Node.js handlers. Source and examples live in ogma-open (packages/webhook).

bash
npm install @ogmasupport/webhook
typescript
import { verifyOgmaWebhook } from '@ogmasupport/webhook';

const secret = process.env.OGMA_SIGNING_SECRET!;

export async function handleScrape(request: Request): Promise<Response> {
  const rawBody = await request.text();

  if (
    !verifyOgmaWebhook({
      rawBody,
      signatureHeader: request.headers.get('X-Ogma-Signature') ?? undefined,
      authorizationHeader: request.headers.get('Authorization') ?? undefined,
      secret
    })
  ) {
    return new Response('Invalid signature', { status: 401 });
  }

  const { url } = JSON.parse(rawBody) as { url: string };
  return new Response(await renderInternalDoc(url), {
    headers: { 'Content-Type': 'text/html' }
  });
}

verifyOgmaWebhook accepts rawBody, signatureHeader, an optional authorizationHeader (the bearer token must match secret when present), secret, and an optional maxAgeSeconds (default 300).

Other languages ​
  1. Parse X-Ogma-Signature as t=<unix>,v1=<hex>.
  2. Reject if abs(now - t) > 300.
  3. Compute HMAC-SHA256(secret, t + "." + rawBody) as lowercase hex.
  4. Compare with v1 using a constant-time comparison.
  5. Optionally require Authorization: Bearer <secret> to match as well.

Minimal handler outline:

  1. Read the raw POST body.
  2. Verify Authorization: Bearer <secret> and/or X-Ogma-Signature.
  3. Optionally confirm body.url matches the document you intend to serve.
  4. Return the page as HTML or plain text with HTTP 2xx.

Ogma converts HTML to text (same pipeline as URL import), chunks it, and embeds it for search.

Response requirements ​

  • HTTP 2xx with a non-empty body.
  • Content-Type of HTML or plain text, or HTML that starts with < (detected automatically).
  • Empty pages and non-text responses fail the sync with an error on the Knowledge page.

Optional custom headers ​

Add outbound headers in the import dialog when your gateway expects extra values (for example an API key header). Names must be letters, numbers, and hyphens. Values are encrypted at rest.

Troubleshooting scraper syncs ​

SymptomLikely cause
401 / 403Signature or Bearer token mismatch; clock skew; wrong signing secret
404POST URL path wrong, or handler only accepts GET
Empty contentResponse body has no readable text after HTML conversion
Signing secret unavailableSECRETS_ENCRYPTION_KEY not configured on the Ogma API

Use Update now on the source detail view after fixing your endpoint. Previous indexed content is kept until a refresh succeeds.

Source health ​

Open Health at the top of the Knowledge page to see problems that cause bad answers before users hit them. The button shows how many sources need attention, and the count turns red when a sync has failed:

StatusMeaning
HealthySynced recently, no errors
Stale syncNo successful sync for 1.5× the source's refresh interval
Sync overdueScheduled refresh has not run
Sync failedLast fetch or index failed
Never syncedURL added but not yet indexed
Never retrievedOlder than 7 days and not retrieved in any search in the last 30 days

From each row you can sync now, ignore a sync error, view the source, or remove it. The Overview page also shows a knowledge sync summary. Fix sync errors and stale sources proactively.

Freshness alerts ​

Sources flagged as stale or never retrieved in search appear under freshness alerts. These are candidates for update, removal, or Playground testing — content that exists but may not help users.

Duplicate and overlap detection ​

Ogma scans tips against knowledge docs to find:

  • Tips that overlap long-form KB content
  • Near-duplicate tips
  • Conflicting answers between tips

Review overlaps periodically and merge or delete redundant tips. Results, the last scan time, and the next available scan are shown in the Source health panel.

Folders and pinned documents ​

Organise sources into folders and subfolders, and move them with Move to…. Deleting a folder that still has files in it removes everything inside, and cannot be undone. In Playground you can limit a test to one folder.

Open a document and choose Always read to pin it. Pinned documents are listed under Always read at the top of the sidebar. The AI reads pinned documents before every reply, which suits communication guidelines and must-follow policies. You can pin up to 5 documents; pinned content is added to every reply, so it increases token usage.

The ingest command ​

Add short notes from Discord:

/ingest content:Your text here title:Optional title

Handy for capturing something from a live ticket. For larger content, use the dashboard.

Editing and version history ​

For written and uploaded documents, open the document and choose Edit to change title and body in a VS Code-style editor (Monaco) with syntax highlighting for Markdown, JSON, HTML, and plain text. Use Add knowledge → Write a document to create a new document in the open folder. Each content change:

  1. Snapshots the previous version (deduplicated by content hash — identical re-syncs skip new versions and re-embedding).
  2. Re-chunks and re-embeds the updated text.

Use Version history (in the editor, or from the document's ⋯ menu) to compare a past version against the current content and Revert when needed. Ogma keeps the last 50 versions per document. URL-, scraper-, and Git-managed docs sync through their normal pipelines; manual edits are for paste/upload sources.

Playground ​

Knowledge playground (its own item under AI & knowledge in the sidebar) tests real support behaviour:

  • Chat with Ogma the way a member would, and start a new conversation to reset.
  • See the answer, which chunks were retrieved and their scores, and whether the bot would escalate.
  • See MCP tool calls and results, and the web pages Ogma read.
  • Limit search to one folder with Folder scope.
  • Replay a real ticket with Simulate ticket by entering its ticket ID.
  • See an estimate of the tokens each run used, with tips for reducing them.
  • Optionally run the Frustration check to see whether a message would be flagged or escalated (one extra model call per run).

Use Playground to validate new docs, debug weak answers, and verify MCP integrations. Do not use /ask or /ogma askgpt for this — those ignore your knowledge base.

On a free trial, the dashboard warns before Playground runs that consume AI quota beyond included limits.

Tips vs long-form knowledge ​

Knowledge is for reference material. Tips are for short, repeated answers. Both are searched together.

See Tips and Auto-learn.

Background jobs ​

URL syncs, GitHub imports, and tip backfill jobs appear under Activity → Background jobs while running. See Background jobs.

Keeping knowledge healthy ​

  • Remove or update stale content when freshness alerts fire.
  • Split very long documents when answers are weak.
  • Check Never retrieved sources in Source health — they may need rewording or removal.
  • Use Playground after every significant add or edit.

Related: Tips, Auto-learn, Insights, Commands (/ingest), Billing (indexing limits and overage).

Ogma — answer once, reuse forever. · FiniAC · Blog · llm.txt (full docs for LLMs)