Class AgentUiController

java.lang.Object
ai.mindconnect.adminui.ui.controller.AgentUiController

@RestController @RequestMapping("/admin/api/agents") public class AgentUiController extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    AgentUiController(ai.mindconnect.agent.service.AgentRegistryService registryService, ai.mindconnect.agent.port.out.AgentDefinitionRepository repository, ai.mindconnect.agent.port.out.AgentSessionRepository sessionRepository, ai.mindconnect.llm.port.out.LlmConfigRepository llmConfigRepository, ai.mindconnect.agent.tool.ToolRegistry toolRegistry, ToolTestService toolTestService, ai.mindconnect.common.Namespace defaultNamespace, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    addTool(UUID id, Map<String,Object> raw, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    copy(UUID id)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    create(Map<String,Object> raw, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch>
    deleteSession(UUID id, UUID sessionId, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch>
    deleteTool(UUID id, UUID toolId, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    detail(UUID id, String section, String row, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    editToolForm(UUID id, UUID toolId)
     
    ai.mindconnect.ui.model.UiPage
    list(int page, int size, String q)
     
    ai.mindconnect.ui.model.UiPage
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch>
    runToolTest(UUID id, UUID toolId, Map<String,Object> raw)
    Executes the tool with the supplied JSON arguments.
    ai.mindconnect.ui.model.UiPage
    The search field posts its form here; the response is the filtered first page.
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch>
    testToolDialog(UUID id, UUID toolId)
    Opens the "Test tool" dialog as a patch over whatever is on screen — the page underneath (agent detail or tool detail) is untouched, so its state survives opening and closing the dialog.
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    update(UUID id, Map<String,Object> raw, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    updateTool(UUID id, UUID toolId, Map<String,Object> raw, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
     
    org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage>
    viewTool(UUID id, UUID toolId)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AgentUiController

      public AgentUiController(ai.mindconnect.agent.service.AgentRegistryService registryService, ai.mindconnect.agent.port.out.AgentDefinitionRepository repository, ai.mindconnect.agent.port.out.AgentSessionRepository sessionRepository, ai.mindconnect.llm.port.out.LlmConfigRepository llmConfigRepository, ai.mindconnect.agent.tool.ToolRegistry toolRegistry, ToolTestService toolTestService, ai.mindconnect.common.Namespace defaultNamespace, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • list

      @GetMapping public ai.mindconnect.ui.model.UiPage list(@RequestParam(defaultValue="1") int page, @RequestParam(defaultValue="10") int size, @RequestParam(required=false) String q)
    • search

      @PostMapping("/search") public ai.mindconnect.ui.model.UiPage search(@RequestBody Map<String,Object> raw)
      The search field posts its form here; the response is the filtered first page.
    • newForm

      @GetMapping("/new") public ai.mindconnect.ui.model.UiPage newForm()
    • detail

      @GetMapping("/{id}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> detail(@PathVariable UUID id, @RequestParam(required=false) String section, @RequestParam(required=false) String row, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • deleteSession

      @DeleteMapping("/{id}/sessions/{sessionId}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch> deleteSession(@PathVariable UUID id, @PathVariable UUID sessionId, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • editForm

      @GetMapping("/{id}/edit") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> editForm(@PathVariable UUID id)
    • create

      @PostMapping public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> create(@RequestBody Map<String,Object> raw, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • update

      @PutMapping("/{id}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> update(@PathVariable UUID id, @RequestBody Map<String,Object> raw, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • copy

      @PostMapping("/{id}/copy") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> copy(@PathVariable UUID id)
    • newToolForm

      @GetMapping("/{id}/tools/new") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> newToolForm(@PathVariable UUID id)
    • viewTool

      @GetMapping("/{id}/tools/{toolId}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> viewTool(@PathVariable UUID id, @PathVariable UUID toolId)
    • editToolForm

      @GetMapping("/{id}/tools/{toolId}/edit") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> editToolForm(@PathVariable UUID id, @PathVariable UUID toolId)
    • testToolDialog

      @GetMapping("/{id}/tools/{toolId}/test") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch> testToolDialog(@PathVariable UUID id, @PathVariable UUID toolId)
      Opens the "Test tool" dialog as a patch over whatever is on screen — the page underneath (agent detail or tool detail) is untouched, so its state survives opening and closing the dialog.
    • runToolTest

      @PostMapping("/{id}/tools/{toolId}/test") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch> runToolTest(@PathVariable UUID id, @PathVariable UUID toolId, @RequestBody Map<String,Object> raw)
      Executes the tool with the supplied JSON arguments. Re-renders the dialog in place with the outcome underneath the form so the admin can read the result and optionally re-send with tweaked args.
    • addTool

      @PostMapping("/{id}/tools") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> addTool(@PathVariable UUID id, @RequestBody Map<String,Object> raw, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • updateTool

      @PutMapping("/{id}/tools/{toolId}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> updateTool(@PathVariable UUID id, @PathVariable UUID toolId, @RequestBody Map<String,Object> raw, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • deleteTool

      @DeleteMapping("/{id}/tools/{toolId}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPatch> deleteTool(@PathVariable UUID id, @PathVariable UUID toolId, @AuthenticationPrincipal org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    • delete

      @DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<ai.mindconnect.ui.model.UiPage> delete(@PathVariable UUID id)