Exploring Now Assist for Code
Summarize
Summary of Exploring Now Assist for Code
ServiceNow® Now Assist for Code is a generative AI-powered tool designed to help developers write, edit, and understand code more efficiently within the ServiceNow AI Platform®. It delivers context-aware code suggestions using natural language prompts and supports multiple AI model providers including Now LLM Service, Azure OpenAI, Google Gemini, and AWS Anthropic. This capability is included in the Creator Pro Plus offering.
Show less
Key Features
- Code Generation: Creates new code based on user prompts at the cursor position without affecting existing code. It uses the surrounding code context to generate relevant suggestions. This feature requires the now.assist.creator role and appears as a Now Assist icon in the script editor and Workflow Studio.
- Code Autocomplete: Provides real-time, contextually relevant code suggestions as users type, displayed in grey text and added only when accepted. Available in the ServiceNow integrated development environment (IDE) application.
- Code Edit: Enables modification of highlighted code segments while considering surrounding code context, allowing quick editing and refactoring.
- Code Explain and Summarize: Offers summaries and detailed explanations of code functionality to improve understanding.
- AI-Generated Code Tracking: Helps developers and administrators identify code created by AI for transparency and auditing.
Key Outcomes
- For Users: Streamlines code creation by generating code from simple prompts, improving code quality, and reducing repetitive tasks.
- For Developers: Facilitates rapid editing and refactoring of large code blocks, adds informative comments, and enhances comprehension of existing code through explanations and summaries.
- For Administrators: Supports tracking and governance of AI-generated code within the platform.
ServiceNow® Now Assist for Code is a generative AI-powered tool designed to help developers create, edit, and summarize code.
Now Assist for Code is designed to empower developers with code suggestions. By using natural language prompts in the script editor on the ServiceNow AI Platform®, you will receive context-aware code suggestions that enhance your coding experience.
Now Assist for Code supports Now LLM Service, Azure OpenAI, Google Gemini and AWS Anthropic model providers. This capability is a part of Creator Pro Plus offering and includes the following skills:
- Code generation
- Code autocomplete
- Code editing
- Code explain and summarize
Code generation overview
The Code generation skill creates new code at the cursor location based on user input, without altering the surrounding code. It considers the context provided by the code preceding and following it.
When code generation is enabled on an instance, a Now Assist icon () appears at the bottom of the script editor.
After you describe the code you want to generate, you will receive code suggestions in the JavaScript editor on forms in the ServiceNow AI Platform® and in Script steps within Workflow Studio. Developers, regardless of their scripting experience on the ServiceNow AI Platform®, can benefit from code generation, allowing them to start writing custom code or refine existing code more efficiently.
Code autocomplete overview
The Code autocomplete skill provides contextually relevant suggestions as users type in the script editor. These suggestions appear in grey text and will only be added to the script once the user accepts them.
For more information, see Generate code with autocomplete.
With the Zurich release, Code autocomplete is available in the ServiceNow integrated development environment (IDE) application.
Difference between Code generation and Code autocomplete skills
The Code generation skill requires a specific prompt from the user to create code that aligns precisely with the given requirements or instructions. The Code autocomplete skill works automatically. It generates code completions or snippets based on the context around it.
This means the first skill relies on direct user input, while the second skill anticipates what the user might need, offering suggestions and completions without needing detailed prompts.
Code edit overview
The Code Edit skill modifies the selected code while reviewing the surrounding code. It functions only when the code to be edited is highlighted.
For more information, see Edit code with Now Assist.
Code explain and summarize overview
The Code explain and summarize skill provides a summary of the code and a comprehensive explanation of its functionality.
For more information, see Explain and summarize code.
Now Assist for Code benefits
| Benefit | Feature | Users |
|---|---|---|
| Generate code based on your prompts to improve quality and reduce repetitive tasks. | Generate code with AI-powered code generation | Developers |
| Quickly edit and refactor large code segments. | Edit code with Now Assist | Developers |
| Add comments to code segments. | Add comments to code | Developers |
| Understand code. | Explain and summarize code | Developers |
| Identify code generated by AI. | Tracking AI-generated code | Developers, administrators |