Create Agents
What are Agents?
Agents are customizable entities that use contextual information to provide more accurate and relevant responses and actions. They are designed to address specific problems and enhance software development efficiency. When creating an agent, you can:
- Establish Agent Instructions.
- Set base Knowledge Sources (including rules and parameters for their usage).
- Designate them as Conversation Agents or Systematic Agents.
- Employ them within Quick Commands.
At StackSpot AI, agents are like virtual experts that can be tailored to fulfill your specific requirements, thus enhancing the efficiency and quality of software development.
When setting up an Agent in StackSpot AI, you are responsible for customizing its interactions with the platform. This includes modifying system prompts and Knowledge Sources to enhance efficiency and facilitate smooth development.
You have the flexibility to create specialized agents for different tasks, such as:
- An agent that generates user stories
- Agents for creating code and conducting QA on the generated code
- An agent for creating documentation
Create Agent
Step 1. Go to the StackSpot AI Portal and navigate to the ‘Contents > Agents‘ section;
Step 2. Click on the ‘Create Agents’ button;
Step 3. Fill in the following information:
-
Agent name: Provide a name for your Agent.
-
System prompt: This is where you can define the instructions for your Agent's behavior and abilities. For example, CodeBuddy has a specific system prompt.
- The character limit for the Agents prompt is 8,000 characters.
When conducting similarity searches, StackSpot AI focuses on the user's prompt (in Quick Commands, the prompt box, and in the chat, the user's prompts). However, it does not consider the Agents' system prompts for these searches. During the Agent's process, Knowledge Sources (KS) and Knowledge Objects (KO) will be utilized once the similarity threshold, set within the Agent, is met between a KS or KO and the user's system prompt.
-
Suggested Prompts: Suggested prompts are phrases or questions to help users start conversations with the Agent.
-
Conversational mode: When activated, the system enables continuous, complex interactions, making it ideal for conversations that involve multiple exchanges. When deactivated, the system answers one question at a time, making it better suited for quick, direct responses.
-
Knowledge Sources (KS): Assign specific KS to the Agent to enhance responses. It will only use the ones you selected. It does not search other KS through the account.
You can configure the similarity search function. Choose the following:
- Maximum number of KOs considered in the search: Choose the number of Knowledge objects you will consider in the answers. By default, StackSpot AI uses four (4) chunks of Knowledge Sources Objects to enrich the answers, but you can choose as many as you want.
- Relevance threshold: Choose how relevant the threshold is. By default, StackSpot AI considers 73%, indicating the similarity of the answer chunk you are searching for. You can choose your desired percentage.
Step 4. Click 'Save';
Test your Agent in the 'Try' section to ensure it functions as expected;
Step 5. If you want to share your Agent, click on the 'Share' button and choose to share it with:
- Share with users: Add the user's email address.
- Publish in the account.
You will be able to use your Agent in the StackSpot AI IDE.
You can edit or delete your agent in the 'Settings' tab.
Agents Examples
Agent 1. Code review
A development team wants to automate the code review process by creating a specialized Agent in StackSpot AI. The goal is to identify issues such as coding standard violations, security vulnerabilities, and optimization opportunities in code submissions.
Follow the steps to create this Agent:
- Access the StackSpot AI Portal and navigate to the 'Agents' section;
- Click on 'Create Agents' and provide a name, such as "Code Review Agent";
- In the 'System Prompt', define the instructions for the Agent to review the code, such as: "Review the code for coding standard violations, security vulnerabilities, and optimization opportunities";
- Select the ' Conversational Mode' to allow continuous interactions with the development team during the review process;
- Add relevant ‘Knowledge Sources’ about coding standards and security;
- Save the Agent and test it in the 'Try' section to ensure it works as expected.
- Result: The Agent automatically reviews code commits, providing immediate feedback on potential issues, improving code quality, and speeding up the review process. It can be used in direct conversations with the team and within a Quick Command to review multiple commits simultaneously.
Agent 2. Product Management assistant for creating User Stories
A product manager wants to create an Agent in StackSpot AI to assist in developing detailed and actionable user stories. The Agent will help translate product requirements into structured user stories that are easy for development teams to understand.
Follow the steps to create this Agent:
- Access the StackSpot AI Portal and navigate to the 'Agents' section;
- Click on 'Create Agents' and provide a name, such as "Code Review Agent";
- n the 'System Prompt', define the instructions for the Agent, such as: "Help create detailed user stories aligned with agile methodologies, based on the provided requirements";
- Select the ' Conversational Mode' to allow the product manager to interact with the Agent during the creation of user stories;
- Add 'Knowledge Sources' that contain examples of user stories and best practices for agile methodologies
- Save the Agent and test it in the 'Try' section.
- Result: The product manager can quickly generate well-structured user stories aligned with agile methodologies, reducing the time spent writing and ensuring consistency in the team's user stories. The Agent can be used in direct conversations and within a Quick Command to generate multiple user stories simultaneously.
Integration with Quick Commands
Both Agents can be used individually in conversations or combined in a Quick Command to perform more complex tasks. For example, a Quick Command can be configured so that the Code Review Agent and the User Story Assistant work together. In this scenario, the Quick Command can review the code and automatically generate user stories based on the detected changes, optimizing the team's workflow.
This flexibility allows multiple specialized agents to collaborate at different stages of the development cycle, ensuring greater efficiency and quality.
For more information on creating Quick Commands,follow the steps in the documentation section.