> ## 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.

# SerializedLlmSpan

***

# Interface: SerializedLlmSpan

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

## Extends

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

## Indexable

```ts theme={null}
[key: string]:
  | undefined
  | string
  | number
  | boolean
  | {
  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
  | Record<string, string>
  | Document[]
  | JsonArray
  | Record<string, string>[]
  | object[]
  | Record<string, string>[]
  | SingleMetricValue[]
| Record<string, SingleMetricValue>
```

## 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`createdAt`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#createdat)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`datasetInput`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#datasetinput)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`datasetMetadata`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#datasetmetadata)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`datasetOutput`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#datasetoutput)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`externalId`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#externalid)

***

### id?

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

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

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`id`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#id)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`input`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#input)

***

### metadata?

```ts theme={null}
optional metadata: 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`metadata`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#metadata)

***

### metrics?

```ts theme={null}
optional metrics: object;
```

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

#### durationNs?

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

#### numCachedInputTokens?

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

#### numInputTokens?

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

#### numOutputTokens?

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

#### numReasoningTokens?

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

#### numTotalTokens?

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

#### timeToFirstTokenNs?

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

#### Overrides

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`metrics`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#metrics)

***

### name?

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

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

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`name`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#name)

***

### output?

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

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

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`output`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#output)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`redactedInput`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#redactedinput)

***

### redactedOutput?

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

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

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`redactedOutput`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#redactedoutput)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`statusCode`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#statuscode)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`stepNumber`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#stepnumber)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`tags`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#tags)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`type`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#type)

***

### 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)

#### Inherited from

[`SerializedStep`](/sdk-api/typescript/reference/types/interfaces/SerializedStep).[`userMetadata`](/sdk-api/typescript/reference/types/interfaces/SerializedStep.mdx#usermetadata)
