How to Create AI Agents in Python: The Andrade Gutierrez + BotCity Case

Discover how Andrade Gutierrez revolutionized its operations with Process Automation with AI Agents (APA) and the BotCity platform, saving over 300,000 hours and freeing up more than 90 FTEs per month.

Learn more
Headquarters
São Paulo, Brasil
Industry
Construction
Founded in
1948
Company size
5,000-10,000

With over 230 automations already running in production, Andrade Gutierrez needed to go beyond mechanical execution and add intelligence that learns from exceptions and generates instant insights without losing governance control. The Hyperautomation CoE found in BotCity the ideal platform to create and orchestrate AI agents that complement these automations.

A remarkable example: an automation focused on the governance of the CoE itself that analyzes code and generates documentation. 250 SDDs were produced in just 15 seconds each, compared to the 2 hours previously required.

APA does not replace RPA, it expands and complements it. It is a new paradigm for rethinking how we automate knowledge and decision-making.”

Pieter Voloshyn, IT manager at Andrade Gutierrez and project leader

RPA vs. APA: A New Generation of Automations

Even with a robust RPA environment already in operation, Andrade Gutierrez needed automations that learned and reacted to the daily changes in business. By creating AI Agents in Python on the BotCity platform, the automations began to:

  • Adapt in real-time: when the rule changes, the flow adjusts without necessarily requiring extensive code rewriting.
  • Consume unstructured data: LLMs excel at working with unstructured data, such as PDFs, images, and emails. 
  • Deliver quickly: the prototyping of a functional agent goes from ideation to validation in a few hours, compared to days in traditional RPA.
  • Cover exceptions: the use of LLMs and Python validations increases the scope of automations, reducing breaks that previously required human intervention.
Check out more details in the article

How an AI Agent Works in Python

The foundation of APA is AI Agents, which are autonomous software components capable of analyzing the environment, making strategic decisions to achieve goals, and executing necessary actions, all with a high degree of independence and adaptability.

Its architecture combines:

Reasoning engine (LLMs) like OpenAI, Anthropic, and Gemini AI to strategize and act.

Planning guided by prompts and techniques like Chain of Thought and ReAct.

Short and long-term memory to store and reuse information.

Tools that enable interaction with systems, APIs, RPAs, and databases.

Knowledge base to expand context via RAG.

Guardrails for security and compliance.

Multi-agent Architecture Applied at Andrade Gutierrez

To tackle the challenges of complex processes, Andrade Gutierrez leveraged BotCity to implement multi-agent architectures.

This means that instead of a single automation, multiple AI agents work together towards a larger goal.

How does this work in practice for Andrade Gutierrez? A real example is the creation of SDDs (Solution Design Documents). Instead of a single overloaded agent, BotCity enabled Andrade Gutierrez to create a multi-agent system for this task.

Each agent has a specific function, such as: inspecting code, describing automation, listing components, mapping requirements, designing flows, generating summaries, and composing the final document.

Native Python execution: Ideal for any logic defined by agents, with integration to LLMs (including local ones!), APIs, and complex scripts.

Does not depend on rigid structures: Provides complete freedom for modeling and orchestration.

Compatible with various frameworks: Easily integrates with LangGraph, CrewAI, PydanticAI, OpenAI SDK, Semantic Kernel.

Execution in multiple environments: Supports local, server, cloud, VM, and container execution.

Interoperability with various systems: Connects to SAP, Web, Windows, APIs, Databases, Files, and over 500,000 open-source libraries.

Check out more details in the article

Real Application Cases at Andrade Gutierrez

Andrade Gutierrez is already reaping the benefits of APA in various areas, showcasing the transformative potential of this technology.

Case #1: Creation of SDDs (Solution Design Document)

  • Objective: Automate the creation of SDDs based on the automation source code.
  • How it was done: Agents created with LangGraph. The process involves inspect_code, describe_automation, describe_components, describe_requirements, design_flow, generate_executive_summary, and generate_sdd.

Result:

  • Average time reduced from 2 hours to just 15 seconds.
  • +250 documents generated automatically.

Case #2: Integration Analysis for SAP HCM

  • Objective: Map SQL integrations with the payroll system for pre-migration of SAP HCM.
  • How it was done: Agents created with LangGraph. The flow includes inspect_code, extract_sql_commands, describe_sql_commands, and generate_report.

Result:

  • Entire analysis completed in ~10 minutes, a task previously manual and extensive.

Next Steps

Andrade Gutierrez is expanding the application of intelligent agents to new areas:

Telecom invoice processing with automatic rule validations and feedback on inconsistencies.

Identification of those responsible for digitally signed documents, interpreting metadata with contextual validation.

The experience of Andrade Gutierrez shows that with BotCity, it is possible to create and deploy AI agents written in Python in a short time, maintaining full control over versioning, auditing, and permissions.

This accelerates value delivery, reduces operational failures, and ensures governance from the first commit to scaled operation.

Talk to our experts and discover how to apply automation governance with AI in practice.