AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Show agent name + version on Agent Executor block

Open Pwuts opened this issue 3 months ago • 13 comments

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".

image.png

Pwuts avatar Oct 02 '25 14:10 Pwuts

@Pwuts i would like to work on this please assign this to me

aryash45 avatar Oct 07 '25 04:10 aryash45

@aryash45 of course, go ahead! :) Thanks in advance!

Pwuts avatar Oct 07 '25 12:10 Pwuts

Investigate how the block title is stored—likely in local or persistent state.

sowndappan5 avatar Oct 09 '25 09:10 sowndappan5

@Pwuts I would like to work on this please assign this to me

sowndappan5 avatar Oct 09 '25 09:10 sowndappan5

@sowndappan5 please coordinate with @aryash45, or feel free to submit your own PR at risk of doing duplicate work

Pwuts avatar Oct 09 '25 11:10 Pwuts

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

aryash45 avatar Oct 09 '25 11:10 aryash45

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

sowndappan5 avatar Oct 10 '25 05:10 sowndappan5

sure @sowndappan5

aryash45 avatar Oct 10 '25 07:10 aryash45

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!

aryash45 avatar Oct 10 '25 18:10 aryash45

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.

sowndappan5 avatar Oct 13 '25 01:10 sowndappan5

ok lets do it and see what happens

aryash45 avatar Oct 13 '25 04:10 aryash45

@sowndappan5 hi any update ?

aryash45 avatar Oct 17 '25 17:10 aryash45

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. :)

Pwuts avatar Oct 26 '25 20:10 Pwuts