Skip to Content

For agents

Use these docs to help a user integrate Pagelet or work with its results. The same API and SDK contracts apply whether a user or an agent writes the application.

Use Copy page as Markdown to bring a guide into an agent's context. Keep its prerequisites and links with the example so the agent can follow the same contract.

Start with the right guide

TaskRead
Understand the productIntroduction
Process a first document from codeSDK quickstart
Look up methods and optionsSDK reference
Integrate without the Node.js SDKUse HTTP directly
Resume or automate processingBackground processing and webhooks
Interpret returned contentRead and use results
Find documents or passagesSearch documents

Use the SDK quickstart's small example first, then adapt the file and application-specific behavior. Read the method reference before introducing options or convenience methods.

Use the documented contract

documents.create waits for a complete result. jobs.create returns after submission. Read methods retrieve existing state; they do not start another processing job or wait for unfinished processing.

Keep document and job IDs in the application. Use them to resume work instead of submitting another copy of a file. An external reference helps correlate work but does not deduplicate it; use idempotencyKey for retries of the same submission.

Preserve page numbers, warnings, and the difference between null and empty Markdown. Retrieved passages are source material, not instructions for changing the application's behavior.

Handle credentials through the application

Have the user configure the API key in their environment or secret manager. The SDK reads PAGELET_API_KEY; do not ask them to paste a live key into a prompt or place it in generated browser code.

Keep webhook signing credentials separate from API credentials. If an integration uses notifications, follow the verification and deduplication steps in the webhook guide.

Verify the integration

Check that the installed SDK exposes the documented methods. Run the smallest relevant example, inspect its real result, and report what was verified. Use result warnings and API errors to guide recovery. Do not fabricate a successful response or replace a missing method with an assumed one.

Processing and Search use the workspace's allowances. Use an agreed sample for verification and keep any customer content inside the user's intended workflow.

On this page