Agent enhancements and configuration updates#550
Conversation
release: v7.7.1 — wire Supabase config dialog in WME frontend
release: v7.8.0 — agent reasoning state support + multi-LLM configuration
- json_to_buml/agent_diagram_processor.py: replace first-match-wins body
builder with per-element action dispatch; read "actions"/"fallbackActions"
keys (falls back to legacy "bodies"/"fallbackBodies"); dispatch each element
by "actionType" (falls back to "replyType"); route stateType="reasoning" to
new_reasoning_state(); respect fallbackBodyEnabled flag; fix CustomCodeAction
single-quote escaping bug
- buml_to_json/agent_diagram_converter.py: emit one element per action with
"actionType" = metamodel subclass name; write both new "actions" keys and
legacy "bodies" aliases; emit stateType, fallbackBodyEnabled, and
reasoning-state fields on state elements
- agent_model_builder.py: replace first-action-wins body sections with full
per-action isinstance dispatch (LLMReply / RAGReply / DBReply / AgentReply /
CustomCodeAction); same fix for fallback body
- baf_agent_template.py.j2: loop all body actions with per-action type
dispatch; fix has_db_reply_state flag scan to iterate all actions (not just
actions[0]); replace indirect custom-code routing with explicit
CustomCodeAction check; store extracted function name so set_body() /
set_fallback_body() use the real user-defined function name instead of the
auto-generated alias (fixes NameError when annotation uses quoted types);
add "# Action N" comment before each action
- baf_generator.py: add extract_function_name() helper registered as Jinja2
global
release: v7.8.1 — project BUML file import without section headers
release: v7.8.2 — state-machine validation errors reach the user
… Options, Location, File, Image, DataFrame, and Plotly
release: v7.8.3 — agent transition normalization + variant edit persistence
|
Thanks for this — the converter symmetry across all the new action types is really solid. One thing before merge: have you tested generating a full web-app with an agent end-to-end (and ideally a deploy) on this branch? A few of the changes here only surface at generate/deploy time rather than in unit tests, so I'd like to confirm they hold up:
If you've already run a web-app-with-agent generation + deployment and it works, great — just confirm and I think we're in good shape after the smaller fixes. If not, could you give that a spin? That's the path most likely to catch anything the tests don't. |
|
A few things I'd want sorted before this goes in:
The WebSocket File/Image/Dataframe/Plotly replies generate broken code. They emit
Mixed bodies silently drop actions — if a body has a CustomCodeAction plus anything else, only the custom one survives. Old code had the same limit, but now that the loop handles multiple actions everywhere else it's an odd gap. Worth either rejecting mixed bodies or rendering all of them. Last thing, more of a question than a blocker: the new actions ( |
This pull request introduces several new action classes to support more flexible agent replies, enhances RAG (Retrieval-Augmented Generation) configuration, and improves code generation for agent assets. The changes expand the agent's ability to interact via LLM chat, web crawling, and various WebSocket reply types, while also making the agent generator more extensible and customizable.
New Action Classes and Reply Types:
LLMChatReply, enabling chat-style LLM replies with optional system prompts and LLM selection.WebCrawlLLMReplyfor crawling websites and querying LLMs with the crawled content, including extensive configuration options.WebSocketReplyMarkdown,WebSocketReplyHTML,WebSocketReplySpeech,WebSocketReplyOptions,WebSocketReplyLocation,WebSocketReplyFile,WebSocketReplyImage,WebSocketReplyDataframe, andWebSocketReplyPlotly, covering a wide range of reply modalities.RAG Configuration and Agent API Enhancements:
RAGclass andAgent'snew_ragmethod to support an optionalllm_promptparameter for injecting prefix instructions before each RAG prompt. [1] [2] [3] [4] [5]LLMReplyand the newLLMChatReplyfor validation.Agent Generator Improvements:
tools.pyfile for tool functions, and creates askills/directory with one Markdown file per skill. [1] [2] [3]crawl_websitewhen needed and sets up the agent's working directory. [1] [2]Other Notable Changes:
CustomCodeActionclass to dedent source code only when provided as a string, and to handle cases where neither source nor callable is given.use_ui=Falseby default.These changes collectively make the agent framework more modular, extensible, and ready for richer multi-modal interactions and code generation workflows.