Managing Journeys via Confident AI SDK
Every Journeys method in the Confident AI Python and TypeScript SDKs.
Overview
The Confident AI SDK exposes every Journey method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.
Methods
List Journeys
Lists the journeys in your Confident AI project one page at a time, newest first. Each journey is returned with its id, name, and how many states and goldens it has; retrieve one by id to read its states, edges and paths.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.journeys.list(page=1, page_size=25)For async mode, call a_list and await it as shown below:
result = await client.journeys.a_list(...)Parameters
| Parameter | Type | Description |
|---|---|---|
page | Optional[int] | The page to return. Defaults to 1. |
page_size | Optional[int] | The number of journeys per page, at most 100. Defaults to 25. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.journeys.list(1, 25);Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | The page to return. Defaults to 1. |
pageSize | number | The number of journeys per page, at most 100. Defaults to 25. |
Returns
This method returns an object of type JourneyList.
Create Journey
Creates a journey with a root Start state and returns its id. Build it out by adding states and edges, or send graphSource as ai to have Confident AI draft them for you in the background. Names are unique within a project; reusing one returns a 409.
from confident_ai import ConfidentAI
from confident_ai.journeys import JourneyGraphSource
client = ConfidentAI()
result = client.journeys.create(
name="Refund request",
description="A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human.",
graph_source=JourneyGraphSource.AI,
)For async mode, call a_create and await it as shown below:
result = await client.journeys.a_create(...)Parameters
| Parameter | Type | Description |
|---|---|---|
name | str | Required. The name of the journey, unique within the project. |
description | Optional[str] | What the user is trying to get done on this journey. When graphSource is ai, the draft is written from this and the name, so say how the conversation can end. |
graph_source | Optional[JourneyGraphSource] | Send ai to have Confident AI draft the journey's states and edges in the background with your project's platform model. Omit it to start with only the root Start state. The draft lands shortly after the response, so retrieve the journey to see it; if drafting fails, the journey keeps only its Start state. See JourneyGraphSource. |
import { ConfidentAI } from "confident-ai";
import { JourneyGraphSource } from "confident-ai/journeys";
const client = new ConfidentAI();
const result = await client.journeys.create(
"Refund request",
"A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human.",
JourneyGraphSource.AI,
);Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Required. The name of the journey, unique within the project. |
description | string | null | What the user is trying to get done on this journey. When graphSource is ai, the draft is written from this and the name, so say how the conversation can end. |
graphSource | JourneyGraphSource | Send ai to have Confident AI draft the journey's states and edges in the background with your project's platform model. Omit it to start with only the root Start state. The draft lands shortly after the response, so retrieve the journey to see it; if drafting fails, the journey keeps only its Start state. See JourneyGraphSource. |
Returns
This method returns an object of type JourneyRef.
Get Journey
Retrieves a journey by id with its whole graph: every state and edge, each path from the root state to an end, and how many goldens have been generated for each path and in which datasets. Paths with no goldens are the branches of the conversation your tests do not cover yet.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.journeys.get(journey_id="<JOURNEY-ID>")For async mode, call a_get and await it as shown below:
result = await client.journeys.a_get(...)Parameters
| Parameter | Type | Description |
|---|---|---|
journey_id | str | Required. The id of the journey. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.journeys.get("<JOURNEY-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
journeyId | string | Required. The id of the journey. |
Returns
This method returns an object of type Journey.
Update Journey
Renames a journey or rewrites its description, and returns it with its whole graph. Names are unique within a project; taking another journey's name returns a 409.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.journeys.update(
journey_id="<JOURNEY-ID>",
name="Refund request",
description="A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human.",
)For async mode, call a_update and await it as shown below:
result = await client.journeys.a_update(...)Parameters
| Parameter | Type | Description |
|---|---|---|
journey_id | str | Required. The id of the journey. |
name | Optional[str] | The name of the journey, unique within the project. Omit it to keep the current name. |
description | Optional[str] | What the user is trying to get done on this journey. Send null to clear it, or omit it to keep the current one. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.journeys.update(
"<JOURNEY-ID>",
"Refund request",
"A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human.",
);Parameters
| Parameter | Type | Description |
|---|---|---|
journeyId | string | Required. The id of the journey. |
name | string | The name of the journey, unique within the project. Omit it to keep the current name. |
description | string | null | What the user is trying to get done on this journey. Send null to clear it, or omit it to keep the current one. |
Returns
This method returns an object of type Journey.
Delete Journey
Permanently deletes a journey with all of its states and edges. Goldens generated from it are kept in their datasets but no longer belong to a journey. This action cannot be undone.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.journeys.delete(journey_id="<JOURNEY-ID>")For async mode, call a_delete and await it as shown below:
result = await client.journeys.a_delete(...)Parameters
| Parameter | Type | Description |
|---|---|---|
journey_id | str | Required. The id of the journey. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.journeys.delete("<JOURNEY-ID>");Parameters
| Parameter | Type | Description |
|---|---|---|
journeyId | string | Required. The id of the journey. |
Returns
This method returns an object of type JourneyRef.
Generate Goldens
Generates multi-turn goldens for the chosen paths of a journey and adds them to a multi-turn dataset. Your project's platform model writes one scenario and expected outcome per path from its states' instructions and edge conditions, so this consumes usage; if no platform model is configured, or writing one fails, the scenario is the path's instructions joined in order. Each golden remembers its path, so the journey reports coverage and path results for it.
from confident_ai import ConfidentAI
from confident_ai.journeys import JourneyPathGoldenCountInput
client = ConfidentAI()
result = client.journeys.generate_goldens(
journey_id="<JOURNEY-ID>",
dataset_id="<DATASET-ID>",
paths=[
JourneyPathGoldenCountInput(
state_ids=["<JOURNEY-STATE-ID>"],
count=3
)
],
persona_id="<PERSONA-ID>",
)For async mode, call a_generate_goldens and await it as shown below:
result = await client.journeys.a_generate_goldens(...)Parameters
| Parameter | Type | Description |
|---|---|---|
journey_id | str | Required. The id of the journey. |
dataset_id | str | Required. The id of the dataset to add the goldens to. It must be a multi-turn dataset in this project. |
paths | List[JourneyPathGoldenCountInput] | Required. The paths to generate goldens for, and how many for each. At most 50, the most paths a journey lists. A path listed twice uses its last count. See JourneyPathGoldenCountInput. |
persona_id | Optional[str] | The id of a persona to attach to every golden, so the simulated user is played in its voice and the scenarios are written for it. Send null or omit it for no persona. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.journeys.generateGoldens(
"<JOURNEY-ID>",
"<DATASET-ID>",
[
{
stateIds: ["<JOURNEY-STATE-ID>"],
count: 3
}
],
"<PERSONA-ID>",
);Parameters
| Parameter | Type | Description |
|---|---|---|
journeyId | string | Required. The id of the journey. |
datasetId | string | Required. The id of the dataset to add the goldens to. It must be a multi-turn dataset in this project. |
paths | JourneyPathGoldenCountInput[] | Required. The paths to generate goldens for, and how many for each. At most 50, the most paths a journey lists. A path listed twice uses its last count. See JourneyPathGoldenCountInput. |
personaId | string | null | The id of a persona to attach to every golden, so the simulated user is played in its voice and the scenarios are written for it. Send null or omit it for no persona. |
Returns
This method returns an object of type GenerateJourneyGoldensResult.
Get Path Results
Retrieves how the test cases simulated from a journey's goldens went: for each test case, the path it was generated for and the path the conversation actually took, plus each metric's results per path. Use it to find the branches where your LLM app strays from the journey or fails its metrics.
from confident_ai import ConfidentAI
client = ConfidentAI()
result = client.journeys.get_path_results(
journey_id="<JOURNEY-ID>",
start="2025-01-01T00:00:00+00:00",
end="2025-01-31T23:59:59+00:00",
)For async mode, call a_get_path_results and await it as shown below:
result = await client.journeys.a_get_path_results(...)Parameters
| Parameter | Type | Description |
|---|---|---|
journey_id | str | Required. The id of the journey. |
start | Optional[str] | Only include test cases last updated at or after this time, in ISO 8601 format. Send it with end, or omit both to include every test case. |
end | Optional[str] | Only include test cases last updated at or before this time, in ISO 8601 format. Send it with start; it must be later than start. |
import { ConfidentAI } from "confident-ai";
const client = new ConfidentAI();
const result = await client.journeys.getPathResults(
"<JOURNEY-ID>",
"2025-01-01T00:00:00+00:00",
"2025-01-31T23:59:59+00:00",
);Parameters
| Parameter | Type | Description |
|---|---|---|
journeyId | string | Required. The id of the journey. |
start | string | Only include test cases last updated at or after this time, in ISO 8601 format. Send it with end, or omit both to include every test case. |
end | string | Only include test cases last updated at or before this time, in ISO 8601 format. Send it with start; it must be later than start. |
Returns
This method returns an object of type JourneyPathResults.
Types
GenerateJourneyGoldensResult
How many goldens were generated from a journey's paths.
class GenerateJourneyGoldensResult:
golden_count: int = Field(alias="goldenCount")golden_countintRequired
The number of goldens created.
Example: 9
interface GenerateJourneyGoldensResult {
goldenCount: number;
}goldenCountnumberRequired
The number of goldens created.
Example: 9
Journey
A map of the ways a conversation with your LLM app can go. States are the steps, edges are the conditions that move the conversation between them, and each route from the root state to an end is a path you can generate multi-turn goldens for, so every branch gets tested.
class Journey:
id: str
name: str
description: Optional[str]
root_state_id: Optional[str] = Field(alias="rootStateId")
states: List[JourneyState]
edges: List[JourneyEdge]
paths: List[JourneyPath]
paths_truncated: bool = Field(alias="pathsTruncated")
datasets: List[JourneyPathDataset]
created_at: str = Field(alias="createdAt")
updated_at: str = Field(alias="updatedAt")idstrRequired
The id of the journey, generated by Confident AI.
Example: "<JOURNEY-ID>"
namestrRequired
The name of the journey, unique within the project.
Example: "Refund request"
descriptionOptional[str]Required
What the user is trying to get done on this journey, or null when none was given.
Example: "A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human."
root_state_idOptional[str]Required
The id of the root Start state, which every path begins at. It cannot be deleted.
Example: "<JOURNEY-STATE-ID>"
statesList[JourneyState]Required
Every state in the journey, oldest first.
See JourneyState.
edgesList[JourneyEdge]Required
Every edge in the journey, oldest first.
See JourneyEdge.
pathsList[JourneyPath]Required
Every route from the root state to a state with no further edges, following only edges with a non-empty when and never visiting a state twice. At most 50 are listed.
See JourneyPath.
paths_truncatedboolRequired
true when the journey has more than 50 paths, so paths lists only the first 50.
Example: false
datasetsList[JourneyPathDataset]Required
The datasets holding goldens generated from this journey.
See JourneyPathDataset.
created_atstrRequired
The time the journey was created, as an ISO 8601 datetime.
Example: "2025-01-15T10:30:00+00:00"
updated_atstrRequired
The time the journey's name or description was last changed, as an ISO 8601 datetime.
Example: "2025-01-16T09:12:00+00:00"
interface Journey {
id: string;
name: string;
description: string | null;
rootStateId: string | null;
states: JourneyState[];
edges: JourneyEdge[];
paths: JourneyPath[];
pathsTruncated: boolean;
datasets: JourneyPathDataset[];
createdAt: string;
updatedAt: string;
}idstringRequired
The id of the journey, generated by Confident AI.
Example: "<JOURNEY-ID>"
namestringRequired
The name of the journey, unique within the project.
Example: "Refund request"
descriptionstring | nullRequired
What the user is trying to get done on this journey, or null when none was given.
Example: "A customer asks for a refund on a recent order. The agent verifies who they are, then either issues the refund or hands the conversation to a human."
rootStateIdstring | nullRequired
The id of the root Start state, which every path begins at. It cannot be deleted.
Example: "<JOURNEY-STATE-ID>"
statesJourneyState[]Required
Every state in the journey, oldest first.
See JourneyState.
edgesJourneyEdge[]Required
Every edge in the journey, oldest first.
See JourneyEdge.
pathsJourneyPath[]Required
Every route from the root state to a state with no further edges, following only edges with a non-empty when and never visiting a state twice. At most 50 are listed.
See JourneyPath.
pathsTruncatedbooleanRequired
true when the journey has more than 50 paths, so paths lists only the first 50.
Example: false
datasetsJourneyPathDataset[]Required
The datasets holding goldens generated from this journey.
See JourneyPathDataset.
createdAtstringRequired
The time the journey was created, as an ISO 8601 datetime.
Example: "2025-01-15T10:30:00+00:00"
updatedAtstringRequired
The time the journey's name or description was last changed, as an ISO 8601 datetime.
Example: "2025-01-16T09:12:00+00:00"
JourneyEdge
A transition from one state of a journey to another, taken when its condition holds.
class JourneyEdge:
id: str
from_state_id: str = Field(alias="fromStateId")
to_state_id: str = Field(alias="toStateId")
when: str
created_at: str = Field(alias="createdAt")
updated_at: str = Field(alias="updatedAt")idstrRequired
The id of the edge, generated by Confident AI.
Example: "<JOURNEY-EDGE-ID>"
from_state_idstrRequired
The id of the state the edge leaves from.
Example: "<JOURNEY-STATE-ID>"
to_state_idstrRequired
The id of the state the edge leads to.
Example: "<JOURNEY-STATE-ID>"
whenstrRequired
The condition under which the conversation moves along this edge. Empty when none has been given, which keeps the edge out of the journey's paths.
Example: "The customer has given an order number and the email on the account, and they match."
created_atstrRequired
The time the edge was created, as an ISO 8601 datetime.
Example: "2025-01-15T10:30:00+00:00"
updated_atstrRequired
The time the edge was last changed, as an ISO 8601 datetime.
Example: "2025-01-16T09:12:00+00:00"
interface JourneyEdge {
id: string;
fromStateId: string;
toStateId: string;
when: string;
createdAt: string;
updatedAt: string;
}idstringRequired
The id of the edge, generated by Confident AI.
Example: "<JOURNEY-EDGE-ID>"
fromStateIdstringRequired
The id of the state the edge leaves from.
Example: "<JOURNEY-STATE-ID>"
toStateIdstringRequired
The id of the state the edge leads to.
Example: "<JOURNEY-STATE-ID>"
whenstringRequired
The condition under which the conversation moves along this edge. Empty when none has been given, which keeps the edge out of the journey's paths.
Example: "The customer has given an order number and the email on the account, and they match."
createdAtstringRequired
The time the edge was created, as an ISO 8601 datetime.
Example: "2025-01-15T10:30:00+00:00"
updatedAtstringRequired
The time the edge was last changed, as an ISO 8601 datetime.
Example: "2025-01-16T09:12:00+00:00"
JourneyGraphSource
Where a new journey's first states and edges come from. ai has Confident AI draft them from the journey's name and description.
class JourneyGraphSource(Enum):
AI = "ai"enum JourneyGraphSource {
AI = "ai",
}AI
JourneyList
One page of journeys, with the total across all pages.
class JourneyList:
journeys: List[JourneySummary]
total_journeys: int = Field(alias="totalJourneys")
page: int
page_size: int = Field(alias="pageSize")journeysList[JourneySummary]Required
The journeys for the current page, newest first.
See JourneySummary.
total_journeysintRequired
The total number of journeys in this project.
Example: 3
pageintRequired
The page this response covers.
Example: 1
page_sizeintRequired
The number of journeys per page.
Example: 25
interface JourneyList {
journeys: JourneySummary[];
totalJourneys: number;
page: number;
pageSize: number;
}journeysJourneySummary[]Required
The journeys for the current page, newest first.
See JourneySummary.
totalJourneysnumberRequired
The total number of journeys in this project.
Example: 3
pagenumberRequired
The page this response covers.
Example: 1
pageSizenumberRequired
The number of journeys per page.
Example: 25
JourneyPath
One route through a journey, from the root state to a state with no further edges, and the goldens generated for it.
class JourneyPath:
state_ids: List[str] = Field(alias="stateIds")
golden_count: int = Field(alias="goldenCount")
datasets: List[JourneyPathDataset]state_idsList[str]Required
The ids of the states along the path, in order, starting with the root state.
Example: ["<JOURNEY-STATE-ID>"]
golden_countintRequired
The number of goldens generated for exactly this path.
Example: 4
datasetsList[JourneyPathDataset]Required
The datasets holding this path's goldens.
See JourneyPathDataset.
interface JourneyPath {
stateIds: string[];
goldenCount: number;
datasets: JourneyPathDataset[];
}stateIdsstring[]Required
The ids of the states along the path, in order, starting with the root state.
Example: ["<JOURNEY-STATE-ID>"]
goldenCountnumberRequired
The number of goldens generated for exactly this path.
Example: 4
datasetsJourneyPathDataset[]Required
The datasets holding this path's goldens.
See JourneyPathDataset.
JourneyPathDataset
A dataset holding goldens generated from a journey, and how many of them it holds.
class JourneyPathDataset:
id: str
alias: str
golden_count: int = Field(alias="goldenCount")idstrRequired
The id of the dataset.
Example: "<DATASET-ID>"
aliasstrRequired
The alias of the dataset, unique within your project.
Example: "refund-conversations"
golden_countintRequired
The number of the journey's goldens this dataset holds.
Example: 6
interface JourneyPathDataset {
id: string;
alias: string;
goldenCount: number;
}idstringRequired
The id of the dataset.
Example: "<DATASET-ID>"
aliasstringRequired
The alias of the dataset, unique within your project.
Example: "refund-conversations"
goldenCountnumberRequired
The number of the journey's goldens this dataset holds.
Example: 6
JourneyPathGoldenCountInput
A path of a journey and how many goldens to generate for it.
class JourneyPathGoldenCountInput:
state_ids: List[str] = Field(alias="stateIds")
count: intstate_idsList[str]Required
The ids of the path's states, in order from the root state, exactly as the journey lists them under paths. A path that is not one of the journey's paths is skipped.
Example: ["<JOURNEY-STATE-ID>"]
countintRequired
How many goldens to generate for the path, at most 100. They all share one scenario, and differ only in how each simulated conversation plays out.
Example: 3
interface JourneyPathGoldenCountInput {
stateIds: string[];
count: number;
}stateIdsstring[]Required
The ids of the path's states, in order from the root state, exactly as the journey lists them under paths. A path that is not one of the journey's paths is skipped.
Example: ["<JOURNEY-STATE-ID>"]
countnumberRequired
How many goldens to generate for the path, at most 100. They all share one scenario, and differ only in how each simulated conversation plays out.
Example: 3
JourneyPathMetricStat
How one metric did across the test cases generated for one path of a journey.
class JourneyPathMetricStat:
journey_state_ids: List[str] = Field(alias="journeyStateIds")
name: str
avg_score: Optional[float] = Field(alias="avgScore")
passed: int
failed: intjourney_state_idsList[str]Required
The path these results are for, as state ids in order from the root state.
Example: ["<JOURNEY-STATE-ID>"]
namestrRequired
The name of the metric.
Example: "Conversation Completeness"
avg_scoreOptional[float]Required
The metric's average score across the path's test cases, or null when none was scored.
Example: 0.82
passedintRequired
The number of the path's test cases that passed the metric.
Example: 7
failedintRequired
The number of the path's test cases that failed the metric. Results that errored count as neither passed nor failed.
Example: 2
interface JourneyPathMetricStat {
journeyStateIds: string[];
name: string;
avgScore: number | null;
passed: number;
failed: number;
}journeyStateIdsstring[]Required
The path these results are for, as state ids in order from the root state.
Example: ["<JOURNEY-STATE-ID>"]
namestringRequired
The name of the metric.
Example: "Conversation Completeness"
avgScorenumber | nullRequired
The metric's average score across the path's test cases, or null when none was scored.
Example: 0.82
passednumberRequired
The number of the path's test cases that passed the metric.
Example: 7
failednumberRequired
The number of the path's test cases that failed the metric. Results that errored count as neither passed nor failed.
Example: 2
JourneyPathResults
How the test cases generated from a journey's paths actually went: which path each conversation took, and how each path did on each metric.
class JourneyPathResults:
test_cases: List[JourneyPathTestCase] = Field(alias="testCases")
metrics: List[JourneyPathMetricStat]test_casesList[JourneyPathTestCase]Required
Every test case simulated from this journey's goldens in the time window, in no particular order.
See JourneyPathTestCase.
metricsList[JourneyPathMetricStat]Required
Metric results for the same test cases, one entry per path and metric. Skipped and flaky metric results are left out.
interface JourneyPathResults {
testCases: JourneyPathTestCase[];
metrics: JourneyPathMetricStat[];
}testCasesJourneyPathTestCase[]Required
Every test case simulated from this journey's goldens in the time window, in no particular order.
See JourneyPathTestCase.
metricsJourneyPathMetricStat[]Required
Metric results for the same test cases, one entry per path and metric. Skipped and flaky metric results are left out.
JourneyPathTestCase
A test case simulated from one of a journey's goldens, with the path it was meant to follow and the one it took.
class JourneyPathTestCase:
test_case_id: str = Field(alias="testCaseId")
test_run_id: str = Field(alias="testRunId")
name: str
journey_state_ids: List[str] = Field(alias="journeyStateIds")
journey_path: List[str] = Field(alias="journeyPath")
status: Optional[TestCaseStatus]
success: Optional[bool]
completion_time: Optional[float] = Field(alias="completionTime")test_case_idstrRequired
The id of the test case.
Example: "<TEST-CASE-ID>"
test_run_idstrRequired
The id of the test run the test case belongs to.
Example: "<TEST-RUN-ID>"
namestrRequired
The name of the test case.
Example: "Refund request, verified"
journey_state_idsList[str]Required
The path the test case's golden was generated for, as state ids in order from the root state.
Example: ["<JOURNEY-STATE-ID>"]
journey_pathList[str]Required
The state the simulated conversation was in on each user turn, in order, so a state repeats while the conversation stays in it. Compare it with journeyStateIds to see where the conversation left the intended path. [] when it was not recorded.
Example: ["<JOURNEY-STATE-ID>"]
statusOptional[TestCaseStatus]Required
Where the test case is in its run, or null when it was not recorded.
See TestCaseStatus.
Example: "COMPLETED"
successOptional[bool]Required
Whether the test case passed its metrics, or null when it has no verdict yet.
Example: true
completion_timeOptional[float]Required
How long the test case took to run, in seconds, or null when it was not recorded.
Example: 12.4
interface JourneyPathTestCase {
testCaseId: string;
testRunId: string;
name: string;
journeyStateIds: string[];
journeyPath: string[];
status: TestCaseStatus | null;
success: boolean | null;
completionTime: number | null;
}testCaseIdstringRequired
The id of the test case.
Example: "<TEST-CASE-ID>"
testRunIdstringRequired
The id of the test run the test case belongs to.
Example: "<TEST-RUN-ID>"
namestringRequired
The name of the test case.
Example: "Refund request, verified"
journeyStateIdsstring[]Required
The path the test case's golden was generated for, as state ids in order from the root state.
Example: ["<JOURNEY-STATE-ID>"]
journeyPathstring[]Required
The state the simulated conversation was in on each user turn, in order, so a state repeats while the conversation stays in it. Compare it with journeyStateIds to see where the conversation left the intended path. [] when it was not recorded.
Example: ["<JOURNEY-STATE-ID>"]
statusTestCaseStatus | nullRequired
Where the test case is in its run, or null when it was not recorded.
See TestCaseStatus.
Example: "COMPLETED"
successboolean | nullRequired
Whether the test case passed its metrics, or null when it has no verdict yet.
Example: true
completionTimenumber | nullRequired
How long the test case took to run, in seconds, or null when it was not recorded.
Example: 12.4
JourneyRef
A reference to a journey by its id.
class JourneyRef:
id: stridstrRequired
The id of the journey, generated by Confident AI.
Example: "<JOURNEY-ID>"
interface JourneyRef {
id: string;
}idstringRequired
The id of the journey, generated by Confident AI.
Example: "<JOURNEY-ID>"
JourneyState
One step of a journey: a point the conversation can reach, with instructions for what happens there.
class JourneyState:
id: str
name: str
instructions: str
golden_count: int = Field(alias="goldenCount")
created_at: str = Field(alias="createdAt")
updated_at: str = Field(alias="updatedAt")idstrRequired
The id of the state, generated by Confident AI.
Example: "<JOURNEY-STATE-ID>"
namestrRequired
The name of the state, unique within the journey.
Example: "Verify identity"
instructionsstrRequired
What happens at this step of the conversation, as golden generation reads it.
Example: "The agent asks for the order number and the email on the account, and checks they match before going further."
golden_countintRequired
The number of goldens generated for a path through this state.
Example: 10
created_atstrRequired
The time the state was created, as an ISO 8601 datetime.
Example: "2025-01-15T10:30:00+00:00"
updated_atstrRequired
The time the state was last changed, as an ISO 8601 datetime.
Example: "2025-01-16T09:12:00+00:00"
interface JourneyState {
id: string;
name: string;
instructions: string;
goldenCount: number;
createdAt: string;
updatedAt: string;
}idstringRequired
The id of the state, generated by Confident AI.
Example: "<JOURNEY-STATE-ID>"
namestringRequired
The name of the state, unique within the journey.
Example: "Verify identity"
instructionsstringRequired
What happens at this step of the conversation, as golden generation reads it.
Example: "The agent asks for the order number and the email on the account, and checks they match before going further."
goldenCountnumberRequired
The number of goldens generated for a path through this state.
Example: 10
createdAtstringRequired
The time the state was created, as an ISO 8601 datetime.
Example: "2025-01-15T10:30:00+00:00"
updatedAtstringRequired
The time the state was last changed, as an ISO 8601 datetime.
Example: "2025-01-16T09:12:00+00:00"
JourneySummary
A journey as it appears in a list: enough to recognise it and pick its id. Retrieve one by id to read its states, edges and paths.
class JourneySummary:
id: str
name: str
state_count: int = Field(alias="stateCount")
golden_count: int = Field(alias="goldenCount")idstrRequired
The id of the journey, generated by Confident AI.
Example: "<JOURNEY-ID>"
namestrRequired
The name of the journey.
Example: "Refund request"
state_countintRequired
The number of states in the journey, including its root.
Example: 4
golden_countintRequired
The number of goldens generated from the journey.
Example: 10
interface JourneySummary {
id: string;
name: string;
stateCount: number;
goldenCount: number;
}idstringRequired
The id of the journey, generated by Confident AI.
Example: "<JOURNEY-ID>"
namestringRequired
The name of the journey.
Example: "Refund request"
stateCountnumberRequired
The number of states in the journey, including its root.
Example: 4
goldenCountnumberRequired
The number of goldens generated from the journey.
Example: 10
TestCaseStatus
Where a test case is in its run: GENERATING its output, EVALUATING its metrics, COMPLETED, or ERRORED. WAITING means an asynchronous result has not arrived yet.
class TestCaseStatus(Enum):
GENERATING = "GENERATING"
EVALUATING = "EVALUATING"
ERRORED = "ERRORED"
COMPLETED = "COMPLETED"
WAITING = "WAITING"enum TestCaseStatus {
GENERATING = "GENERATING",
EVALUATING = "EVALUATING",
ERRORED = "ERRORED",
COMPLETED = "COMPLETED",
WAITING = "WAITING",
}GENERATING · EVALUATING · ERRORED · COMPLETED · WAITING
Last updated on