ai-agent-builder
Reactive icon

AI Agent Builder

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 24 Sep (22 hours ago)
 by 
0.0
 (0 ratings)
ai-agent-builder

AI Agent Builder

Documentation
1.0.0

Modules 

  •  

  • This is where the agent and prompt will be configured. 

  •  

  • AI Agent Builder reusable core services with public entities, actions. 

  •  

  • Where the Gemini AI API was developed. 

 

 

 

Module AgentBuilder_CS: AI Agent Builder reusable core services with public entities, actions. 

 

Options 

 

  • AgentBuilder_CreateOrUpdate: Encapsulates the CreateOrUpdate entity action, enabling logic to run consistently before and after a record is created or modified. 

  • Source: AgentBuilder record to create or modify. 

  • Return: Flow feedback. 

 

 

  • AgentBuilder_Delete: Encapsulates the Delete entity action, enabling logic to run consistently before and after a record is deleted. 

  • Id: AgentBuilder identifier to delete 

  • Return: Flow feedback. 

 

 

  • CallAgent: Sends a message to Gemini's artificial intelligence, and returns a text according to the prompt you registered for the agent. 

  • Agent: Agent name. 

  • Content: Message content according to the prompt you configured. 

  • AIAgentBuilderCode: What artificial intelligence will be used. 

  • Role: The sender's role in the conversation, which can be 'user' (for your input) or 'model' (for the AI response). 

  • Response: The agent response. 

  • TokenCount: A breakdown of the tokens consumed in the CallAgent request. 

 

 

 

 

 

 

Module AgentBuilder_Gemini_API: API AI Gemini. 

Options 

 

  • ChatGemini: Send a message to the Gemini model. 

  • Text: The content of the message (your prompt or command). 

  • Role: The sender's role in the conversation, which can be 'user' (for your input) or 'model' (for the AI response). 

  • Response: The agent response. 

  • TokenCount: A breakdown of the tokens consumed in the CallAgent request. 

 

How i can configure my Gemini API Key? 

  • Go to module AgentBuilder_Gemini_API now click in gear to open service center. 

  • Now click in tab Site Properties 

  • Then click in.  

  • Then past yout API Key in Effective Value and click in Apply to save. 

 

 

 


How i can create my API Key? 

  • Access the link below. 

  • Then click in button Get a Gemini API Key 

  •  

  • Then click in Create API Key / Criar chave de API 


  • Then click in Create an API key in a new project / Criar uma chave de API em um novo projeto 

  • Now just click copy and use the API Key. 


  •  

  •  

  •  

 

How i can use this agent builder? 

To create one, you need to access the AgentBuilder_BO module to configure your agent.  

Click Add Agent Builder as shown in the image below. 

 

And fill in the following fields below. 

 

  • Name: Enter the name that will be used to call your agent. 

  • AI Agent Builder: Gemini (For now it only works with Gemini, I will soon implement new agents.) 

  • Prompt: Describe how your agent operates and behaves. 

  • Description: Describe the agent's area of expertise. 

After filling out this information, you can save and test your agent in the form on the side.  

 

 

 

Below is the prompt for an agent you can test. 

Name: AgentAtendimento 

Prompt

Instruções para a classificação de sentimento de atendimento. 

Você receberá um texto de entrada de um usuário, que pode conter o Título e a Descrição de um atendimento. 

Sua tarefa é analisar o sentimento do texto e classificá-lo em uma das seguintes categorias: 

Objetivo: O texto é objetivo, sem emoções expressas, focado apenas no problema ou na solicitação. 

Favorável: O texto contém palavras ou frases de agradecimento, satisfação, elogios ou transmite uma emoção positiva. 

Hostil: O texto expressa irritação, insatisfação, reclamações ou utiliza um tom rude. 

Formato de Saída 

Sua resposta deve ser uma única palavra, em letras maiúsculas (caixa alta), correspondendo a uma das categorias acima. Não inclua qualquer outra palavra, frase ou explicação. 

Exemplos de Saída: 

Objetivo 

Favorável 

Hostil 

Se o texto de entrada não estiver em um formato válido ou se a classificação for incerta, retorne a palavra Inclassificável

 

------------------------------------------------------------------------------------------------------------------------------------

Sample Text

Below are some examples to try. 

 

Título: Dúvida sobre o status do pedido #12345\nDescrição: Gostaria de saber se meu pedido já foi enviado. 

 Título: Atendimento maravilhoso!\nDescrição: O suporte técnico foi extremamente útil e resolveu meu problema rapidamente. Muito obrigado! 

 Título: Erro no sistema, isso é inaceitável!\nDescrição: O sistema está fora do ar há horas! Preciso disso funcionando agora, é um absurdo a falta de resposta. 

 Titulo: Falha ao imprimir relatório\nDescrição: O sistema está apresentando um erro ao tentar gerar o relatório mensal. O erro é "falha de conexão com a impressora". 

Titulo: Feedback sobre o atendimento\nDescrição: Quero registrar um elogio. O atendente da semana passada foi muito prestativo e me ajudou a resolver o problema com a licença. Estou muito satisfeito! 

 Titulo: O sistema não funciona!\nDescrição: Isso é um absurdo! O site está fora do ar há mais de 3 horas e ninguém dá uma resposta. Eu preciso usar a plataforma agora ou vou cancelar meu contrato. 

 Titulo: A tela está estranha\nDescrição: Olá, tudo bem? Meu monitor está com um problema, mas não sei se é do computador ou do programa. A imagem fica tremendo. Minha internet também está ruim. Não entendi bem o que está acontecendo. 

------- 

 

How do I call the agent in my application? 

CallAgent 

Add the CallAgent dependency to the AgentBuilder_CS module 

Drag into your application flow. 

  • Agent: Name of the agent you configured in the back office. 

  • Content: Agreement message that you configured in the prompt for the agent to understand your prompt. 

  • AIAgentBuilderCode: Nome da API que vai ser utilizada (Gemini) 

  • Role: The sender's role in the conversation, which can be 'user' (for your input) or 'model' (for the AI response). 

If everything goes well, the agent will return the response according to the prompt you configured. (CallAgent.Response)