Data
Provision managed data services instantly over one API — ephemeral PostgreSQL databases plus Redis, vector, and full-text search stores — with no infrastructure to set up.
Call it from an agent step
Section titled “Call it from an agent step”On-demand Postgres is on the typed ctx.sapiom.* client, so sapiom_dev_agents_check validates the call at author time:
const db = await ctx.sapiom.database.create({ duration: "4h", // required — the database is removed automatically after this handle: "analytics", // optional stable key for get()/delete()});// db carries the Postgres connection credentials — pass them to any Postgres clientcreate / get / delete manage databases. Autocomplete surfaces the full input and response types. See Using Capabilities.
Call it directly (no agent)
Section titled “Call it directly (no agent)”The Redis, vector, and full-text search stores — and Postgres — are all reachable from any MCP client through the remote MCP as sapiom_* tools. Run tool_discover with your goal to get the exact tool and a call example.
From your own code
Section titled “From your own code”Outside an agent, call the typed Postgres client — see SDK & API:
const db = await sapiom.database.get("analytics");