feat(agentui): generate agent draft from a natural-language description - #159
Merged
Merged
Conversation
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.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentUI.Service.generateDraft(): resolves a fast/cheap connected model (same candidate listMemory.Serviceuses for its own structured extraction) and forces asave_drafttool call — same pattern asMemory.Service.summarize().POST /agentui/generateHTTP route + regenerated v2 SDK client.settings.agentui.ai.*keys across all locales (translated by hand; the repo'sscript/translate-app.tsLLM-translation tool requires a locally installedopencodeCLI binary not available in this sandbox).Test plan
bun test test/agentui— 13/13 pass (added a deterministic test forgenerateDraft()'s failure path with no configured provider)bun turbo typecheck— clean across all 30 packagesbun test src/i18n/parity.test.ts— no new drift introduced (pre-existingdvplural-category gap unchanged, confirmed viagit stashcomparison)🤖 Generated with Claude Code