@@ -98,6 +98,25 @@ public Map<String, Object> revokeServiceAccountKey(String serviceAccountId, Stri
9898 normalizeOptions (options ));
9999 }
100100
101+ public Map <String , Object > listAgents (String orgId , String workspaceId , Integer limit , RequestOptions options )
102+ throws IOException , InterruptedException {
103+ Map <String , String > query = new LinkedHashMap <>();
104+ query .put ("org_id" , orgId );
105+ query .put ("workspace_id" , workspaceId );
106+ if (limit != null && limit > 0 ) {
107+ query .put ("limit" , Integer .toString (limit ));
108+ }
109+ return requestJson ("GET" , "/v1/agents" , query , null , normalizeOptions (options ));
110+ }
111+
112+ public Map <String , Object > getAgent (String address , RequestOptions options )
113+ throws IOException , InterruptedException {
114+ String pathPart = address .trim ().startsWith ("agent://" )
115+ ? address .trim ().substring ("agent://" .length ())
116+ : address .trim ();
117+ return requestJson ("GET" , "/v1/agents/" + pathPart , Map .of (), null , normalizeOptions (options ));
118+ }
119+
101120 public Map <String , Object > createIntent (Map <String , Object > payload , RequestOptions options )
102121 throws IOException , InterruptedException {
103122 return requestJson ("POST" , "/v1/intents" , Map .of (), payload , normalizeOptions (options ));
0 commit comments