yunfengzhou-hub commented on code in PR #1271:
URL: https://github.com/apache/flink-agents/pull/1271#discussion_r4306449287
##########
docs/content/docs/get-started/quickstart/_index.md:
##########
@@ -2,6 +2,7 @@
title: Quickstart
bold: true
bookCollapseSection: true
+type: docs
Review Comment:
Added in cd4ec724 as an alias on the Quickstart index. Hugo emits the
meta-refresh redirect; verified in a local build.
##########
docs/content/docs/get-started/setup.md:
##########
@@ -181,12 +219,29 @@ This script will:
**Note:** If you activated a virtual environment earlier, the Python package
will be installed into that virtual environment. Otherwise, it will be
installed into your system Python environment.
Review Comment:
Fixed in cd4ec724. The bullet and the note now say `python/.venv`, with `pip
install python/dist/flink_agents-*.whl` for your own environment. From Source
also points at the `pkg_resources` warning now.
##########
docs/content/docs/get-started/quickstart/_index.md:
##########
@@ -23,6 +24,84 @@ specific language governing permissions and limitations
under the License.
-->
-- [Build an Agent]({{< ref "docs/get-started/quickstart/create-agent" >}})
+Each Quickstart below is a complete, runnable Flink job. All three read the
same stream
+of product reviews and call the same local Ollama model, so the preparation is
shared and
+collected in [Before You Begin](#before-you-begin). They differ only in how
you declare
+the Agent.
+
+- [Build an Agent]({{< ref "docs/get-started/quickstart/create-agent" >}})
declares Actions
+ and Events in Python or Java code, and wires a prompt, a chat model, and a
tool together.
+ Start here if you are new to Flink Agents.
- [Use the Built-in ReAct Agent]({{< ref
"docs/get-started/quickstart/react_agent" >}})
-- [Define an Agent with YAML]({{< ref "docs/get-started/quickstart/yaml_agent"
>}})
+ configures the built-in `ReActAgent` with a prompt, tools, and an output
schema, and lets
+ the model plan the steps.
+- [Define an Agent with YAML]({{< ref "docs/get-started/quickstart/yaml_agent"
>}}) declares
+ the same wiring in one YAML file and loads it into the environment by Agent
name.
+
+## Before You Begin
+
+### Install Flink and Flink Agents
+
+Follow [Setup]({{< ref "docs/get-started/setup" >}}). Note which job type you
installed
+for, because every submit command below is shown for both types. A PyFlink job
submits with
+`flink run -py`, and a Java Flink job submits with `flink run -c`.
+
+### Get the Example Source
+
+The Quickstarts submit the example programs that ship with the repository, so
you need
+them locally. Clone the repository:
+
+```bash
+git clone https://github.com/apache/flink-agents.git
+cd flink-agents
+```
+
+For a PyFlink job, the same examples are installed inside the `flink_agents`
package, at
+`python/flink_agents/examples/quickstart` in that tree. Each Quickstart gives
both submit
+commands.
+
+A Java Quickstart needs the examples JAR, which the repository build produces.
Build from
+source with `./tools/build.sh`, then use
`examples/target/flink-agents-examples-*.jar`.
+
+### Prepare a Model Server
+
+The examples call a local Ollama server, so install Ollama from the official
+[website](https://ollama.com/download) at version **0.9.0** or higher, and
pull the model
+the Quickstarts use:
+
+```bash
+ollama pull qwen3:8b
+```
+
+Leave the server running. The examples connect to `http://localhost:11434`,
which is the
+default endpoint of the Ollama chat model connection.
+
+### Start a Local Flink Cluster
+
+{{< tabs "Start a Local Flink Cluster" >}}
+
+{{< tab "Python" >}}
+```bash
+# Required: lets the Flink JVM locate the flink-agents package
+export PYTHONPATH=$(python -c 'import sysconfig;
print(sysconfig.get_paths()["purelib"])')
+
+$FLINK_HOME/bin/start-cluster.sh
+```
+{{< /tab >}}
+
+{{< tab "Java" >}}
+```bash
+$FLINK_HOME/bin/start-cluster.sh
+```
+{{< /tab >}}
+
+{{< /tabs >}}
+
+The web UI is at [localhost:8081](http://localhost:8081). If it does not open,
check
+`$FLINK_HOME/log`. A port conflict is fixed in `$FLINK_HOME/conf/config.yaml`.
+
+A Java job that waits inside an Action needs a JVM option on some JDK
versions, so set it
+before you start the cluster. See
+[JDK and Scheduling Requirements]({{< ref
"docs/development/create-agent/actions#jdk-and-scheduling-requirements" >}}).
Review Comment:
Fixed in cd4ec724. The option is in Before You Begin now, with the config
key and the note that both the Python and the Java Quickstarts need it.
Confirmed against the java21 `ContinuationActionExecutor` (static
`ContinuationScope`) and the unconditional `isContinuationSupported()` call in
`ActionExecutionOperator.open()`.
--
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]