Protocol Documentation

April 7, 2026 · View on GitHub

flagd/evaluation/v1/evaluation.proto

Flag evaluation API

This proto forms the basis of a flag-evaluation API. It supports single and bulk evaluation RPCs, and flags of various types, as well as establishing a stream for getting notifications about changes in a flag definition. It supports the inclusion of a "context" with each evaluation, which may contain arbitrary attributes relevant to flag evaluation.

AnyFlag

A variant type flag response.

FieldTypeLabelDescription
reasonstringThe reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details
variantstringThe variant name of the returned flag value.
bool_valuebool
string_valuestring
double_valuedouble
object_valuegoogle.protobuf.Struct
metadatagoogle.protobuf.StructMetadata for this evaluation

EventStreamRequest

Empty stream request body

EventStreamResponse

Response body for the EventStream stream response

FieldTypeLabelDescription
typestringString key indicating the type of event that is being received, for example, provider_ready or configuration_change
datagoogle.protobuf.StructObject structure for use when sending relevant metadata to provide context to the event. Can be left unset when it is not required.

ResolveAllRequest

Request body for bulk flag evaluation, used by the ResolveAll rpc.

FieldTypeLabelDescription
contextgoogle.protobuf.StructObject structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context

ResolveAllResponse

Response body for bulk flag evaluation, used by the ResolveAll rpc.

FieldTypeLabelDescription
flagsResolveAllResponse.FlagsEntryrepeatedObject structure describing the evaluated flags for the provided context.
metadatagoogle.protobuf.StructMetadata for the bulk evaluation

ResolveAllResponse.FlagsEntry

FieldTypeLabelDescription
keystring
valueAnyFlag

ResolveBooleanRequest

Request body for boolean flag evaluation, used by the ResolveBoolean rpc.

FieldTypeLabelDescription
flag_keystringFlag key of the requested flag.
contextgoogle.protobuf.StructObject structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context

ResolveBooleanResponse

Response body for boolean flag evaluation. used by the ResolveBoolean rpc.

FieldTypeLabelDescription
valueboolThe response value of the boolean flag evaluation, will be unset in the case of error.
reasonstringThe reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details
variantstringThe variant name of the returned flag value.
metadatagoogle.protobuf.StructMetadata for this evaluation

ResolveFloatRequest

Request body for float flag evaluation, used by the ResolveFloat rpc.

FieldTypeLabelDescription
flag_keystringFlag key of the requested flag.
contextgoogle.protobuf.StructObject structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context

ResolveFloatResponse

Response body for float flag evaluation. used by the ResolveFloat rpc.

FieldTypeLabelDescription
valuedoubleThe response value of the float flag evaluation, will be empty in the case of error.
reasonstringThe reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details
variantstringThe variant name of the returned flag value.
metadatagoogle.protobuf.StructMetadata for this evaluation

ResolveIntRequest

Request body for int flag evaluation, used by the ResolveInt rpc.

FieldTypeLabelDescription
flag_keystringFlag key of the requested flag.
contextgoogle.protobuf.StructObject structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context

ResolveIntResponse

Response body for int flag evaluation. used by the ResolveInt rpc.

FieldTypeLabelDescription
valueint64The response value of the int flag evaluation, will be unset in the case of error.
reasonstringThe reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details
variantstringThe variant name of the returned flag value.
metadatagoogle.protobuf.StructMetadata for this evaluation

ResolveObjectRequest

Request body for object flag evaluation, used by the ResolveObject rpc.

FieldTypeLabelDescription
flag_keystringFlag key of the requested flag.
contextgoogle.protobuf.StructObject structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context

ResolveObjectResponse

Response body for object flag evaluation. used by the ResolveObject rpc.

FieldTypeLabelDescription
valuegoogle.protobuf.StructThe response value of the object flag evaluation, will be unset in the case of error.

NOTE: This structure will need to be decoded from google/protobuf/struct.proto before it is returned to the SDK | | reason | string | | The reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details | | variant | string | | The variant name of the returned flag value. | | metadata | google.protobuf.Struct | | Metadata for this evaluation |

ResolveStringRequest

Request body for string flag evaluation, used by the ResolveString rpc.

FieldTypeLabelDescription
flag_keystringFlag key of the requested flag.
contextgoogle.protobuf.StructObject structure describing the EvaluationContext used in the flag evaluation, see https://openfeature.dev/docs/reference/concepts/evaluation-context

ResolveStringResponse

Response body for string flag evaluation. used by the ResolveString rpc.

FieldTypeLabelDescription
valuestringThe response value of the string flag evaluation, will be unset in the case of error.
reasonstringThe reason for the given return value, see https://openfeature.dev/docs/specification/types#resolution-details
variantstringThe variant name of the returned flag value.
metadatagoogle.protobuf.StructMetadata for this evaluation

Service

Service defines the exposed rpcs of flagd

Method NameRequest TypeResponse TypeDescription
ResolveAllResolveAllRequestResolveAllResponse
ResolveBooleanResolveBooleanRequestResolveBooleanResponse
ResolveStringResolveStringRequestResolveStringResponse
ResolveFloatResolveFloatRequestResolveFloatResponse
ResolveIntResolveIntRequestResolveIntResponse
ResolveObjectResolveObjectRequestResolveObjectResponse
EventStreamEventStreamRequestEventStreamResponse stream

Top

flagd/sync/v1/sync.proto

Flag definition sync API

This proto defines a simple API to synchronize a feature flag definition. It supports establishing a stream for getting notifications about changes in a flag definition.

FetchAllFlagsRequest

FetchAllFlagsRequest is the request to fetch all flags. Clients send this request as the client in order to resync their internal state

FieldTypeLabelDescription
provider_idstringOptional: A unique identifier for clients initiating the request. The server implementations may utilize this identifier to uniquely identify, validate(ex:- enforce authentication/authorization) and filter flag configurations that it can expose to this request. This field is intended to be optional. However server implementations may enforce it. ex:- provider_id: flagd-weatherapp-sidecar
selectorstringDeprecated. Optional: A selector for the flag configuration request. The server implementation may utilize this to select flag configurations from a collection, select the source of the flag or combine this to any desired underlying filtering mechanism. ex:- selector: 'source=database,app=weatherapp'

Deprecated: Use the 'Flagd-Selector' header instead. Remember to reserve field number 2 if this is removed; |

FetchAllFlagsResponse

FetchAllFlagsResponse is the server response containing feature flag configurations

FieldTypeLabelDescription
flag_configurationstringflagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/flagd-schemas/main/json/flags.json

GetMetadataRequest

GetMetadataRequest is the request for retrieving metadata from the sync service

GetMetadataResponse

GetMetadataResponse contains metadata from the sync service DEPRECATED; use flagd.sync.v1.SyncFlagsResponse.sync_context

FieldTypeLabelDescription
metadatagoogle.protobuf.Struct

SyncFlagsRequest

SyncFlagsRequest is the request initiating the server-streaming rpc. Implementations of Flagd providers and Flagd itself send this request, acting as the client.

FieldTypeLabelDescription
provider_idstringOptional: A unique identifier for flagd(grpc client) initiating the request. The server implementations may utilize this identifier to uniquely identify, validate(ex:- enforce authentication/authorization) and filter flag configurations that it can expose to this request. This field is intended to be optional. However server implementations may enforce it. ex:- provider_id: flagd-weatherapp-sidecar
selectorstringDeprecated. Optional: A selector for the flag configuration request. The server implementation may utilize this to select flag configurations from a collection, select the source of the flag or combine this to any desired underlying filtering mechanism. ex:- selector: 'source=database,app=weatherapp'

Deprecated: Use the 'Flagd-Selector' header instead. Remember to reserve field number 2 if this is removed; |

SyncFlagsResponse

SyncFlagsResponse is the server response containing feature flag configurations and the state

FieldTypeLabelDescription
flag_configurationstringflagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/flagd-schemas/main/json/flags.json
sync_contextgoogle.protobuf.StructoptionalStatic context to be included in in-process evaluations (optional).

FlagSyncService

FlagService implements a server streaming to provide realtime flag configurations

Method NameRequest TypeResponse TypeDescription
SyncFlagsSyncFlagsRequestSyncFlagsResponse stream
FetchAllFlagsFetchAllFlagsRequestFetchAllFlagsResponse
GetMetadataGetMetadataRequestGetMetadataResponse

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2282^{28}.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2562^{56}.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)