weiqingy commented on code in PR #888: URL: https://github.com/apache/flink-web/pull/888#discussion_r4396995366
########## docs/content/posts/2026-10-30-release-flink-agents-0.4.0.md: ########## @@ -0,0 +1,153 @@ +--- +title: "Apache Flink Agents 0.4.0 Release Announcement" +date: "2026-10-30T00:00:00.000Z" +authors: +- wenjin: + name: "Wenjin Xie" +aliases: +- /news/2026/10/30/release-flink-agents-0.4.0.html +--- + +The Apache Flink community is excited to announce the release of Apache Flink Agents 0.4.0. + +Apache Flink Agents brings AI agents into Flink streaming pipelines. Applications can continuously respond to real-time events, combine AI processing with business logic, and use Flink for distributed execution and fault recovery. + +Shaped by feedback from early production adopters and advances in the agent ecosystem, Flink Agents 0.4 marks the final planned step toward a production-ready 1.0 release for streaming agent applications. It expands agent capabilities with sub-agents and Decision Models, refines APIs to simplify application development, and strengthens observability to make agent behavior easier to understand and diagnose. + +Flink Agents 0.4 remains a preview release, with APIs and configuration options still evolving. If you are upgrading from 0.3, please review the Breaking Changes below. + +## What's New in 0.4? + +### New Agent Primitives and Capabilities + +#### Sub-agents: Delegate Tasks to Specialized Agents + +[**Sub-agents**](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/multi-agent/subagents/) let an agent delegate tasks to other agents in the same Flink job or to integrated external agent services, then continue processing with their results. Applications can delegate explicitly in code or let the model choose a sub-agent. Calls support durable execution, allowing recorded results to be reused during recovery. + +#### Decision Models: Evaluate and Score Against Business Criteria + +**Decision models**, such as TypeSafe's Jev, evaluate application context against defined criteria and return typed decisions as probabilities, choices, or scores. Flink Agents 0.4 introduces a unified [**Decision Model API**](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/decision_models/) supporting TypeSafe, OpenAI, and Alibaba Cloud Model Studio, bringing these capabilities to streaming workflows for tasks such as content classification, satisfaction scoring, and risk assessment. + +#### Model Routing: Choose the Right Model for Each Request + +[**Model Routing**](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/model_routing/) dynamically selects a model for each request from a set of candidates, using rule-based matching, an LLM judge, or custom routing logic. For example, an application can use a lightweight model for routine requests and a more capable model for complex tasks. Model Routing is currently available through the Java programmatic API. + +#### Multimodal Input: Work with Text, Images, Audio, and Documents + +New [**multimodal messages**](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/chat/#message-content-blocks) can combine text, images, audio, and documents in a single message, enabling agents to analyze problems with visual context or extract information from documents. + +#### Structured Output: Make Results Ready for Application Code + +Version 0.4 expands [**native structured output**](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/structured-output/) support across major model providers. Models can return classifications, extracted fields, and other data in an application-defined schema for direct use in business logic. + +### Agent Build and Execution Enhancements + +#### ctx.chat: Call Models Directly from Application Code + +The new [`ctx.chat`](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/chat/#using-ctx-chat) API combines model calls and subsequent business logic in a single Action, without splitting request and response handling across two Actions. The framework executes configured tools requested by the model and returns the final result, with support for retries and structured output. With durable execution enabled, recorded responses can be reused during recovery. + +#### Conditional Triggers: Select Processing Steps by Event Content + +Previously, Actions were triggered by Event type alone. Version 0.4 adds [conditions on Event fields](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/create-agent/actions/#trigger-conditions) for finer control, such as running extra checks only when a transaction exceeds a threshold or escalating only severe alerts. + +#### Tool Parameter Injection + +[**Tool parameter injection**](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/tool_use/#tool-parameter-injection) lets users supply known arguments for tool calls instead of having the model generate them. Tools that depend on application configuration or runtime context can receive those values through injection, leaving the model to generate the arguments that require reasoning. + +#### Asynchronous Execution: Support for More JDK Versions + +Flink Agents already supported asynchronous execution in Python and in Java on JDK 21. Version 0.4 extends [Java asynchronous execution to JDK 11 and 17](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/create-agent/actions/#jdk-and-scheduling-requirements). + +### Improved Observability + +#### Trace Log: Follow Agent Execution + +[Trace Log](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/operations/monitoring/#trace-log) extends 0.3's Event Log to capture execution steps, model, tool, and sub-agent calls, and their lineage—linking events, steps, and calls to show how an input produces a result. Users can configure recording scope and detail, and use a companion tool to visualize event lineage as a tree. + +#### Richer Built-in Metrics + +Version 0.4 adds [metrics](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/operations/monitoring/#built-in-metrics) for input processing successes and failures, backlog, queueing and execution latency, and calls to models, tools, and other components. These metrics integrate with existing Flink monitoring, helping users detect failures or latency issues and investigate them with Trace Log. + +### Development Tools and Integrations + +#### Build Applications with Coding Agents + +The new [`flink-agents-dev` Skill](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/coding-agent-skill/) gives coding agents guidance specific to Flink Agents to help create, modify, and validate applications. Install it with: + +```bash +npx skills add 'apache/flink-agents#release-0.4@flink-agents-dev' +``` + +#### More Model Integrations and Flink Version Support + +This release adds: + +- **Chat Models:** [Google Gemini](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/chat-models/providers/#gemini) for Java, and [vLLM](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/chat-models/providers/#vllm) and [IBM watsonx.ai](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/calling-llms/chat-models/providers/#watsonx-ibm-watsonxai) for Java and Python. +- **Embedding Models:** [OpenAI embeddings](https://nightlies.apache.org/flink/flink-agents-docs-release-0.4/docs/development/vector-search/embedding_models/providers/#openai) for Java. +- **Flink versions:** A distribution for Flink 2.3. Review Comment: Flink 2.3 isn't new in 0.4. The distribution shipped in 0.3.1 (apache/flink-agents#856), and the 0.3.1 announcement already lists "Flink 2.3 distribution support", so users upgrading from 0.3.1 already have it. Maybe we can drop this bullet, and the heading on line 81 could become "More Model Integrations". What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
