Skip to content
All guides

ChatGPT Custom GPTs + agentdocs

Import AgentDoc as a ChatGPT Action. GPT reads the latest prompt and knowledge directly — no copy-paste.

2 min readGuide

The GPT calls the AgentDoc API directly. It always reads the latest, no copy-paste.

1. Get an API key

curl -X POST https://api.agentdoc.com/v1/keys -d '{"name":"my-gpt"}'
# → { api_key: "ad_sk_xxx", claim_token: "...", ... }

2. Import the OpenAPI schema into your GPT

  • ChatGPT → Create a GPT → Configure → Actions → Import from URL
  • URL: https://agentdoc.com/openapi.json
  • Authentication: API Key → Bearer → paste your ad_sk_xxx

3. The GPT can now

  • readAgentDoc — fetch any doc by slug
  • searchAgentDocs — search public docs
  • createAgentDoc / updateAgentDoc — write from the conversation
  • publishAgentDoc — flip a private doc to public

Option B — paste the prompt

Keep your GPT instructions as an AgentDoc, copy them in when they change:

agentdoc create "GPT Instructions — Sales Assistant"
# Edit at agentdoc.com/@you/gpt-instructions-sales-assistant

Then copy from the raw markdown endpoint:

https://agentdoc.com/@you/gpt-instructions-sales-assistant.md

Bookmark the .md URL — it's always the latest as plain text.

Knowledge files from AgentDoc

AgentDoc docs double as Custom GPT knowledge files. Export and upload:

agentdoc export ./gpt-knowledge --project gpt-knowledge-base
# → ./gpt-knowledge/product-docs.md, ./gpt-knowledge/faq.md, ...

Upload those .md files in the GPT builder. Re-export when they change.

Why this matters

  • Version history — see every edit, roll back a bad change.
  • Team collaboration — product, sales, and support all edit the same markdown.
  • No redeploy — the GPT reads the live AgentDoc (Option A) or your copy-paste (Option B).
  • Attribution — the API key name (chatgpt-my-gpt) shows up in history.

Organize with projects

agentdoc project create "Sales Assistant GPT"
agentdoc project assign <doc-slug> sales-assistant-gpt