ContextLayer

Text that helps an agent interpret its data source.

Usage

Source

ContextLayer(docs=())

Construct one with context_layer(). Internals are private and may change without notice.

Attributes

Name Description
docs The documents as read from their files, frontmatter stripped.

docs

The documents as read from their files, frontmatter stripped.

docs: tuple[str, …]

Methods

Name Description
prewarm() Build the index now so the first search does not pay for it.
search() Retrieve the chunks most relevant to query.

prewarm()

Build the index now so the first search does not pay for it.

Usage

Source

prewarm()

Optional and idempotent; worth calling when a search is known to be coming, so its cost does not land on the first user turn.