A run signifies the execution of an agent or a chain that takes multiple steps. It is a sequence of Steps, that, unlike other Step types, does not have to be part of a Thread. This is useful if you are monitoring non-conversational use cases. Interact with a Run inside a Thread here.

Runs are visualized as part of Thread on the Threads page, but they can also be viewed on their own Runs page on Literal AI. Here, all Runs are visualized, not only runs that are part of Threads. Runs have a unique ID (different from the Thread ID, since Runs are different from Threads). The Steps in a Run can be scored and tagged as usual.

The example in the following image shows a Run called Query of a RAG chatbot agent, that Retrieves context documents and Generates an answer using a GPT-4 model.

An example of a Run

An example of a Run on Literal AI

In the following code example you can see that you can tag steps with the type "Run", by writing :

  • @literal_client.step(type="run") in Python
  • literal_client.run() in TypeScript (this is a helper function that creates a step with the type run, equivalent to literal_client.step({ type: "run" })).