@@ -155,6 +155,7 @@ def __init__(self,
155155 self ._agentpin : Optional [Any ] = None
156156 self ._metrics_client : Optional [Any ] = None
157157 self ._reasoning : Optional [Any ] = None
158+ self ._toolclad : Optional [Any ] = None
158159
159160 @property
160161 def schedules (self ) -> ScheduleClient :
@@ -194,6 +195,14 @@ def metrics_client(self):
194195 self ._metrics_client = MetricsClient (self )
195196 return self ._metrics_client
196197
198+ @property
199+ def toolclad (self ):
200+ """Lazy-loaded ToolClad manifest management client."""
201+ if self ._toolclad is None :
202+ from .toolclad import ToolCladClient
203+ self ._toolclad = ToolCladClient (self )
204+ return self ._toolclad
205+
197206 def _request (self , method : str , endpoint : str , ** kwargs ):
198207 """Make an HTTP request to the API.
199208
@@ -1437,3 +1446,93 @@ def disable_http_endpoint(self, endpoint_id: str) -> Dict[str, Any]:
14371446 """
14381447 response = self ._request ("POST" , f"endpoints/{ endpoint_id } /disable" )
14391448 return response .json ()
1449+
1450+ # =============================================================================
1451+ # Inter-Agent Communication Policy Methods
1452+ # =============================================================================
1453+
1454+ def list_communication_rules (self ) -> List [Dict ]:
1455+ """List all communication policy rules.
1456+
1457+ Returns:
1458+ List[Dict]: List of communication policy rules
1459+ """
1460+ response = self ._request ("GET" , "api/v1/communication/rules" )
1461+ return response .json ()
1462+
1463+ def add_communication_rule (self , rule : Dict ) -> Dict :
1464+ """Add a communication policy rule.
1465+
1466+ Args:
1467+ rule: Dict with keys: from_agent, to_agent, action (allow/deny),
1468+ effect, reason, priority, max_depth
1469+
1470+ Returns:
1471+ Dict: Created rule confirmation
1472+ """
1473+ response = self ._request ("POST" , "api/v1/communication/rules" , json = rule )
1474+ return response .json ()
1475+
1476+ def remove_communication_rule (self , rule_id : str ) -> Dict :
1477+ """Remove a communication policy rule by ID.
1478+
1479+ Args:
1480+ rule_id: The rule identifier
1481+
1482+ Returns:
1483+ Dict: Removal confirmation
1484+ """
1485+ response = self ._request ("DELETE" , f"api/v1/communication/rules/{ rule_id } " )
1486+ return response .json ()
1487+
1488+ def evaluate_communication (self , sender : str , recipient : str , action : str ) -> Dict :
1489+ """Evaluate whether a communication is allowed by policy.
1490+
1491+ Args:
1492+ sender: Sending agent identifier
1493+ recipient: Receiving agent identifier
1494+ action: The action to evaluate
1495+
1496+ Returns:
1497+ Dict with 'allowed' (bool), 'rule' (matching rule), 'reason'.
1498+ """
1499+ response = self ._request ("POST" , "api/v1/communication/evaluate" , json = {
1500+ "sender" : sender ,
1501+ "recipient" : recipient ,
1502+ "action" : action ,
1503+ })
1504+ return response .json ()
1505+
1506+ # =============================================================================
1507+ # Agent Lifecycle Methods
1508+ # =============================================================================
1509+
1510+ def delete_agent (self , agent_id : str ) -> Dict :
1511+ """Delete an agent and its metadata.
1512+
1513+ Args:
1514+ agent_id: The agent identifier
1515+
1516+ Returns:
1517+ Dict: Deletion confirmation
1518+ """
1519+ response = self ._request ("DELETE" , f"api/v1/agents/{ agent_id } " )
1520+ return response .json ()
1521+
1522+ def re_execute_agent (self , agent_id : str , input_data : Any = None ) -> Dict :
1523+ """Re-execute an agent with optional new input.
1524+
1525+ Resets the agent's ORGA loop state and starts a new execution.
1526+
1527+ Args:
1528+ agent_id: The agent identifier
1529+ input_data: Optional new input data for the agent
1530+
1531+ Returns:
1532+ Dict: Re-execution result
1533+ """
1534+ payload = {}
1535+ if input_data is not None :
1536+ payload ["input" ] = input_data
1537+ response = self ._request ("POST" , f"api/v1/agents/{ agent_id } /re-execute" , json = payload )
1538+ return response .json ()
0 commit comments