GoodMemGoodMem
ReferenceAPIgRPC API

Decision Model

gRPC DecisionModelService reference for CreateDecisionModel, GetDecisionModel, ListDecisionModels, UpdateDecisionModel and other RPCs, with request messages, response types, and service documentation.

Services

DecisionModelService Service

All calls require authenticated credentials. Authorization uses the live resource policy and API-key ceiling. Missing resources return NOT_FOUND before an existing resource can be denied. Failures may include UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT, INTERNAL, CANCELLED, DEADLINE_EXCEEDED, RESOURCE_EXHAUSTED or UNAVAILABLE.

CreateDecisionModel

Requires CREATE_DECISION_MODEL for the proposed ID/owner. Persists one registration and audit actor. Not automatically retried; a duplicate client UUID returns ALREADY_EXISTS. Identical connections with distinct IDs are allowed. Returns metadata without credentials. Idempotency: Non-idempotent. A supplied UUID detects duplicates but does not replay a response.

Type
Requestgoodmem.v1.CreateDecisionModelRequest
Responsegoodmem.v1.DecisionModel

GetDecisionModel

Read-only. Requires READ_DECISION_MODEL and additionally READ_DECISION_MODEL_CREDENTIALS when include_credentials is true. Credentials are masked until both gates succeed. Idempotency: Read-only; safe to retry, although current state may change.

Type
Requestgoodmem.v1.GetDecisionModelRequest
Responsegoodmem.v1.DecisionModel

ListDecisionModels

Read-only. Requires instance LIST_DECISION_MODEL and SQL-filtered READ_DECISION_MODEL per row. Fixed ordering: created_at DESC, decision_model_id DESC. Tokens bind caller and all filters; authorization is re-evaluated on every page. Credentials are always omitted. Idempotency: Read-only; pages reflect current authorization and registration state.

Type
Requestgoodmem.v1.ListDecisionModelsRequest
Responsegoodmem.v1.ListDecisionModelsResponse

UpdateDecisionModel

Requires UPDATE_DECISION_MODEL, rechecked at the write. Omitted fields remain unchanged; supplied configuration replaces the object, and empty monitoring_endpoint clears it. Provider/owner cannot change. Empty updates are invalid. Returns no credentials. Idempotency: Idempotent configuration changes; repeating input preserves field values, but update audit timestamps change.

Type
Requestgoodmem.v1.UpdateDecisionModelRequest
Responsegoodmem.v1.DecisionModel

DeleteDecisionModel

Requires DELETE_DECISION_MODEL, rechecked at deletion. Removes only the registration; no provider action occurs. Repeating a successful deletion returns NOT_FOUND. Idempotency: Idempotent final state; repeating a successful delete returns NOT_FOUND.

Type
Requestgoodmem.v1.DeleteDecisionModelRequest
Responsegoogle.protobuf.Empty

Decide

Requires READ_DECISION_MODEL and EXECUTE_DECISION_MODEL. Invokes the stored provider once; this can incur provider charges and must not be retried automatically. Does not persist input or output. Unsupported questions/media produce INVALID_ARGUMENT; provider authentication or configuration failures are FAILED_PRECONDITION; provider rate limits are RESOURCE_EXHAUSTED. Provider error bodies and stored credentials never appear in client errors. Idempotency: Non-idempotent; each call may incur provider charges. Never automatically retry.

Type
Requestgoodmem.v1.DecisionRequest
Responsegoodmem.v1.DecisionResponse

Messages

DecisionModel

Registered connection to a System One decision model. Provider and owner are immutable. Identical connections may be registered independently. Only the UUID is unique. Credentials appear only in explicitly authorized Get responses, never create/update/list.

FieldTypeDescription
decision_model_idbytesUUID (16 bytes).
display_namestringNonblank, at most 255 characters after trimming.
descriptionstring
provider_type...m.v1.DecisionModelProviderType
endpoint_urlstringAbsolute HTTP(S) base URL, without query, userinfo or fragment.
api_pathstringRelative inference path appended to the base URL; no query or fragment.
model_identifierstring
credentials...dmem.v1.EndpointAuthentication
configurationgoogle.protobuf.StructValidated provider settings; never capability overrides.
labels...m.v1.DecisionModel.LabelsEntry
versionstring
monitoring_endpointstringOptional HTTP(S) health/metrics URL; empty means unset.
owner_idbytes
capabilities...m.v1.DecisionModelCapabilitiesOUTPUT_ONLY built-in profile, never user overrides.
created_atgoogle.protobuf.Timestamp
updated_atgoogle.protobuf.Timestamp
created_by_idbytes
updated_by_idbytes

DecisionModel.LabelsEntry

FieldTypeDescription
keystring
valuestring

CreateDecisionModelRequest

FieldTypeDescription
display_namestring
descriptionstring
provider_type...m.v1.DecisionModelProviderType
endpoint_urlstring
api_pathstringDefaults to /v1/systemone for Jev/Laya; required for Clef account/model route.
model_identifierstring
credentials...dmem.v1.EndpointAuthenticationInline API key; optional for anonymous Laya.
configurationgoogle.protobuf.Structimage_preview (Jev only), timeout_millis, max_response_bytes.
labels...cisionModelRequest.LabelsEntry
versionstring
monitoring_endpointstring
owner_idbytesDefaults to the authenticated principal.
decision_model_idbytesOptional client UUID; generated when absent.

CreateDecisionModelRequest.LabelsEntry

FieldTypeDescription
keystring
valuestring

GetDecisionModelRequest

FieldTypeDescription
decision_model_idbytes
include_credentialsbool

ListDecisionModelsRequest

FieldTypeDescription
owner_idbytes
provider_type...m.v1.DecisionModelProviderTypeUNSPECIFIED means no provider filter.
label_selectors...elsRequest.LabelSelectorsEntryAND of exact key/value matches.
page_sizeint32Zero defaults to 50; accepted range 1..1000.
page_tokenstring

ListDecisionModelsRequest.LabelSelectorsEntry

FieldTypeDescription
keystring
valuestring

ListDecisionModelsResponse

FieldTypeDescription
decision_modelsgoodmem.v1.DecisionModel
next_page_tokenstring
total_countint64Authorized count with these filters, before the continuation cursor.

DecisionModelsNextPageToken

Opaque, untrusted keyset token; consumers should pass it back unchanged.

FieldTypeDescription
requestor_idbytes
owner_idbytes
provider_type...m.v1.DecisionModelProviderType
label_selectors...tPageToken.LabelSelectorsEntry
page_sizeint32
created_atgoogle.protobuf.Timestamp
decision_model_idbytes

DecisionModelsNextPageToken.LabelSelectorsEntry

FieldTypeDescription
keystring
valuestring

UpdateDecisionModelRequest

FieldTypeDescription
decision_model_idbytes
display_namestring
descriptionstring
endpoint_urlstring
api_pathstring
model_identifierstring
credentials...dmem.v1.EndpointAuthenticationOmission preserves; empty payload is invalid.
configurationgoogle.protobuf.StructFull replacement; {} resets defaults.
versionstring
monitoring_endpointstring
replace_labelsgoodmem.v1.StringMap
merge_labelsgoodmem.v1.StringMap

DeleteDecisionModelRequest

FieldTypeDescription
decision_model_idbytes

DecisionContent

JSON content and recursive containers allow media at any supported position. json_value never denotes a media reference: binary input is explicit and GoodMem does not fetch remote URLs.

FieldTypeDescription
json_valuestringOne complete JSON value encoded as text, preserving numeric precision.
object_valuegoodmem.v1.DecisionObject
array_valuegoodmem.v1.DecisionArray
mediagoodmem.v1.DecisionMedia
textstringLiteral text; preferred for ordinary state/instructions/rubric descriptions.

DecisionObject

FieldTypeDescription
fields....v1.DecisionObject.FieldsEntry

DecisionObject.FieldsEntry

FieldTypeDescription
keystring
valuegoodmem.v1.DecisionContent

DecisionArray

FieldTypeDescription
valuesgoodmem.v1.DecisionContent

DecisionMedia

FieldTypeDescription
kindgoodmem.v1.DecisionMediaKind
mime_typestring
databytesEncoded file bytes; limits apply before base64.

DecisionQuestion

FieldTypeDescription
instructionsgoodmem.v1.DecisionContentClef requires instructions as nonblank text, an object, or an array.
Other providers allow omission; omitted differs from explicitly supplied JSON null.
choice...dmem.v1.DecisionChoiceQuestion
score...odmem.v1.DecisionScoreQuestion
noul...oodmem.v1.DecisionNoulQuestion
boxgoodmem.v1.DecisionBoxQuestion

DecisionChoiceQuestion

FieldTypeDescription
options...ionChoiceQuestion.OptionsEntry

DecisionChoiceQuestion.OptionsEntry

FieldTypeDescription
keystring
valuegoodmem.v1.DecisionContent

DecisionScoreQuestion

FieldTypeDescription
levelsgoodmem.v1.DecisionContent

DecisionNoulQuestion

FieldTypeDescription
true_criteriongoodmem.v1.DecisionContent
false_criteriongoodmem.v1.DecisionContent

DecisionBoxQuestion

DecisionRequest

FieldTypeDescription
decision_model_idbytes
stategoodmem.v1.DecisionContent
attachmentsgoodmem.v1.DecisionMedia
questions...DecisionRequest.QuestionsEntry

DecisionRequest.QuestionsEntry

FieldTypeDescription
keystring
valuegoodmem.v1.DecisionQuestion

DecisionChoiceAnswer

FieldTypeDescription
choicestring
probabilities...hoiceAnswer.ProbabilitiesEntry
confidencedouble
confidence_meaning...m.v1.DecisionConfidenceMeaning

DecisionChoiceAnswer.ProbabilitiesEntry

FieldTypeDescription
keystring
valuedouble

DecisionScoreAnswer

FieldTypeDescription
scoredoubleFractional zero-based rubric level; not a percentage.
probabilities...ScoreAnswer.ProbabilitiesEntry
levelsgoodmem.v1.DecisionContentOriginal caller rubric, including structured/media content.
confidencedouble
confidence_meaning...m.v1.DecisionConfidenceMeaning

DecisionScoreAnswer.ProbabilitiesEntry

FieldTypeDescription
keyint32
valuedouble

DecisionNoulAnswer

FieldTypeDescription
probability_truedouble

DecisionBoxAnswer

FieldTypeDescription
leftdoubleNormalized edges; a returned box does not prove the target exists.
topdouble
rightdouble
bottomdouble
confidencedouble

DecisionAnswer

FieldTypeDescription
choice...oodmem.v1.DecisionChoiceAnswer
scoregoodmem.v1.DecisionScoreAnswer
noulgoodmem.v1.DecisionNoulAnswer
boxgoodmem.v1.DecisionBoxAnswer

DecisionUsage

FieldTypeDescription
input_tokensint64Omitted is unknown, distinct from reported zero.
output_tokensint64

DecisionResponse

FieldTypeDescription
modelstringProvider-reported model identifier.
answers....DecisionResponse.AnswersEntry
usagegoodmem.v1.DecisionUsage

DecisionResponse.AnswersEntry

FieldTypeDescription
keystring
valuegoodmem.v1.DecisionAnswer

DecisionModelCapabilities

Built-in capability metadata. Missing limits are unknown, never unlimited; context-bound limits are listed separately. Providers may impose stricter deployment limits.

FieldTypeDescription
question_types...oodmem.v1.DecisionQuestionType
media...oodmem.v1.DecisionMediaSupport
limitsgoodmem.v1.DecisionLimit
context_bound_limitsgoodmem.v1.DecisionLimitType
semantics...m.v1.DecisionQuestionSemantics
input_overflow...odmem.v1.DecisionInputOverflow

DecisionLimit

FieldTypeDescription
typegoodmem.v1.DecisionLimitType
valueint64

DecisionMediaLimit

FieldTypeDescription
type...dmem.v1.DecisionMediaLimitType
valueint64

DecisionMediaSupport

FieldTypeDescription
kindgoodmem.v1.DecisionMediaKind
mime_typesstring
placementsgoodmem.v1.DecisionPlacement
limitsgoodmem.v1.DecisionMediaLimit

DecisionQuestionSemantics

FieldTypeDescription
question_type...oodmem.v1.DecisionQuestionType
confidence...m.v1.DecisionConfidenceMeaning
output...odmem.v1.DecisionOutputMeaning

Enums

DecisionModelProviderType

Decision protocols. A provider's supported questions and media depend on its model profile.

NameValueDescription
DECISION_MODEL_PROVIDER_TYPE_UNSPECIFIED0
DECISION_MODEL_PROVIDER_TYPE_JEV1
DECISION_MODEL_PROVIDER_TYPE_LAYA2
DECISION_MODEL_PROVIDER_TYPE_CLEF3

DecisionMediaKind

NameValueDescription
DECISION_MEDIA_KIND_UNSPECIFIED0
DECISION_MEDIA_KIND_IMAGE1
DECISION_MEDIA_KIND_AUDIO2
DECISION_MEDIA_KIND_VIDEO3

DecisionConfidenceMeaning

Confidence is provider-specific and is not a calibrated probability of correctness.

NameValueDescription
DECISION_CONFIDENCE_MEANING_UNSPECIFIED0
DECISION_CONFIDENCE_MEANING_ADJUSTED_TOP_PROBABILITY1
DECISION_CONFIDENCE_MEANING_NORMALIZED_ENTROPY_COMPLEMENT2
DECISION_CONFIDENCE_MEANING_TOP_PROBABILITY3
DECISION_CONFIDENCE_MEANING_ORDERED_MEAN_ABSOLUTE_DEVIATION4
DECISION_CONFIDENCE_MEANING_PROVIDER_DEFINED5
DECISION_CONFIDENCE_MEANING_NOT_REPORTED6

DecisionQuestionType

NameValueDescription
DECISION_QUESTION_TYPE_UNSPECIFIED0
DECISION_QUESTION_TYPE_CHOICE1
DECISION_QUESTION_TYPE_SCORE2
DECISION_QUESTION_TYPE_NOUL3
DECISION_QUESTION_TYPE_BOX4

DecisionPlacement

NameValueDescription
DECISION_PLACEMENT_UNSPECIFIED0
DECISION_PLACEMENT_ATTACHMENT1
DECISION_PLACEMENT_STATE2
DECISION_PLACEMENT_INSTRUCTIONS3
DECISION_PLACEMENT_CRITERIA4

DecisionLimitType

NameValueDescription
DECISION_LIMIT_TYPE_UNSPECIFIED0
DECISION_LIMIT_TYPE_MAX_QUESTIONS1
DECISION_LIMIT_TYPE_MIN_CHOICES2
DECISION_LIMIT_TYPE_MAX_CHOICES3
DECISION_LIMIT_TYPE_MIN_SCORE_LEVELS4
DECISION_LIMIT_TYPE_MAX_SCORE_LEVELS5
DECISION_LIMIT_TYPE_MAX_TOTAL_OPTIONS6
DECISION_LIMIT_TYPE_MAX_STATE_CHARACTERS7
DECISION_LIMIT_TYPE_MAX_BODY_BYTES8
DECISION_LIMIT_TYPE_MAX_CONTENT_DEPTH9
DECISION_LIMIT_TYPE_MAX_INPUT_TOKENS10
DECISION_LIMIT_TYPE_MAX_QUESTION_ID_CHARACTERS11
DECISION_LIMIT_TYPE_MAX_AUDIO_VIDEO_BYTES12

DecisionMediaLimitType

NameValueDescription
DECISION_MEDIA_LIMIT_TYPE_UNSPECIFIED0
DECISION_MEDIA_LIMIT_TYPE_MAX_ITEMS1
DECISION_MEDIA_LIMIT_TYPE_MAX_ITEM_BYTES2
DECISION_MEDIA_LIMIT_TYPE_MAX_TOTAL_BYTES3
DECISION_MEDIA_LIMIT_TYPE_MAX_PIXELS4
DECISION_MEDIA_LIMIT_TYPE_MIN_WIDTH5
DECISION_MEDIA_LIMIT_TYPE_MAX_WIDTH6
DECISION_MEDIA_LIMIT_TYPE_MIN_HEIGHT7
DECISION_MEDIA_LIMIT_TYPE_MAX_HEIGHT8
DECISION_MEDIA_LIMIT_TYPE_MIN_PIXELS9
DECISION_MEDIA_LIMIT_TYPE_MAX_DURATION_MILLIS10

DecisionOutputMeaning

NameValueDescription
DECISION_OUTPUT_MEANING_UNSPECIFIED0
DECISION_OUTPUT_MEANING_CANDIDATE_IDENTIFIER1
DECISION_OUTPUT_MEANING_EXPECTED_ZERO_BASED_LEVEL2
DECISION_OUTPUT_MEANING_PROBABILITY_TRUE3
DECISION_OUTPUT_MEANING_NORMALIZED_EDGES_NO_ABSENCE_SENTINEL4

DecisionInputOverflow

NameValueDescription
DECISION_INPUT_OVERFLOW_UNSPECIFIED0
DECISION_INPUT_OVERFLOW_REJECTS1
DECISION_INPUT_OVERFLOW_TRUNCATES_STATE2
DECISION_INPUT_OVERFLOW_TRUNCATES_STATE_AND_OPTIONS3