feat(api): AI services backend — refine prompt tool call#3687
Open
feat(api): AI services backend — refine prompt tool call#3687
Conversation
Implement the backend for Chapter 1 of the AI services feature: - REST API with MCP-shaped tool-call contract at /preview/ai/services/ - Single tool: tools.agenta.api.refine_prompt - Thin HTTP client calling deployed prompt in internal Agenta org - EE permission check (EDIT_WORKFLOWS) and rate limiting - Input/output validation for prompt templates - Design docs with spec, plan, context, and research
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The design reference doc used 'prompt_text' as the input key while the service code, DTOs, spec, and input schema all use 'prompt_template_json'. Align the doc to match.
…ment Two-panel modal (Instructions + Preview) integrated into the Playground: - Left panel: @ant-design/x Sender + Prompts for guidelines input with chat-like display - Right panel: Editable refined messages with JSON diff toggle - Backend output schema simplified: messages + summary (removed redundant refined_prompt) - Preserves original template_format through refinement (only messages are changed) - Keyboard shortcut (Cmd/Ctrl+Enter), accessibility (aria-labels, focus management) - Magic wand icon on prompt header with AI services availability check
9 tasks
Remove empty __init__.py file in ai_services module
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
Removed the docstring for the AI Services core module.
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
junaway
reviewed
Feb 11, 2026
bekossy
approved these changes
Feb 13, 2026
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
/ai/servicestools.agenta.api.refine_prompt/services/completion/run) and returns validated structured output (messages,summary)Endpoints
GET/ai/services/statusPOST/ai/services/tools/callWhat Changed (latest)
/preview/ai/servicesto/ai/servicesacross backend router wiring, EE entitlements category mapping, web client calls, and docsAIServicesUnknownToolError) and mapped at router boundaryCategory.AI_SERVICES) and removed OSS inline router throttleAGENTA_AI_SERVICES_ENVIRONMENT_SLUGAGENTA_AI_SERVICES_REFINE_PROMPT_KEY__ag_*cloud input keysNotes
enabled: falseand tool call returns 503