Source: docs/public/integration/documentation.md

Configure public documentation help

Public documentation help lets the agent answer how-to, setup and product

questions using the documentation your team publishes and maintains. The host

owns the documentation; Forgium consults it when answering but keeps source

attribution internal, outside the user-visible chat text.

How it works

  1. The host publishes its documentation as plain text on the public web and
    registers its scope with PUT /v1/documentation.
  2. When a user asks a documentation question in the existing chat, Forgium
    retrieves relevant excerpts directly from the configured document through
    Exa Contents and returns only the answer in message.body, without source
    citations or a sources footer. It does not run a web search or discover
    other pages.
  3. If the pages do not support an answer, the agent says so instead of
    inventing one. If retrieval fails, it reports that too.

There is no file upload, no document synchronization and no version management.

Forgium never crawls or copies your site: the host publishes, the host updates.

Live account data and operational requests continue through

capabilities; documentation is evidence only and

never authorizes an action.

The API key is the only source of account ownership. Do not put an account ID

in the URL or manifest.

Register the documentation scope

PUT /v1/documentation creates or fully replaces the one documentation source

for the account:

curl -X PUT "$FORGIUM_AGENT_BASE_URL/v1/documentation" \
  -H "Authorization: Bearer $FORGIUM_AGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://docs.example.test/llms-full.txt",
    "description": "Installation, configuration, session replay, and troubleshooting for the product."
  }'

Response (201 on first configuration, 200 on replacement):

{
  "revision": 1,
  "updated_at": "2026-10-20T12:00:00.000Z",
  "documentation": {
    "url": "https://docs.example.test/llms-full.txt",
    "description": "Installation, configuration, session replay, and troubleshooting for the product."
  }
}

GET /v1/documentation reads the current scope and its informational

revision (404 DOCUMENTATION_NOT_FOUND when unconfigured).

DELETE /v1/documentation removes it (204); later help answers fall back to

the previous behavior without documentation. The request body is limited to

4 KiB.

What to publish

Forgium answers from what is publicly retrievable today. These practices make

the answers accurate:

Behavior in chat

Verify the integration

  1. GET /v1/documentation returns your scope and revision.
  2. Send a message the documentation covers through
    POST /v1/channels/http/messages; expect an answer
    with useful instructions but no sources footer or documentation-source URL.
    Operators can verify the documentation route, validated evidence and source
    counts through internal diagnostics instead of exposing citations to users.
  3. Send a question the documentation does not cover; expect an explicit
    abstention.
  4. Ask for a live account value; expect the capability path to behave as
    before.

Errors

HTTPCodeAction
400DOCUMENTATION_INVALID, INVALID_JSONFix the body: HTTPS scope URL without query/fragment/credentials, non-empty description of at most 400 characters.
404DOCUMENTATION_NOT_FOUNDNo source is configured yet; PUT one first.
413REQUEST_TOO_LARGEKeep the JSON body at or below 4 KiB.
405METHOD_NOT_ALLOWEDOnly GET, PUT and DELETE are accepted.
503DOCUMENTATION_UNAVAILABLERetry according to your temporary-service policy.

See Errors for the shared recovery guide.

For access problems or scope changes that this API cannot express, contact the

Forgium administrator.