# Docs Chatbot

Answers questions about a library's functions by looking up structured documentation.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="langgraph" agent="docs-chatbot" />

<AgentPreview
  agent="docs-chatbot"
  framework="langgraph"
  inputFields="[
  {
    name: &#x22;query&#x22;,
    label: &#x22;Question&#x22;,
    placeholder: &#x22;Tell me about the getPlanetaryData function.&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **Docs Chatbot Agent** answers questions about a code library's API. It looks
up structured function documentation — signatures, parameters, and examples — and
answers using only what the docs say. Reach for it to drop a grounded "ask the
docs" assistant into a docs site, an IDE, or a support channel.

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @agentcn/langgraph/docs-chatbot
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install @dawn-ai/sdk
      ```

      <Step>
        Copy and paste the following agent route files into your project.
      </Step>

      <ComponentSource src="registry/langgraph/docs-chatbot/data/functions.json" title="data/functions.json" />

      <ComponentSource src="registry/langgraph/docs-chatbot/index.ts" title="index.ts" />

      <ComponentSource src="registry/langgraph/docs-chatbot/instructions.md" title="instructions.md" />

      <ComponentSource src="registry/langgraph/docs-chatbot/tools/lookup_docs.ts" title="tools/lookup_docs.ts" />

      <Step>
        Run `dawn check` after copying so route and tool metadata are regenerated.
        `dawn dev`, `dawn build`, and `dawn verify` also run the same discovery path.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Composition [#composition]

```text
├── data/functions.json
├── index.ts
├── instructions.md
├── tools/lookup_docs.ts
```

## Customization [#customization]

* Edit `index.ts` to change the model, description, or system prompt.
* Add route-local tools under `tools/`; tool input and output types are inferred from TypeScript.
* Run `dawn verify` before deploying generated LangGraph artifacts.
