- Issue created by @balintbrews
- 🇮🇳India Akhil Babu Chengannur
akhil babu → made their first commit to this issue’s fork.
- @akhil-babu opened merge request.
- 🇮🇳India Akhil Babu Chengannur
The agent uses the ai_agent_get_js_component tool to load existing components. However, it was using the component’s name directly, and if that name contained uppercase letters, the tool returned null because component IDs are always lowercase.
It's working now.
- 🇮🇳India narendraR Jaipur, India
These changes look good and are harmless, but I’m not sure why this issue occurs in the first place for OpenAI. The
selected_component
(as machineName) is already passed as context to the agent, so the agent should use the correct machine name from the context.Perhaps we should consider updating the
system_prompt
forai_agents.ai_agent.experience_builder_component_agent.yml
(Case: The tools you have to use for editing components are:) to ensure the provided context is explicitly taken into account. - 🇮🇳India Akhil Babu Chengannur
Yes, we could update the prompt and give explicit instructions to use the selected_component value for loading the component.
Currently, there’s no way for the agent to understand the ID of the code component. For example, I created a 'PieChartComponent' and asked the agent to modify it. In that case, the instruction given by the orchestrator agent to the code component builder agent was:
Task Title: Task Author: Task Description: Change the text color of the PieChartComponent to yellow. Make sure to update the Tailwind CSS classes accordingly in the component's code to reflect this change. --------------------------
So the model called the tool like this:
Tool: ai_agent_get_js_component component_name: PieChartComponent
We could try using the [xb_ai:selected_component] token in the code component generator agent as well.
That said, I’d still recommend keeping the code changes, as they help ensure nothing breaks even if the model hallucinates and uses the wrong ID.