Version 7.18.0¶
Minor release: live agent simulation in the web editor, and methods implemented by a neural network. The agent live-testing work was contributed by Marcos Gomez (BESSER #587, editor #184, modeling-agent #19) and reviewed and completed by the BESSER team. Methods backed by a neural network close issue #570. Per-end association navigability comes from Iván Alfonso (BESSER #615, editor #200).
The release adds a new deployable service, the agent simulator. See Deployment below before upgrading a hosted instance.
Highlights¶
Simulate an agent without leaving the editor: a new simulation page runs the agent you designed, lets you chat with it, highlights its current state on a read-only copy of the diagram, lists the files it writes and streams its terminal output. The agent is generated with the BAF generator and runs in the new agent simulator service, one sandboxed session per user.
Each simulated agent runs in a sandbox: the simulator starts every session in bubblewrap with its own user, PID, IPC and UTS namespaces, a private
/proc, a read-only filesystem and only its own work directory writable, so a session cannot see another session or the container’s environment. It fails closed when the sandbox cannot start. The simulator runs in its own container with no host port, an explicit environment allowlist, dropped capabilities and resource limits, and every request to it must carryX-Agent-Simulator-Token. Custom Python code actions are refused by default (AGENT_SIMULATOR_RESTRICT_CUSTOM_CODE), sign-in with GitHub is required by default, and each user gets one session at a time.Agent components have their own page: intents, LLMs, RAG databases, SQL databases, tools, skills, workspaces and GUIs are managed on an Agent Components page instead of cluttering the canvas, and the runtime settings (WebSocket, Telegram, A2A, NLP, database, Git, raw YAML) on an Agent Runtime page. Agent diagrams saved before this release are migrated on load, so their components appear on the new page.
Richer agent replies: reply actions can interpolate session variables (
{name}placeholders), store their result in the session (store_in_session) and run without sending anything (send_reply). LLM, RAG and DB replies accept a custom input prompt (input_prompt_mode).GUIReplyActionsends a GUI designed in the editor as a chat reply, andGUIEvent/when_form_submittedreact to what the user does with it.Agent.gui_modelsholdsGUIModelobjects, and the BAF generator writes each one toguis/<id>.py.A method can be implemented by a neural network: next to Python code, BESSER Action Language, state machines and quantum circuits, a method’s implementation can now be a neural network modeled in the same project (
MethodImplementationType.NEURAL_NETWORK,Method.neural_network). The Backend and Web App generators turn such a method into an endpoint that runs the network: they emit the PyTorch module underneural_networks/, ann_runtime.pythat loads each network once, andtorchin the requirements. The endpoint answers503until the trained weights are inneural_networks/weights/.Navigability is set per association end: the class-diagram editor no longer offers Unidirectional and Bidirectional associations. An association has a Navigable checkbox on each end, and the arrowhead points at the navigable end when only one is. At least one end must stay navigable, and the part end of a composition is always navigable;
BinaryAssociationenforces both rules andDomainModel.validate()reports them. Diagrams, templates and assistant output that use the old types are migrated on load, so a former unidirectional association keeps its direction, and BUML to JSON keeps the drawn orientation of one-way associations instead of swapping their ends.The Spring Boot generator works on models without identifiers: a JPA entity needs an
@Id, and the generator used to reject every class without anis_idattribute, which was true of every class diagram template in the editor. A class hierarchy with no identifier now gets an auto-generatedidon its root class; an existing attribute namedidis reused. The input model is not modified.
Fixes¶
Exporting a project that contains an agent produced a file that could not be read: the agent code builder wrote
from __future__ import annotations, which landed in the middle of the project file. It is no longer emitted.Agent text doubled its escapes on every round trip:
sanitize_textescaped quotes and backslashes into the model’s strings, and code emission escaped them again. Escaping now happens once, when code is written. Agents exported by earlier versions may show\'in the editor once.Generated agents with a WebSocket platform lost their UI and created the platform twice:
use_uiis nowFalseonly in test mode, and the platform is created exactly once.Importing the BAF generator on its own failed with a circular import:
from besser.generators.agents.baf_generator import BAFGeneratoras a first import broke every BAF documentation example. The generator no longer imports the web editor backend at module load.The modeling assistant could not connect agent states: the editor read transition endpoints from fields the assistant never sets.
add_transition,remove_transitionandadd_intent_training_phrasenow work, and the assistant uses the database operations BESSER accepts.SVG and PNG export of an agent diagram crashed when a component rendered nothing on the canvas.
Invalid custom agent code returned a 500:
CodeValidationErroris now aValidationErrorand returns a 400 with the lint message.
Behavior changes¶
A
GUIReplyActionwhose GUI is not inAgent.gui_modelsnow fails generation instead of producing an empty placeholder module.LLMReply,RAGReplyandDBReplyvalidateinput_prompt_mode; thecustommode requires a prompt.BinaryAssociationraisesValueErrorwhen neither end is navigable, or when the part end of a composition is not navigable. Models built in Python with those combinations no longer construct; UML allows them, BESSER does not.The class-diagram processor accepts only a boolean
navigableon an end; any other value falls back to the legacy default with a warning.
Deployment¶
The new
besser-wme-agent-simulatorservice is defined in both compose files and built and pushed by the deploy workflow. The backend joins its network (agent_simulator_network).Set
AGENT_SIMULATOR_API_TOKENin the environment of both the backend and the simulator. Without it the simulator refuses every request.The simulator needs
security_opt: seccomp=unconfinedandapparmor=unconfinedfor bubblewrap (already in the compose files); it adds no capabilities. If the host kernel does not allow unprivileged user namespaces, sessions are refused.Deploy the modeling-agent alongside (its
developincludes #19): the assistant now reads and writes the new agent component format.Every configuration variable is documented in Agent Simulator.