Skip to content

Configuration

Config.from_env reads these environment variables. Each can also be passed as a keyword, as in Config.from_env(app="myapp", slow_ms=5000). In Node, pass the camelCase option to createTelltale.

VariableDefaultMeaning
TELLTALE_DB_URLnoneDatabase URL: postgresql://..., mysql://... or sqlite:////absolute/path.db. Without it, telltale is off.
TELLTALE_ENABLEDtruefalse turns telltale off.
TELLTALE_READ_KEYnoneKey that can call any GET on the API. At least 16 characters.
TELLTALE_ADMIN_KEYnoneKey that can call everything. At least 16 characters.
TELLTALE_SECRETrandom at each startKey for hashing user ids and addresses. Set it so hashes match across processes and restarts.
TELLTALE_SCHEMAtelltalePostgres schema for telltale’s tables. On MySQL and SQLite the tables are named telltale_*.
TELLTALE_REPOnoneThe app’s GitHub repo, as owner/name.
TELLTALE_REPO_PRIVATEfalseThe repo is private.
TELLTALE_PRIVATE_DATAfalseThe app holds private data. Error and dead-end messages are not stored.
TELLTALE_ENVlocalLabel stored with each record.
TELLTALE_RELEASEnoneLabel stored with each record.
TELLTALE_SLOW_MS3000Requests at least this slow are recorded as slow.
TELLTALE_RETENTION_DAYS90Events, counts and untouched groups older than this are deleted daily. Feedback is kept.
TELLTALE_PROXY_HOPS0Number of trusted reverse proxies in front of the app.
TELLTALE_TRUST_CFfalseRead the caller’s address from CF-Connecting-IP. Safe only when the origin accepts connections from Cloudflare alone.
TELLTALE_OWN_CLIENTSemptyComma-separated User-Agent prefixes of your own tools. Their requests are filed as own_client.
TELLTALE_ALLOWED_ORIGINSemptyComma-separated origins of your own web pages.
TELLTALE_ANON_CONTACTtruefalse drops any contact a signed-out sender types with feedback.
TELLTALE_EXTRA_SCRUB_PATTERNSemptyExtra regexes to scrub, separated by ;;. A match becomes [id].
TELLTALE_MCP_PATH/mcpRequests under this path are filed under the mcp surface.
TELLTALE_TRUSTED_ISSUERnoneURL of a service whose signed calls get admin access with no stored key. Python only.

Without TELLTALE_PROXY_HOPS behind a proxy, every caller has the proxy’s address, so the per-sender feedback limits stop working and one caller sending bad keys locks everyone out of the API.

Hooks are functions you set on tt. Each gets a read-only view of the request with .headers (lowercased), .method, .path, .scope and .state (the request state, as a dict). authorize gets the real request.

tt.classify_hook(request) -> ClientInfo | None

Section titled “tt.classify_hook(request) -> ClientInfo | None”

Names the client, as in ClientInfo("agent", "api-key"). Runs on every request before your app’s sign-in, so it must read headers only. None falls through to telltale’s own rules.

The signed-in user’s id. It is hashed before it is stored. A request counts as signed in only when this returns an id.

The contact stored with a signed-in user’s feedback, usually "Name <email>". It wins over anything typed in the dialog. Only an admin signed in as a person sees it.

tt.authorize(request) -> "admin" | "read" | None

Section titled “tt.authorize(request) -> "admin" | "read" | None”

Lets your app’s own sign-in open the telltale API and console. An exception counts as no access. A bearer token that equals a telltale key is used as that key and never reaches this hook. With this hook set, the API mounts even when no key is set.

tt.entity_resolver(entity_type, entity_id) -> str | None

Section titled “tt.entity_resolver(entity_type, entity_id) -> str | None”

Turns an (entity_type, entity_id) pair into a readable label. The API adds these labels to a group’s detail.

In Node, the hooks are options to createTelltale: classifyHook, userId, authorize and entityResolver.

Each sender may send 10 notes an hour, each address 60, and each app 200. The limits apply to the HTTP route and the MCP tool alike. A note may be up to 4000 characters.

The Python README and Node README cover the rarer settings.