ART Framework API Docs
    Preparing search index...

    Interface ObservationManager

    Interface for managing the recording and retrieval of observations.

    interface ObservationManager {
        getObservations(
            threadId: string,
            filter?: ObservationFilter,
        ): Promise<Observation[]>;
        record(
            observationData: Omit<Observation, "id" | "timestamp" | "title">,
        ): Promise<void>;
    }
    Index

    Methods

    • Retrieves historical observations stored for a specific thread.

      Parameters

      • threadId: string

        The ID of the thread whose observations are to be retrieved.

      • Optionalfilter: ObservationFilter

        Optional criteria to filter the observations, e.g., by ObservationType. See ObservationFilter.

      Returns Promise<Observation[]>

      A promise resolving to an array of Observation objects matching the criteria.

    • Creates, persists, and broadcasts a new observation record. This is the primary method used by other systems to log significant events. It automatically generates a unique ID, timestamp, and potentially a title.

      Parameters

      • observationData: Omit<Observation, "id" | "timestamp" | "title">

        An object containing the core data for the observation (threadId, type, content, metadata, etc.), excluding fields generated by the manager (id, timestamp, title).

      Returns Promise<void>

      A promise that resolves when the observation has been recorded and notified.