Skip to main content

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

Imagem mostra a tela de Agentes no Portal da StackSpot AI. A seção Contents e o destaque para a seção Agentes e o botão Criar Agente.

Step 2. Click on the ‘Create Agents’ button;

Imagem mostra a tela de Agentes no Portal da StackSpot AI. A seção Contents e o destaque para a seção Agentes e o botão Criar Agente.

Step 3. Fill in the 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.
info

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.

Step 4. 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 40%, indicating the similarity of the answer chunk you are searching for. You can choose your desired percentage.

Step 5. Configure LLM (Language Large Model)

  • LLM: StackSpot AI allows you to define Language Learning Models (LLMs) and their corresponding models. You can customize your AI experience by selecting the most suitable models for a specific context.

Imagem mostra a tela de Agentes no Portal da StackSpot AI. A seção de LLM.

  • Click the 'Tools' button in the row of the LLM section. Choose the model you want. For each model, you have different fields.

Models fields and values

Fields

See the field details:

  • Temperature: It is linked to LLM's creativity. Setting the temperature to 0 yields more precise information, while increasing the temperature encourages greater creativity.
tip

If you're looking for software-related answers, choose 0. To create text images, select a higher temperature for more creativity.

  • Top P: It regulates the level of adventurousness in the AI's word choices.
  • Frequency penalty: It reduces word repetition.
  • Presence penalty: It encourages the AI to explore new topics.
  • Reasoning effect: Explain how much reasoning or problem-solving an AI does to provide answers.

Structure Outputs

In Structure Outputs, the LLM generates all responses in JSON schema format.

The user-defined schema determines the output, ensuring that any response from the language model specifies the type, properties, steps, and more. Structured output makes sure that the response follows a specific, predefined format.

Follow the instructions:

Step 1. Enable the ‘Structure output’;

Step 2. Fill in the JSON format with the actions you want the LLM to perform.

To find out the available action options, click on ‘Examples’. You can choose:

  • Math step-by-step: details the resolution of a math problem, step by step.
  • User profile parsing: organizes and presents user profile information.
  • Order parsing: structures order data, including items and values.
  • Project parsing: details project information, such as members and status.
Values

See below the values for each model.

  • GPT 4o & GPT 4o-mini
ParameterMinimumMaximumDefaultRequired
Temperature0.02.00.7Yes
Top P0.01.01.0No
Frequency Penalty-2.02.00.0No
Presence Penalty-2.02.00.0No
  • GPT 03-mini

    • Reasoning Effort: Low, Medium or High.
      • Default: Low
  • Bedrock Claude 3.5 Sonnet

ParameterMinimumMaximumDefaultRequired
Temperature0.01.00.7Yes
Top P0.01.0xNo

Step 6. Add Tools to an Agent

Adding a tool to an Agent enhances its effectiveness by enabling it to perform actions rather than just processing text. For example, the Agent can retrieve processed data from other applications by interacting with these tools.

info

Tool example:

If you need to solve a math problem, using an agent with a calculation tool will effectively utilize that tool to find the answer and deliver the correct result to you.

  • To add Tools: Click the 'Tools' button. Currently, you only have the Utilities tool available to add. Inside it, you can choose one of the functionalities below:
    • Calculator
    • Generate Chart
    • Image Generator
    • Web Extraction:
    • Web Search
    • Wikipedia

You can choose more than one Tool.

Step 7. On Advanced Settings, you can enable these options

1. Allow this Agent to display detailed information: This option gives users full visibility into the Agent's detailed steps.

You can view the Tools you chose while using the Agents in the StackSpot AI chat box.

2. 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.

Step 8. Click 'Save'

Image shows the Agents section in the StackSpot Portal. The mouse clicks on the system prompt, followed by the suggested prompts and the addition of Knowledge Sources. Then, the mouse clicks on the settings button, where the number of Knowledge Sources and the relevance threshold are displayed.

Test your Agent in the 'Try' section to ensure it functions as expected

Image shows the Agents section in the StackSpot Portal. The 'Try' section to test the agents.

Share your Agent

If you want to share your Agent, click on the 'Share' button and choose to share it with:

  1. Share with users: Add the user's email address.
    • Read: Users can view and use the content.
    • Write: Users can attach/detach content and have the Read access.
  2. Publish in the account.

Image shows the share button located on the right side of the Agent screen.

You will be able to use your Agent in the StackSpot AI IDE.

You can edit or delete your agent in the 'Settings' tab.

Image shows the settings button in the tabs of the agent section.

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:

  1. Access the StackSpot AI Portal and navigate to the 'Agents' section;
  2. Click on 'Create Agents' and provide a name, such as "Code Review Agent";
  3. 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";
  4. Select the ' Conversational Mode' to allow continuous interactions with the development team during the review process;
  5. Add relevant ‘Knowledge Sources’ about coding standards and security;
  6. 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:

  1. Access the StackSpot AI Portal and navigate to the 'Agents' section;
  2. Click on 'Create Agents' and provide a name, such as "Code Review Agent";
  3. 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";
  4. Select the ' Conversational Mode' to allow the product manager to interact with the Agent during the creation of user stories;
  5. Add 'Knowledge Sources' that contain examples of user stories and best practices for agile methodologies
  6. 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.

Video: How to create Agents

Next Steps