Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Amazon Brings AI Assistant to Software Development as Part of Amazon Q Suite

Amazon Brings AI Assistant to Software Development as Part of Amazon Q Suite

Amazon has recently released Amazon Q Developer Agent, an AI-powered assistant that uses natural language input from developers to generate features, bug fixes, and unit tests within an integrated development environment (IDE).

The Amazon Q Developer Agent employs large language models and generative AI to understand a developer's natural language request, analyze the existing codebase, formulate a plan to fulfill the request, and then generate the necessary code changes to implement the desired feature or modification.

The process starts when a developer invokes the agent (via /dev command) and describes the task they want accomplished, such as "Create unit tests for"

Source: AWS Blog

To maximize the effectiveness of the Amazon Q Developer Agent, Amazon recommends providing detailed descriptions when requesting new features or code changes. Developers should offer specific details about what the code should achieve, allowing the Developer Agent to create a comprehensive implementation plan and code changes, also limiting the number of updates a feature can have to not more than five files at a time. Larger changes might impact the quality and manageability of the implementation. If a request results in changes to many files, developers should consider reducing the scope of their feature description.

An example of a Q Developer Agent prompt is:

Create a new REST API endpoint /api/authenticate to handle user authentication. This endpoint should accept POST requests with user credentials and return a JWT token upon successful authentication. Additionally, update the user management system to integrate with the new authentication endpoint and enforce authentication for relevant API endpoints.

Some of the other interesting features of Q Developer Agent include updating CSS styles for responsive layouts, fixing user profile image uploads, refactoring code for improved readability, and implementing input validation for contact forms. The Developer Agent can also help resolve broken links in navigation menus, optimize image loading for faster page loads, add error logging for critical API endpoints, update API documentation and refactor database queries for efficiency. By providing specific instructions for each task, developers can harness Q Developer Agent's capabilities to tackle front-end enhancements, back-end optimizations, and DevOps-related tasks efficiently.

Donnie Prakoso, a principal developer advocate at AWS, adds,

I can ask Amazon Q Developer the top three highest-cost services in Q1 this year.

Prompt for you to try: What were the top three highest-cost services in Q1?

Amazon claims that the Amazon Q Developer Agent scored 13.82% on the SWE-bench benchmark and 20.33% on SWE-bench lite, putting it at the top of the SWE-bench leaderboard as of May 2024. SWE-bench measures the pass rate of how often all unit tests associated with an issue pass after applying an AI-generated code change.

Amazon aims to optimize the agent for a range of real-world metrics beyond just accuracy. These include balancing resource efficiency in terms of latency, cost, number of language model calls, and input/output token usage. The agent aims to consistently deliver high-quality results within minutes.

Amazon highlights that the upgraded several production applications were from Java 8 to Java 17 using Q Dev Agent.

Chase Hughes, CEO at ProAI, acknowledges the advantages Q provides by reducing mundane activities in software development. However, he also points to other worthy alternatives on the market with similar functionality. Evaluating all of the options will provide a better sense of which solutions are the best fit for your organizational needs.

Prakoso explains,

What I really like about this capability is that it minimizes the time and effort needed to get my account information in the AWS Management Console and generate AWS CLI commands so I can immediately implement any changes that I need. This helps me focus on my workflow to manage my AWS resources.

While GitHub's Copilot focuses primarily on code generation within IDEs, Amazon's Q Developer Agent takes a broader approach as an AI assistant across the AWS ecosystem. Unlike Copilot's public training data, Q Developer leverages Amazon's proprietary models and combines them with customers' internal data for more customized assistance.

Q Developer's capabilities extend beyond code authoring to understanding natural language requests, autonomously implementing changes, optimizing AWS resources like EC2, S3, ECS, Lambda, and AWS data sources and systems., and handling non-coding tasks such as content generation and data analysis.

The Amazon Q Developer Agent is available through plugins for popular IDEs like Visual Studio Code, JetBrains IDEs, and Visual Studio. Developers can get started for free using an AWS Builder ID or AWS IAM Identity Center instance setup that allows Amazon Q. Developers eager to explore can use the getting started guide, for a visual demonstration of the tool in action, view the demo to get a better sense of Q Developer agent. Read more about Amazon Q Business and Amazon Q Developer, as reported separately on InfoQ.

About the Author

Rate this Article