Create Knowledge Base
Create a knowledge base pipeline, optionally deploying it.
Set deploy=false to save as draft without deploying to Flink.
/knowledge-bases/configAuthorizationBearer token · headerrequireddeploybooleanapplication/jsonnamestringrequiredKnowledge base display name
descriptionstring | nullHuman-readable context
Show propertiesHide properties
stringnullsourceKBSourceConfigrequiredKafka source configuration for the knowledge base pipeline.
Exactly one of topic or topicPattern must be set:
topic— exact Kafka topic name (the FE wizard's single-topic picker emits this). The service layer composes^re.escape(topic)$for the Java--topicMatcherRegexCLI arg, so the Java side keeps the regex-only contract.topicPattern— escape hatch for tenants who genuinely need a multi-topic regex (e.g. fan-in of a sharded topic family). Not exposed by the FE wizard today — programmatic API callers only.
The XOR rule is enforced by _topic_xor below: empty payload
(neither set) and over-specified payload (both set) both 422.
Show propertiesHide properties
topicstring | nullExact Kafka topic name (Kafka's own limit is 249). Mutually exclusive with topicPattern. The deploy-time builder turns this into ^re.escape(topic)$ for the Java runtime.
Show propertiesHide properties
stringnulltopicPatternstring | nullRegex pattern for input topics, e.g. ^source_.*\.orders$. Mutually exclusive with topic — set this only for programmatic multi-topic fan-in.
Show propertiesHide properties
stringnullinputSerializationAgentSerializationEnumInput deserialization format
JsonConfluentAvroConfluentfieldsstring[] | nullColumn-level filter — only these fields processed
Show propertiesHide properties
stringstringnulltextFieldsstring[] | nullFields to include in the embedded text (if not using textTemplate)
Show propertiesHide properties
stringstringnullmetadataFieldsstring[] | nullFields to store as vector metadata (filterable at query time)
Show propertiesHide properties
stringstringnulltextKBTextConfigText template configuration for composing the embedding input from record fields.
Show propertiesHide properties
textTemplatestringTemplate with ${field} placeholders, e.g. 'Customer ${customer_id} ordered ${product}'
embeddingKBEmbeddingConfigrequiredEmbedding-side configuration for a knowledge base.
Carries a reference to a saved AgentLlmConnection plus optional
per-KB overrides of the connection's defaults. Credentials, provider,
and the default model live on the connection — there is no inline
apiKey / baseUrl path on a KB. The deploy-time resolver
(resolve_kb_connections) reads the referenced connection's
embedding defaults block, applies any per-KB overrides, and stamps
the resulting bundle into the Flink CLI JSON.
The referenced connection must carry 'embedding' in its
capabilities list and have a non-empty embedding.model — the
validator inside resolve_saved_embedding_credentials raises 422 at
deploy time otherwise so the FE error surfaces the cause without
waiting for a Java runtime 4xx.
Show propertiesHide properties
embeddingConnectionIdstringrequiredReference to a saved AgentLlmConnection. The connection must advertise the 'embedding' capability.
modelstring | nullPer-KB embedding-model override. None = use the connection's default embedding model (embedding.model on the saved row).
Show propertiesHide properties
stringnulldimensionsinteger | nullPer-KB dimensions override. None = use the connection's default (embedding.dimensions on the saved row), or the provider default when neither is set.
Show propertiesHide properties
integernullbatchSizeinteger | nullPer-KB batchSize override. None = use the connection's default (embedding.batchSize on the saved row, falls back to 100).
Show propertiesHide properties
integernullvectorStoreKBVectorStoreConfigrequiredVector store configuration for the knowledge base.
References a lightweight AgentVectorStoreConnection by id. The BE
resolves the connection's credentials (apiKey + endpoint) at deploy
time. There is no inline-credentials path — KBs must reference a saved
connection (the FE picker is the only authoring surface).
Show propertiesHide properties
vectorStoreConnectionIdstringrequiredReference to a saved AgentVectorStoreConnection. BE resolves credentials at deploy time.
indexNamestringrequiredIndex or collection name in the vector store
namespacestring | nullNamespace or partition within the index
Show propertiesHide properties
stringnullmetricstringDistance metric
cosinedot_producteuclideanprocessingKBProcessingConfigProcessing configuration for the knowledge base pipeline.
Show propertiesHide properties
parallelismintegerFlink parallelism
checkpointIntervalMinintegerCheckpoint interval in minutes
chunkSizeintegerText chunk size in tokens
chunkOverlapintegerOverlap tokens between chunks
Successful Response
_idstringrequirednamestringrequiredjob_typeapp__models__api__agents_api_models__flink_jobs__FlinkJobTypeEnumrequiredpyflinkjaragent_configknowledge_basestatusFlinkJobStatusEnumrequiredCREATEDDEPLOYINGRUNNINGCANCELLINGCANCELLEDFAILEDFINISHEDdesired_statusFlinkJobStatusEnum | nullShow propertiesHide properties
stringnullflink_job_namestringrequiredflink_job_idstring | nullShow propertiesHide properties
stringnullparallelismintegererror_messagestring | nullShow propertiesHide properties
stringnullagent_configobject | nullKB config (secrets masked)
Show propertiesHide properties
objectnullcreated_bystring | nullShow propertiesHide properties
stringnullcreated_timestampstring<date-time> | nullShow propertiesHide properties
string<date-time>nullupdated_timestampstring<date-time> | nullShow propertiesHide properties
string<date-time>nullValidation Error
detailValidationError[]Show propertiesHide properties
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
string | integerstringintegermsgstringrequiredtypestringrequiredinputanyctxobject