IAV-91/feat: Add parent agent relationship to Agent entity
Summary
This MR adds support for hierarchical agent structures by introducing a parent-child relationship within the Agent entity.
Changes
- Added
parentAgentfield with@ManyToOnerelationship to theAgententity - Configured lazy fetching to optimize query performance
- Enables agents to reference a parent agent for inheritance or delegation patterns
Technical Details
- Self-referential relationship using
@JoinColumn(name = "parent_agent_id") - Foreign key stored in
parent_agent_idcolumn - Fetch type set to
LAZYto prevent unnecessary data loading
Database Impact
- New column:
parent_agent_id(nullable) inagentstable - Foreign key constraint to
agents.id****
Closes IAV-91