Free Intro Class
    Botspot Logo

    agenthub · document.fetch

    Documentation Fetch

    Ground the agent in the business's own Document Space, so it answers from documented facts rather than improvising.

    category Memoryin messages · system_promptout messages · text · documentsexecution asyncmodel cost none

    Why the node earns its place

    Why a node and not a tool: a tool is optional. The model decides whether to call it, and when it skips, the agent invents an answer. A node is deterministic — the documentation is in context before the model generates a token, so it cannot answer ungrounded. For a lead-qualification agent, where a fabricated price is a real business cost, that guarantee is the whole point.

    It sits exactly where Knowledge Fetch sits and mirrors its ports, so the two are interchangeable. The difference is the source: this reads the authored markdown directly, so an edit lands on the very next turn with no re-index step.

    How it works at run time

    1. 1
      Read the org from the run and list the documents bound to this agent.
    2. 2
      In all mode inject every bound document; in search mode keyword-filter by the latest user message first — only worth it once the corpus outgrows the context budget.
    3. 3
      Respect max_documents and the max_chars budget.
    4. 4
      With strict on, append an explicit instruction to answer only from the documentation and to say plainly when it does not cover something.

    What you wire

    Inputs

    • messages *
      array
    • system_prompt
      string

    Outputs

    • messages
      array
    • text
      string
    • documents
      array

    Configuration

    KeyTypeDefault & optionsWhat it does
    system_promptstringAgent persona / instructions. Prepended to the documentation block inside the same system message.
    modestringdefault "all" all · searchall: inject every bound document (right for a normal doc space). search: keyword-filter by the latest user message first — use only when the corpus outgrows the context budget.
    max_documentsnumberdefault 50Cap on documents injected.
    max_charsnumberdefault 24000Total character budget for the documentation block.
    strictbooleandefault trueAppend an explicit instruction to answer only from the documentation and to say so when it doesn't cover something.

    What usually goes wrong

    Watch for this

    Failures are swallowed on purpose — retrieval must never block the chat path. On a missing binding or an error the agent falls through to persona-only and keeps talking, ungrounded. An agent that has quietly started improvising is the symptom; check the document bindings rather than the prompt.

    Business accounts only. An individual account has no business documentation, so the node makes the agent say so rather than degrading into a generic chatbot.

    Behaviour & provenance

    buildersChat & voice agents
    routesno
    side effectsnone — computes only
    replay safetynot applicable
    talks todocuments & data sources
    holdsworkspace runtime token, the caller's own identity