<a id="confluent-intelligence-overview"></a>

# Build AI with Confluent Intelligence in Confluent Cloud

Confluent Intelligence is a suite of capabilities for building agentic
AI workflows with Flink SQL in Confluent Cloud. You can create
streaming agents, serve real-time context to AI agents, run
built-in ML functions, and connect to remote AI models.

<a id="ai-overview-streaming-agents"></a>

## Streaming Agents

![Streaming Agents overview](ai/images/streaming-agents-overview.svg)

Streaming Agents bridge the gap between enterprise data and
AI capabilities. You can create AI agents that run
continuously in Flink SQL, connecting your streaming data
to AI models. With Streaming Agents, you can:

- Access real-time data for AI decision-making.
- Integrate with any tool, model, and data system.
- Enable agents to plan, decide, and act on live operational
  events.

For more information, see
[Streaming Agents](../streaming-agents/overview.md#ai-streaming-agents-overview).

<a id="ai-overview-realtime-context-engine"></a>

## Real-Time Context Engine

![Real-Time Context Engine overview](ai/images/realtime-context-engine.svg)

The Real-Time Context Engine delivers real-time data from your Apache Kafka® topics to
external AI agents through MCP. When you enable the Real-Time Context Engine on
a topic, Confluent Cloud materializes the topic data into a table
optimized for fast lookups. AI agents query the data through
MCP tools without interacting directly with Kafka.

For more information, see
[Real-Time Context Engine](../real-time-context-engine/overview.md#real-time-context-engine).

<a id="ai-overview-ml-functions"></a>

## Built-in machine learning (ML) functions

![Built-in ML functions with Confluent Cloud for
Apache Flink](ai/images/built-in-ml-functions.svg)

Built-in ML functions simplify complex data science tasks into
Flink SQL statements. You can run forecasting, anomaly
detection, sentiment analysis, and PII detection directly in
Flink SQL, with no ML expertise or model building required.

The following functions are available:

- [AI_DETECT_ANOMALIES](../../flink/reference/functions/model-inference-functions.md#flink-sql-ai-detect-anomalies-function):
  Detect anomalies in your data using foundation models.
- [AI_FORECAST](../../flink/reference/functions/model-inference-functions.md#flink-sql-ai-forecast-function):
  Forecast future values in time-series data using foundation
  models.
- [AI_SENTIMENT](../../flink/reference/functions/model-inference-functions.md#flink-sql-ai-sentiment-function):
  Analyze sentiment toward specific aspects in text.
- [ML_DETECT_ANOMALIES](../../flink/reference/functions/model-inference-functions.md#flink-sql-ml-anomaly-detect-function):
  Detect anomalies in your data.
- [ML_EVALUATE](../../flink/reference/functions/model-inference-functions.md#flink-sql-ml-evaluate-function):
  Evaluate the performance of an AI/ML model.
- [ML_FORECAST](../../flink/reference/functions/model-inference-functions.md#flink-sql-ml-forecast-function):
  Forecast trends in your data.
- [ML_PREDICT](../../flink/reference/functions/model-inference-functions.md#flink-sql-ml-predict-function):
  Run a remote AI/ML model for prediction, text generation,
  and classification.

ML preprocessing utility functions are also available:

- [ML_BUCKETIZE](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-bucketize-function),
  [ML_LABEL_ENCODER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-label-encoder-function),
  [ML_ONE_HOT_ENCODER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-one-hot-encoder-function):
  Encode and bucketize columns.
- [ML_MAX_ABS_SCALER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-max-abs-scaler-function),
  [ML_MIN_MAX_SCALER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-min-max-scaler-function),
  [ML_ROBUST_SCALER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-robust-scaler-function),
  [ML_STANDARD_SCALER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-standard-scaler-function),
  [ML_NORMALIZER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-normalizer-function):
  Scale and normalize columns.
- [ML_CHARACTER_TEXT_SPLITTER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-character-text-splitter-function),
  [ML_FILE_FORMAT_TEXT_SPLITTER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-file-format-text-splitter-function),
  [ML_RECURSIVE_TEXT_SPLITTER](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-recursive-text-splitter-function):
  Split text into chunks.
- [ML_NGRAMS](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-ngrams-function):
  Create n-grams.

For more information, see
[Built-in AI/ML Functions](../builtin-functions/overview.md#ai-builtin-functions-overview).

## Supporting technologies

Confluent provides the following technologies for building
AI/ML workflows.

<a id="ai-overview-remote-model-inference"></a>

### Remote model inference

![Remote model inference with Confluent Cloud for
Apache Flink](ai/images/remote-ai-models.svg)

You can run inference with remote AI/ML models in Flink SQL.
Connect to models hosted on OpenAI, AWS Bedrock, AWS
Sagemaker, Google Cloud Vertex AI, and Azure AI Foundry.

For more information, see
[Run a Remote AI Model](../ai-model-inference.md#flink-sql-ai-model).

<a id="ai-overview-external-tables"></a>

### External tables and search

![External tables and search with Confluent Cloud for
Apache Flink](ai/images/external-tables-and-search.svg)

You can enrich data streams with non-Kafka data sources by
using external tables. Join real-time data streams with data
from relational databases, vector databases, and REST APIs to
enable retrieval-augmented generation (RAG) and more accurate
AI decision-making.

For more information, see
[Search External Tables](../external-tables/overview.md#ai-external-tables-overview).

<a id="ai-overview-embedding-support"></a>

### Real-time embedding support

![Real-time embedding support with Confluent Cloud for
Apache Flink](ai/images/real-time-embedding.svg)

You can continuously turn unstructured enterprise data into
vector embeddings to enable RAG and mitigate LLM
hallucinations. Use any embedding model and any vector
database across any cloud.

For more information, see
[Create Embeddings](../embeddings/overview.md#ai-embeddings-overview).

<a id="ai-overview-secure-connections"></a>

### Secure connections

![Secure connections with Confluent Cloud for Apache
Flink](ai/images/secure-connections.svg)

Reusable [connection resources](../../flink/reference/statements/create-connection.md#flink-sql-create-connection)
provide a secure way to integrate with external systems.
You can connect to models, vector databases, and MCP servers
using Flink SQL. Sensitive credentials are stored separately
from connection metadata and are never exposed in catalog
metadata, logs, or configuration files.

For more information, see
[Reuse Connections](../../integrations/connections/overview.md#connections-overview).

<a id="ai-overview-flink-sql-integration"></a>

### Flink SQL integration

Confluent Cloud for Apache Flink provides a Flink SQL interface for creating and
managing model, agent, and tool resources. The SQL interface
is available in Cloud Console and the Flink SQL
shell.

You can use the following SQL statements to create resources:

- [CREATE MODEL](../../flink/reference/statements/create-model.md#flink-sql-create-model)
- [CREATE AGENT](../../flink/reference/statements/create-agent.md#flink-sql-create-agent)
- [CREATE TOOL](../../flink/reference/statements/create-tool.md#flink-sql-create-tool)

The following functions are available for model inference and
agentic AI workflows:

- [AI_TOOL_INVOKE](../../flink/reference/functions/model-inference-functions.md#flink-sql-ai-tool-invoke-function):
  Invoke MCP tools and user-defined functions (UDFs).
- [AI_COMPLETE](../../flink/reference/functions/model-inference-functions.md#flink-sql-ai-complete-function):
  Generate text completions.
- [AI_EMBEDDING](../../flink/reference/functions/model-inference-functions.md#flink-sql-ai-embedding-function):
  Create embeddings.
- [ML_PREDICT](../../flink/reference/functions/model-inference-functions.md#flink-sql-ml-predict-function):
  Run an AI/ML model for prediction, text generation, and
  classification.

For more information, see
[Run an AI Model](../ai-model-inference.md#flink-sql-ai-model).

<a id="ai-model-inference-rbac"></a>

## RBAC for model inference

The following table shows the model actions that are available
for different RBAC roles.

| Role                 | CREATE MODEL             | Invoke model for prediction   | List/Describe Models     | DROP MODEL               | Grant permissions on models   |
|----------------------|--------------------------|-------------------------------|--------------------------|--------------------------|-------------------------------|
| OrganizationAdmin    | Yes                      | Yes                           | Yes                      | Yes                      | Yes                           |
| EnvironmentAdmin     | Yes                      | Yes                           | Yes                      | Yes                      | Yes                           |
| CloudClusterAdmin    | Yes <sup>[1](#id6)</sup> | Yes <sup>[1](#id6)</sup>      | Yes <sup>[1](#id6)</sup> | Yes <sup>[1](#id6)</sup> | Yes <sup>[1](#id6)</sup>      |
| ModelDeveloperManage | Yes                      | No                            | Yes                      | Yes                      | No                            |
| ModelDeveloperRead   | No                       | Yes                           | Yes                      | No                       | No                            |
| ModelDeveloperWrite  | Yes                      | Yes                           | Yes                      | No                       | No                            |
| ModelResourceOwner   | Yes                      | Yes                           | Yes                      | Yes                      | Yes                           |
* <a id='id6'>**[1]**</a> For their own cluster only.

## Next steps

- [Run an AI Model](../ai-model-inference.md#flink-sql-ai-model)
- [Create Embeddings](../embeddings/overview.md#ai-embeddings-overview)
- [Search External Tables](../external-tables/overview.md#ai-external-tables-overview)
- [Build with Streaming Agents](../streaming-agents/overview.md#ai-streaming-agents-overview)
- [Use AI Tools with Confluent Cloud](../ai-tools/overview.md#ai-tools-overview)

## Related content

- [AI Model Inference Functions](../../flink/reference/functions/model-inference-functions.md#flink-sql-model-inference-functions)
- [ML Preprocessing Functions](../../flink/reference/functions/ml-preprocessing-functions.md#flink-sql-ml-preprocessing-functions)
- [Search over External Tables](../external-tables/overview.md#ai-external-tables-overview)

#### NOTE
This website includes content developed at the [Apache Software Foundation](https://www.apache.org/)
under the terms of the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0.html).
