Skip to content

Commit ba30739

Browse files
authored
fix: pass display_name when creating agent with identity (#739)
When deploying with --agent-identity, the setup_agent_identity function was only passing identity_type to the initial create call, resulting in agents being created with empty display names. Now includes display_name in the config to ensure the agent is properly named from the start.
1 parent 4998ee0 commit ba30739

File tree

1 file changed

+4
-1
lines changed
  • agent_starter_pack/deployment_targets/agent_engine/python/{{cookiecutter.agent_directory}}/app_utils

1 file changed

+4
-1
lines changed

agent_starter_pack/deployment_targets/agent_engine/python/{{cookiecutter.agent_directory}}/app_utils/deploy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ def setup_agent_identity(client: Any, project: str, display_name: str) -> Any:
164164
"""Create agent with identity and grant required IAM roles."""
165165
click.echo(f"\n🔧 Creating agent identity for: {display_name}")
166166
agent = client.agent_engines.create(
167-
config={"identity_type": IdentityType.AGENT_IDENTITY}
167+
config={
168+
"identity_type": IdentityType.AGENT_IDENTITY,
169+
"display_name": display_name,
170+
}
168171
)
169172

170173
roles = [

0 commit comments

Comments
 (0)