> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# BaseStep

***

# Class: BaseStep

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

## Extended by

* [`BaseSpan`](/sdk-api/typescript/reference/types/classes/BaseSpan)
* [`RetrieverSpan`](/sdk-api/typescript/reference/types/classes/RetrieverSpan)

## Constructors

### Constructor

```ts theme={null}
new BaseStep(type:
  | "agent"
  | "llm"
  | "retriever"
  | "tool"
  | "workflow"
  | "control"
  | "trace"
  | "session", data: BaseStepOptions): BaseStep;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

#### Parameters

##### type

`"agent"` | `"llm"` | `"retriever"` | `"tool"` | `"workflow"` | `"control"` | `"trace"` | `"session"`

##### data

[`BaseStepOptions`](/sdk-api/typescript/reference/types/interfaces/BaseStepOptions)

#### Returns

`BaseStep`

## Properties

### createdAt

```ts theme={null}
createdAt: Date;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### datasetInput?

```ts theme={null}
optional datasetInput: string;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### datasetMetadata?

```ts theme={null}
optional datasetMetadata: Record<string, string> = {};
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### datasetOutput?

```ts theme={null}
optional datasetOutput: string;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### externalId?

```ts theme={null}
optional externalId: string;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### id

```ts theme={null}
id: string;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### input?

```ts theme={null}
optional input: StepAllowedInputType;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### metrics

```ts theme={null}
metrics: Metrics;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### name

```ts theme={null}
name: string = "";
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### output?

```ts theme={null}
optional output: StepAllowedOutputType;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### redactedInput?

```ts theme={null}
optional redactedInput: StepAllowedInputType;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### redactedOutput?

```ts theme={null}
optional redactedOutput: StepAllowedOutputType;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### statusCode?

```ts theme={null}
optional statusCode: number;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### stepNumber?

```ts theme={null}
optional stepNumber: number;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### tags?

```ts theme={null}
optional tags: string[];
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### type

```ts theme={null}
type:
  | "agent"
  | "llm"
  | "retriever"
  | "tool"
  | "workflow"
  | "control"
  | "trace"
  | "session";
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

***

### userMetadata

```ts theme={null}
userMetadata: Record<string, string> = {};
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

## Methods

### toJSON()

```ts theme={null}
toJSON(): SerializedStep;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

#### Returns

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep)

***

### validateInputOutputSerializable()

```ts theme={null}
validateInputOutputSerializable<T>(val: T): T;
```

Defined in: [src/types/logging/step.types.ts](https://github.com/rungalileo/galileo-js/blob/main/src/types/logging/step.types.ts)

#### Type Parameters

##### T

`T` =
\| `string`
\| \{
`content`: | `string`
\| (
\| \{
`text`: `string`;
`type`: `"text"`;
}
\| \{
`file_id`: `string`;
`type`: `"file"`;
})\[];
`role`: | `"function"`
\| `"agent"`
\| `"tool"`
\| `"assistant"`
\| `"developer"`
\| `"system"`
\| `"user"`;
`tool_call_id?`: `null` | `string`;
`tool_calls?`: `null` | `object`\[];
}
\| `string`\[]
\| `Date`
\| [`Document`](/sdk-api/typescript/reference/types/classes/Document)
\| `Record`\<`string`, `string`>
\| [`Document`](/sdk-api/typescript/reference/types/classes/Document)\[]
\| `Record`\<`string`, `string`>\[]
\| `object`\[]
\| `Record`\<`string`, `string`>\[]

#### Parameters

##### val

`T`

#### Returns

`T`
