Skip to main content

Configure

tp.configure(**settings)

Sets global defaults. Unknown names raise TypeError.

tp.LM(model, **options)

A model built from the same strings as lm=, with options passed along to the provider, such as temperature, max_tokens, api_base or api_key. Options you pass win over a gateway’s own. Use it anywhere a model string goes.

tp.last_run()

Calls, tokens, cost, errors and time for the latest run, even one still going. .status is "running", "completed", "failed" or "cancelled".

Sources

A source has one or more tables, as attributes (src.steps) or by name (src.table("steps")). See Load traces. tp.read.dspy and tp.read.chatgpt are planned and raise NotImplementedError for now.

Table

Every method returns a new table. LM methods take instructions=, lm= (overrides the configured model), module= (default dspy.Predict) and on_error="skip" (or "raise").

Row operators

group_by(*names)

Groups by key levels or any other columns, and returns a grouped table with: group_by() with no names treats the whole table as one group. emit="update" or emit=tp.every(n) also emits provisional rows on live streams. See Concepts for how reduce inputs bind.

Running

Tuning and what-if

Row

tp.rows_to_pandas(rows) turns a list of rows into a DataFrame.

Server

tp.connect(address="localhost:7700", token=None)

A client for a server started with tracepress serve. token defaults to $TRACEPRESS_TOKEN.

Built-in pipelines

tp.pipelines.harbor has the Terminal-Bench failure taxonomies. See Built-in pipelines.

Next steps

Concepts

How the operators fit together.

CLI

The tracepress serve command.