Skip to content
DocblockOpen workspace

OpenAI API integration

Give your custom agent a readable knowledge store.

Build an agent that retrieves useful context from the same notes your team edits. The Docblock guide includes remote MCP examples for the Responses API and the OpenAI Agents SDK for Python.

01

Retrieve evidence for your own answer

Use the context retrieval tool to receive bounded passages, note links, and versions. Your agent composes the answer and decides when to read a full source.

02

Keep credentials scoped

Create a separate Docblock token with the required workspace and access. Use an optional folder limit when the agent only needs part of the knowledge base.

03

Add writing only when needed

Start with search and read tools. Choose propose-only or direct write access for workflows that need to leave a handoff or update a note.

FROM IDEA TO USEFUL CONTEXT

Put it into practice.

  1. Create a scoped token

    Choose the workspace and begin with read-only access in Agent tokens.

  2. Configure remote MCP

    Follow the Responses API or Agents SDK example with an MCP-capable configuration and the authorization header.

  3. Test source retrieval

    Ask a question whose answer you can verify in a known note, then inspect the returned sources.

A FEW USEFUL DETAILS

Questions, answered.

Does the retrieval tool generate the final answer?

No. It returns passages and source information. The calling agent generates its own answer from that evidence.

Is an API key the same as a Docblock token?

No. Your OpenAI API credentials authorize that service. A separate Docblock token controls the agent’s access to your Docblock workspaces and notes.

KEEP EXPLORING

Connect the next piece.

A PLACE TO BUILD ON

Give your next thought a home.

Start with a note. Add structure, connect an agent, and keep the useful context together.

Open Docblock