rootsign approve can answer a held call from another terminal, and sessions are verified and exported by ID. RootSign needs PostgreSQL 16 with the TimescaleDB extension. Your instrumentation code does not change.
When to switch
Set it up
1
Install the PostgreSQL extra
2
Start a database
start-db runs PostgreSQL 16 with TimescaleDB in Docker, in a container named rootsign-timescaledb:rootsign_pgdata, so it survives rootsign-admin stop-db --remove. The database is for a laptop: its user and password are both rootsign. To use a database you already run, skip this step and see Use your own database.3
Create the tables
4
Switch the backend
ROOTSIGN_BACKEND=postgres in a .env file in the directory you run from. Configuration explains where settings come from.5
Run your agent
Run the same script as before. The quickstart’s The first session registers the agent in the
agent.py, unchanged:agents table. Later runs with the same agent name and environment reuse it.6
Verify the session by ID
7
Check what is stored
rootsign-admin status counts the rows in each table:Use your own database
Point RootSign at any PostgreSQL 16 server with TimescaleDB 2 installed. It reads two connection URLs, one per driver, and both should name the same database:init turns the TimescaleDB extension on if it is installed but not enabled. On a server without TimescaleDB, init stops with this error and exits 1; the extension is what is missing, even though the hint mentions the server:
ENVIRONMENT=production. RootSign then refuses to start with the default URLs, which point at the laptop database, instead of writing records there. Configuration has this and the connection pool settings.
What changes and what stays
- Your code stays the same.
init(),session(),@rootsign.trace()andwrap_tools()work as they do on JSONL. - Commands take a session ID.
rootsign verify <session_id>androotsign export <session_id>read from the database, without--local. - Existing JSONL sessions stay in their files. Switching backends does not move them. Verify them with
rootsign verify --local <path>as before. - Verdicts are the same. Both backends use the same hash formula, so a session verifies the same way in a file or in the database.
If the database cannot be used
-
The tables do not exist. If
rootsign-admin initwas never run against the database,rootsign.session()raisesRecordPersistenceErrorand the session body does not run. The message names the missing table: -
The database is down when a session opens.
session()raisesRecordPersistenceErrorthe same way, chained from the connection error. See Errors. - The database fails during a session. A tool call whose record cannot be written still runs and returns its result; RootSign logs a warning. Calls held for approval are the exception: they do not run without a record.
-
The CLI cannot reach it.
rootsign verifyexits3with a one-line error, so an outage never reads asTAMPERED. The CLI reference lists the messages.
Related
rootsign-admin
Every option of
start-db, stop-db, init and status.Require human approval
Hold a tool call until someone approves it from another terminal.