Skip to content

ENG-2836 Agent cloning introduced#847

Merged
aix-ahmet merged 5 commits intodevelopmentfrom
ENG-2836
Mar 26, 2026
Merged

ENG-2836 Agent cloning introduced#847
aix-ahmet merged 5 commits intodevelopmentfrom
ENG-2836

Conversation

@kadirpekel
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread aixplain/v2/agent.py Outdated
result.status = AssetStatus.DRAFT
return None

def duplicate(self, clone_subagents: bool = False, name: Optional[str] = None) -> "Agent":
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate() bypasses the hook system -- after_clone is dead code

duplicate() method doesn't use the @with_hooks decorator, so this hook will never fire. Additionally, even if @with_hooks were added, the decorator infers the operation name from the function name -- it would look for before_duplicate / after_duplicate, not after_clone. So either:

  • The method should be named clone() (matching the hook), or
  • The hook should be renamed to after_duplicate, or
  • The hook should be removed if it's not needed.

Comment thread aixplain/v2/agent.py Outdated
Comment thread aixplain/v2/agent.py Outdated
Copy link
Copy Markdown
Collaborator

@aix-ahmet aix-ahmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the comments.

kadirpekel and others added 3 commits March 17, 2026 12:45
@aix-ahmet aix-ahmet merged commit dd3317a into development Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants