Skip to main content
POST
Create Knowledge Base

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

deploy
boolean
default:true

Body

application/json

Request body for POST /knowledge-bases/config — create a knowledge base pipeline.

name
string
required

Knowledge base display name

Required string length: 1 - 200
source
KBSourceConfig · object
required

Kafka 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 --topicMatcherRegex CLI 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.

embedding
KBEmbeddingConfig · object
required

Embedding-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.

vectorStore
KBVectorStoreConfig · object
required

Vector 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).

description
string | null

Human-readable context

Maximum string length: 500
text
KBTextConfig · object

Text template configuration

processing
KBProcessingConfig · object

Processing configuration for the knowledge base pipeline.

Response

Successful Response

Response model for knowledge base entities. Mirrors FlinkJobResponse shape.

_id
string
required
name
string
required
job_type
enum<string>
required
Available options:
pyflink,
jar,
agent_config,
knowledge_base
status
enum<string>
required
Available options:
CREATED,
DEPLOYING,
RUNNING,
CANCELLING,
CANCELLED,
FAILED,
FINISHED
desired_status
enum<string> | null
Available options:
CREATED,
DEPLOYING,
RUNNING,
CANCELLING,
CANCELLED,
FAILED,
FINISHED
parallelism
integer
default:1
error_message
string | null
agent_config
Agent Config · object | null

KB config (secrets masked)

created_by
string | null
created_timestamp
string<date-time> | null
updated_timestamp
string<date-time> | null