Show agent name + version on Agent Executor block
The agent name is shown in place of the block title when an Agent Executor block is first placed, but when you save and reload the page, it just shows "Agent Executor".
@Pwuts i would like to work on this please assign this to me
@aryash45 of course, go ahead! :) Thanks in advance!
Investigate how the block title is stored—likely in local or persistent state.
@Pwuts I would like to work on this please assign this to me
@sowndappan5 please coordinate with @aryash45, or feel free to submit your own PR at risk of doing duplicate work
Hi @sowndappan5 I would Love If you collaborate with me as I am a beginner I am having trouble locating the exact code file it would be great if you help me
Hi @aryash45 Happy to collaborate with you.
There is AgentExecutorBlock Definition: agent_name: Optional[str] = SchemaField( default=None, description="Name to display in the Builder UI" ) But It’s Not Used Anywhere.
When the Agent Executor block is first placed: The frontend might receive agent_name from the initial block config or user input. It displays that name in place of the block title. But after saving and reloading: The backend doesn’t persist agent_name in the block’s output or metadata. The frontend rehydrates the block from saved graph state, finds no agent_name, and defaults to "Agent Executor".
Find how to solve this @aryash45
sure @sowndappan5
Hi @sowndappan5,
Thanks for the great insight! Your analysis was amazing—the issue is definitely that the agent_name is defined in the schema but isn't being persisted and rehydrated correctly.
Based on your suggestion, I've come with a solution that should resolve this.
It looks like a two-part fix is needed:
Backend: Modifying the AgentExecutorBlock's Python logic to read the agent_name from the incoming graph data and properly include it in the block's state that gets saved.
Frontend: Update the React component to do two things:
Ensure the agent_name is included in the JSON payload when a user saves the workflow.
Use the agent_name from the props to set the block's title when the page reloads, with a fallback to the default "Agent Executor" if it's not present.
This should ensure the block's title is consistent before and after a save/reload.
Let me know if this approach sounds good to you!
Hi @aryash45
Sorry for the late reply. We should do two things. In backend -> autogpt_platform/backend/backend/blocks/agent.py -> AgentExecutorBlock -> We should add a serialize() method to get the agent name. In frontend -> The file which handles rendering of block nodes and their titles -> We should add a deserialize() method to fetch the agent name.
ok lets do it and see what happens
@sowndappan5 hi any update ?
I'm unassigning this issue because I don't see any progress. Feel free to submit a PR anyway but this way others aren't blocked to work on it. :)