ArtifactStore

org.llm4s.context.ArtifactStore
See theArtifactStore companion object

Storage interface for externalized content.

When tool outputs exceed the externalization threshold, they are stored in an ArtifactStore and replaced with content pointers. This allows the conversation to reference the content without including it inline.

==Content-Addressed Storage==

Content is stored using content-addressed keys (based on content hash), which enables:

  • Deduplication of identical outputs
  • Efficient retrieval without scanning
  • Immutable content guarantees

==Implementations==

Use ArtifactStore.inMemory for testing and short-lived sessions. For production, implement with persistent storage (database, S3, etc.).

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def exists(key: ArtifactKey): Boolean

Check if content exists for the given key.

Check if content exists for the given key.

Attributes

def retrieve(key: ArtifactKey): Result[Option[String]]

Retrieve content by key, returning None if not found.

Retrieve content by key, returning None if not found.

Attributes

def store(key: ArtifactKey, content: String): Result[Unit]

Store content under the given key.

Store content under the given key.

Attributes