Describe your tables
Select Postgres when you generate a World, or includepostgres in create_world over MCP. Describe the tables, columns, types, defaults, relationships, and starting rows you need. Hue fills in details you leave open. For example:
Prompt
edit_world and keep the other apps unchanged. Check Postgres → Starting rows on the new version. This preview does not start a database.
Use up to 12 tables with 24 columns each and up to 20,000 starting rows or 10 MiB, whichever you reach first. Hue supports text, integer, bigint, numeric, boolean, date, timestamptz, UUID, and JSONB. Use a single-column primary key per table and foreign keys to primary keys. Defaults can be literals, the current timestamp, or a generated UUID. Hue runs PostgreSQL 17 without extensions. Describe the schema rather than supplying SQL or a dump.
Connect your agent
- Open a World with Postgres and choose Start instance.
- Select Postgres → Connect → Copy URL. If it’s still preparing, choose Prepare to check again.
- Pass that URL to your agent’s Postgres client as a secret for this run. Don’t put it in prompts or logs.
PGSSLROOTCERT to its path. Keep hostname and certificate verification on. Only the URL changes each run.
To read and update the warehouse fixture, install pg or psycopg[binary]. Set WORLD_DATABASE_URL for this process only, or pass the URL directly to the client. Don’t change the parent process environment for concurrent instances.
12 11 again. The saved seed stays unchanged.
Connect a harness through the API
Send requests tohttps://app.hue.run with Content-Type: application/json and Authorization: Bearer <project key>. Use the same server-side Read and write key for start, reveal, and finish. To select a project other than the key’s default, send the same X-Hue-Project: <project-id> on every request.
POST /api/v1/environment-runswithX-Hue-Native-Connections: 1and{"environmentVersionId":"<world-version-id>","idempotencyKey":"<start-key>"}. Use the version ID, not the World ID. Reuse the key if retrying the same start.- From the start response, take
idand find the entry innativeAppswithproviderIdequal topostgres. Send that entry’sappKeyin the JSON body ofPOST /api/v1/environment-runs/{id}/native-connection. Poll whilestateispreparing. When it’sready, passurlto that run’s client. If setup fails, finish the instance rather than connecting to a fallback database. MCP can start a World but does not reveal its SQL credentials. - Collect any SQL evidence, then
POST /api/v1/environment-runs/{id}/finishin afinallyblock. Send{"status":"completed","idempotencyKey":"<finish-key>"}on success, or"status":"abandoned"if setup or the run fails or you cancel it.