wzhero1 opened a new pull request, #802:
URL: https://github.com/apache/flink-agents/pull/802
Linked issue: #778
### Purpose of change
Doc-quality follow-ups for `docs/content/docs/development/react_agent.md`,
found during react_agent doc verification (#741):
- **Overview**: add the missing trailing period.
- **Self-contained snippets**: add a top-of-page pointer to the runnable
example (ReAct Agent Quickstart + `react_agent_example.py` /
`ReActAgentExample.java`) and a consolidated imports block, so every symbol
used in the snippets is resolvable.
- **Tool prerequisite**: note that tools referenced in `tools=[...]` must be
registered on the `AgentsExecutionEnvironment` first (with `add_resource` /
`addResource` examples), linking to the Tool Use registration guide.
- **Prompt structure**: reword the hard "must contain two messages" rule
into a recommended pattern; the SYSTEM message is optional and the schema
instruction is prepended automatically when it is absent.
- **Placeholder substitution**: document how USER-message placeholder names
are derived from the input element (primitive → `{input}`; `Row` → field names;
`dict`/`Map` → keys; `BaseModel`/Pojo → object fields).
- **Output schema**: clarify as `BaseModel` (Python) / Pojo class (Java) /
`RowTypeInfo` (both), since `BaseModel` is Python-only.
### Tests
Documentation-only change; no runtime impact. Verified manually:
- All six issue claims checked against source (`ReActAgent.start_action` in
Python and Java, `Prompt.format_messages`, `find_first_system_message`).
- Python imports in the new imports block were run-checked in the venv; Java
imports were harvested from the actual example/source files.
- Hugo shortcodes are balanced (tabs/tab/hint), all tab-group ids are
unique, and both `{{< ref >}}` targets resolve.
### API
No public API changes.
### Documentation
- [ ] `doc-needed`
- [ ] `doc-not-needed`
- [x] `doc-included`
Closes #778
--
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]