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

# Workflow state

> Public workflow state signatures and configuration in @agentium/core 4.0.0.

Import these **9 exports** from `@agentium/core`. Read the [workflow state guide](/workflows/time-travel) for setup and behavior, or return to the [package reference](/api-reference/core).

A `?` marks an optional field. These are declarations for lookup; run the examples in the linked guide. Follow related-type links for Agentium types and source links for imported dependency types.

## approxByteSize

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
export declare function approxByteSize(value: unknown): number;
```

## ARTIFACT\_POINTER\_PREFIX

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
export declare const ARTIFACT_POINTER_PREFIX = "art:";
```

## ArtifactPointer

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
export interface ArtifactPointer {
    pointer: string;
    preview: string;
    sizeBytes: number;
    name?: string;
}
```

## createArtifactTools

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-tools.ts)

```typescript theme={null}
/**
 * Returns the pair of tools an Agent uses to interact with the Memory Pointer
 * artifact store: `storeArtifact` and `getArtifact`.
 *
 * Both tools share the same `RunContext.sessionState`, so an artifact stored on
 * one turn is retrievable on later turns within the same session.
 */
export declare function createArtifactTools(): ToolDef[];
```

Related: [`ToolDef`](/api-reference/core/tools#tooldef).

## getArtifact

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
/** Look up an artifact by its pointer (`art:...`) or by its caller-supplied name. */
export declare function getArtifact(ctx: RunContext, pointerOrName: string): StoredArtifact | null;
```

Related: [`RunContext`](/api-reference/core/agent#runcontext), [`StoredArtifact`](/api-reference/core/state#storedartifact).

## isPointer

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
/** Convert a pointer string back to its raw artifact. Returns `null` if not found. */
export declare function isPointer(s: unknown): s is string;
```

## listArtifacts

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
/** List all artifacts stored in the current run/session. */
export declare function listArtifacts(ctx: RunContext): StoredArtifact[];
```

Related: [`RunContext`](/api-reference/core/agent#runcontext), [`StoredArtifact`](/api-reference/core/state#storedartifact).

## storeArtifact

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
/** Store an artifact and return its pointer + preview. */
export declare function storeArtifact(ctx: RunContext, value: unknown, opts?: {
    name?: string;
    contentType?: string;
    previewChars?: number;
}): ArtifactPointer;
```

Related: [`ArtifactPointer`](/api-reference/core/state#artifactpointer), [`RunContext`](/api-reference/core/agent#runcontext).

## StoredArtifact

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/state/artifact-store.ts)

```typescript theme={null}
export interface StoredArtifact {
    id: string;
    /** Optional caller-supplied name for human-readable retrieval. */
    name?: string;
    /** The actual stored value. */
    value: unknown;
    /** Short text preview used in pointer responses. */
    preview: string;
    /** Approximate size of the original serialized value in bytes. */
    sizeBytes: number;
    /** When the artifact was stored. */
    storedAt: number;
    /** Mime type or content type hint. */
    contentType?: string;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.