Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Session payments

Session payments let a single payment cover a multi-step agent workflow. Think of it as a credit card for an AI agent’s session: the agent pays once at the start, and every subsequent request in the session proceeds without re-paying. All steps in a session accumulate their output in the same vault. Session payments are MPP-only and require the Pro plan.

How sessions work

The session ID is the key. Every request that includes a valid session ID bypasses payment verification and attaches to the same vault. The vault accumulates documents, files, and events across all steps.

The session vault

A session vault behaves like any other vault, with one addition: it’s linked to the session by a UNIQUE constraint on sessionId. No two sessions can share a vault, and no two vaults can belong to the same session. All requests in a session write to the same vault:
  • vault.addDocument() — appends to the vault’s document list
  • vault.emit() — fires an event on the vault’s SSE stream
  • vault.addFile() — uploads a file to the vault

Sub-pages

How sessions work

Session creation, vault linking, session ID flow, and expiry.

Add session payments

Add acceptSessions: true to payMiddleware and handle the session ID.

Handle multi-step workflows

The two-request pattern with curl commands and vault accumulation.

Session expiry and renewal

Default TTL, custom TTL, and what happens when a session expires.

Requirements

RequirementDetail
PlanPro or Enterprise
ProtocolMPP only
Middleware optionacceptSessions: true in payMiddleware