Skip to content
Prompty

ContextCandidate

A context contribution before filtering, ranking, and packing.

---
title: ContextCandidate
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class ContextCandidate {
        +string id
        +string source
        +Message[] messages
        +dictionary metadata
    }
    class Message {
        +string role
        +ContentPart[] parts
        +dictionary metadata
    }
    ContextCandidate *-- Message
id: memory:project-plan
source: memory
Name Type Description
id string Stable candidate identifier
source string Host-defined source of the candidate
messages Message[] Messages contributed by the candidate
metadata dictionary Opaque host-specific candidate metadata

The following types are composed within ContextCandidate: