Briyah SDK - v2.0.6
    Preparing search index...

    Interface ArtifactWriteOptions

    How a tool wants an artifact written.

    interface ArtifactWriteOptions {
        creator?: string;
        transient?: boolean;
        viewers?: string[];
    }
    Index
    creator?: string

    The agent to credit as author. Omit to credit the calling agent. Only honored when the artifact is created, and ignored if it names no agent in the room. Use it when a tool writes on another agent's behalf — the creator counts as a viewer, so authorship decides who pays to see it.

    transient?: boolean

    Deliver the artifact in each viewer's transient per-turn prompt instead of the cached block. Omit to leave an existing artifact's delivery as it is.

    An ordinary artifact is cached, so a write throws away every viewer's cached prefix — including their attached documents. A transient one costs nothing to write but is re-sent in full on every one of its viewers' turns. Mark state that is small and changes constantly; leave anything large and stable cached.

    viewers?: string[]

    The agents that may view the artifact. Omit to keep an existing artifact's viewers, or to default a new one to every agent in the room.

    Viewers matter for cost as well as secrecy: a viewer has the artifact rendered into its cached prompt, so every write invalidates that agent's cache. Scope narrowly and let agents read the rest through tool results.