Installation

npm i @rungalileo/observe

Observe

import { GalileoObserveWorkflows } from "@rungalileo/observe";
const observeWorkflows = new GalileoObserveWorkflows("observe_example");
await observeWorkflows.init();

Adding workflows

Workflows can be added using addWorkflow, addAgentWorkflow, and addSingleStepWorkflow.

_ Note: Steps and nested workflows can only be added on addWorkflow and addAgentWorkflow. _

observeWorkflows.addWorkflow(new WorkflowStep({ ...step }));

Adding steps and nested workflows

Workflow steps can be added using addLlmStep, addRetrieverStep, addToolStep, addWorkflow, and addAgentWorkflow.

observeWorkflows.addLlmStep(new LlmStep({ ...step }));

Nested workflows can be added using addWorkflowStep and addAgentStep.

observeWorkflows.addWorkflowStep(new WorkflowStep({ ...step }));

The next step you add will be a child of this workflow.

Concluding workflows

To end a workflow or step out of the nested workflow, use concludeWorkflow.

observeWorkflows.concludeWorkflow(output, durationNs, statusCode);

Uploading workflows

Use uploadWorkflows to upload workflows to Galileo Observe.

await observeWorkflows.uploadWorkflows();

Was this page helpful?