feat(agents): Create group of agents (#82)

* feat(ui): add section to create agents in group

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Enhance UX and do not display first form section

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* fixups

* Small fixups on avatar creation

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-03-22 21:41:51 +01:00
committed by GitHub
parent 3a921f6241
commit 3a9169bdbe
5 changed files with 648 additions and 13 deletions

View File

@@ -142,6 +142,14 @@ func (app *App) registerRoutes(pool *state.AgentPool, webapp *fiber.App) {
return c.Render("views/actions", fiber.Map{})
})
webapp.Get("/group-create", func(c *fiber.Ctx) error {
return c.Render("views/group-create", fiber.Map{
"Actions": services.AvailableActions,
"Connectors": services.AvailableConnectors,
"PromptBlocks": services.AvailableBlockPrompts,
})
})
// New API endpoints for getting and updating agent configuration
webapp.Get("/api/agent/:name/config", app.GetAgentConfig(pool))
webapp.Put("/api/agent/:name/config", app.UpdateAgentConfig(pool))
@@ -149,6 +157,7 @@ func (app *App) registerRoutes(pool *state.AgentPool, webapp *fiber.App) {
webapp.Post("/action/:name/run", app.ExecuteAction(pool))
webapp.Get("/actions", app.ListActions())
webapp.Post("/api/agent/group/generateProfiles", app.GenerateGroupProfiles(pool))
webapp.Post("/api/agent/group/create", app.CreateGroup(pool))
webapp.Post("/settings/import", app.ImportAgent(pool))