Skip to content

feat(agentui): generate agent draft from a natural-language description - #159

Merged
alltomatos merged 3 commits into
devfrom
agentui-ai-generate
Sep 13, 2026
Merged

alltomatos merged 3 commits into
devfrom
agentui-ai-generate

Conversation

@alltomatos

Copy link
Copy Markdown
Owner

Summary

  • Adds a "Criar com IA" panel to the AgentUI form: describe the agent you want in your own words, and a one-shot LLM call drafts the name, personality/system-prompt, command trigger and guardrail level for review before saving.
  • AgentUI.Service.generateDraft(): resolves a fast/cheap connected model (same candidate list Memory.Service uses for its own structured extraction) and forces a save_draft tool call — same pattern as Memory.Service.summarize().
  • New POST /agentui/generate HTTP route + regenerated v2 SDK client.
  • Model choice and RAG sources stay manual by design — those depend on what's actually connected/uploaded, which the model can't know.
  • i18n: added settings.agentui.ai.* keys across all locales (translated by hand; the repo's script/translate-app.ts LLM-translation tool requires a locally installed opencode CLI binary not available in this sandbox).

Test plan

  • bun test test/agentui — 13/13 pass (added a deterministic test for generateDraft()'s failure path with no configured provider)
  • bun turbo typecheck — clean across all 30 packages
  • bun test src/i18n/parity.test.ts — no new drift introduced (pre-existing dv plural-category gap unchanged, confirmed via git stash comparison)
  • Manually verified end-to-end in the browser preview: typed a description, clicked Generate, got a real drafted name/personality/trigger/guardrails, success toast shown, form ready to save

🤖 Generated with Claude Code

Adds a "Criar com IA" panel to the AgentUI form: the user describes the
agent they want in their own words and a one-shot LLM call drafts the
name, personality/system-prompt, command trigger and guardrail level for
review before saving. Model choice and RAG sources stay manual, since
those depend on what's actually connected/uploaded.

- AgentUI.Service.generateDraft(): resolves a fast/cheap connected model
  (same candidate list Memory.Service uses) and forces a structured
  save_draft tool call, same pattern as Memory.Service.summarize().
- New POST /agentui/generate HTTP route + regenerated v2 SDK client.
- "Criar com IA" collapsible section in agentui-form.tsx, open by
  default only when creating a new agent.
- i18n: added settings.agentui.ai.* keys across all locales.
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@alltomatos
alltomatos merged commit 0e0e6e9 into dev Sep 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant