The Digital Transformation Playbook

Coding the Future: How to Build AI Agents That Actually Work

โ€ข Kieran Gilmurray

Artificial intelligence has entered a transformative era with autonomous agents now handling everything from customer service to supply chain optimization without human intervention. These AI systems represent a fascinating middle ground between rigid programming and emergent intelligenceโ€”and building them effectively requires understanding the full spectrum of development approaches.

TL;DR:

  • Low-code platforms like Langchain and Lama Index provide pre-built components and visual interfaces for rapid development
  • Customer service autoresponders built with low-code tools can quickly process inquiries and deliver contextually relevant responses
  • Low-code solutions have limitations in customization and may be affected by changes in third-party services
  • Hybrid approaches leverage low-code for routine tasks while using custom code for specialized functionality
  • Best practices for hybrid systems include modular design, clear interfaces, robust testing, and scalability planning


The journey from conceptualizing an AI agent to deploying it spans a continuum from accessible low-code solutions to sophisticated custom development. Low-code platforms like Langchain and Lama Index democratize AI development through visual interfaces and pre-built components, making them ideal for rapid prototyping and straightforward use cases. A customer service autoresponder, for instance, can be quickly assembled by connecting CRM systems with language model APIs. However, these solutions often trade customization for convenience, limiting their applicability for specialized or high-performance requirements.

For organizations seeking both speed and specificity, hybrid approaches offer compelling advantages. By combining low-code efficiency for routine operations with custom code for critical components, teams can achieve the perfect balance of rapid deployment and tailored functionality. Full-code development, while requiring greater technical expertise and time investment, provides unmatched control and performance for complex applications. 

Well-designed agents built from scratch incorporate sophisticated memory systems, advanced reasoning capabilities, and precise action mechanismsโ€”with Python emerging as the language of choice for these bespoke solutions. 

As AI technology evolves, the boundaries between development approaches continue to blur, suggesting a future where natural language instructions can scaffold sophisticated agent architectures. What approach will you choose for your organization's AI journey?

๐Ÿ“• Want to learn more about agentic AI then read my new book on Agentic AI and the Future of Work https://tinyurl.com/MyBooksOnAmazonUK

Support the show


๐—–๐—ผ๐—ป๐˜๐—ฎ๐—ฐ๐˜ my team and I to get business results, not excuses.

โ˜Ž๏ธ https://calendly.com/kierangilmurray/results-not-excuses
โœ‰๏ธ kieran@gilmurray.co.uk
๐ŸŒ www.KieranGilmurray.com
๐Ÿ“˜ Kieran Gilmurray | LinkedIn
๐Ÿฆ‰ X / Twitter: https://twitter.com/KieranGilmurray
๐Ÿ“ฝ YouTube: https://www.youtube.com/@KieranGilmurray

๐Ÿ“• Want to learn more about agentic AI then read my new book on Agentic AI and the Future of Work https://tinyurl.com/MyBooksOnAmazonUK

SPEAKER_00:

Chapter ten Agentic AI Architecture From Low Code Platforms to Full Code Solutions. Introduction From Low Code to Full Code Agentic AI Solutions Imagine a factory in the eighteen hundreds. Workers manually operate looms until steam engines arrive, automating production. Fast forward to today, the looms are business processes, and the steam engines are autonomous agents. AI systems that make decisions, act, and learn with minimal human oversight. AI agents are not sci-fi fantasies. They are already answering customer emails, qualifying sales leads, and optimizing supply chains without human guidance, since agents seem to be much more capable of reasoning and action. In contrast to traditional software programs, it may well be said that they traverse the space between programmed instruction and emergent intelligence. As expected, building these agents is not a simple, one-size-fits-all task. Their development spans a spectrum. On one end, low-code and no-code platforms provide accessible, rapid development environments that allow teams with limited programming expertise to create functional prototypes and solutions. On the other end, full code solutions enable custom, high performance applications built from the ground up. Organizations choose their approach based on factors such as time to market, cost, available technical expertise, scalability needs, and the level of customization required. Whether leveraging low code platforms for agility or full code development for control and performance, understanding the trade-offs is essential for successfully integrating Agentic AI into any enterprise environment. This article serves as a guide to navigating these trade-offs. You will analyze low code, hybrid, and full code approaches through real-world perspectives, cutting through the hype to focus on what truly delivers business results, not just what appears impressive. Low code agent development. Low code agent development platforms are analogous to IKEA furniture, providing pre-built components, e.g., APIs, workflows, templates. These platforms provide visual interfaces and drag and drop components that accelerate the prototyping and deployment process, making them ideal for organizations looking to implement AI solutions quickly. One of the prominent tools in this space is Langchain, a framework designed to simplify the integration of language models into applications. Langchain streamlines complex tasks such as prompt engineering, response handling, and chaining multiple LLM calls to build coherent workflows. Similarly, Lama Index assists in managing and indexing large volumes of data, which is crucial for agents that rely on contextual information to generate accurate responses. In addition to these frameworks, no code platforms like Zapier and Make.com, formerly integromat, provide extensive libraries of pre-built integrations. These platforms allow users to automate workflows by connecting various services, ranging from email and CRM systems to social media and e-commerce platforms without writing a single line of code. By linking these integrations with LLM APIs from providers such as OpenAI, Anthropic, or Cohere, organizations can deploy agents that manage tasks like customer support, order processing, or content generation with relative ease. A practical example of a low-code agent deployment is a customer service autoresponder. In this scenario, a business uses a low-code platform to connect its customer relationship management with an LLM API. When a customer inquiry is received, the agent quickly processes the query, identifies common questions, and returns automated yet contextually relevant responses. This not only speeds up response times, but also frees human agents to manage more complex customer queries, thereby enhancing overall customer and agent satisfaction, as well as business efficiency and profit. However, while low-code platforms offer significant advantages in terms of speed and ease of use, they come with a variety of limitations. The abstraction layers that make these platforms user-friendly can also restrict their customization. Users might find it challenging to implement highly specialized functionality or optimize performance beyond the provided templates. Moreover, reliance on third-party services means that any changes in external APIs or platform policies could impact the functionality and scalability of the deployed agent. Another consideration is the integration depth. Although no code tools excel at connecting a variety of applications, the orchestration of complex workflows or the handling of high-volume data may require additional custom logic. In such cases, organizations often consider hybrid approaches, combining low-code solutions with custom code to bridge any gaps between off-the-shelf functionality and bespoke business requirements that may exist. Overall, low-code agent development represents a compelling option for organizations aiming to quickly deploy intelligent systems with minimal overhead. It lowers the barrier to entry for AI integration and provides a practical solution for common business challenges. However, low-code platforms are opinionated. They assume you want a linear workflow, basic LLM integration, and cloud hosting. If the goal at hand is building something like a real-time fraud detection system that cross-references 20 APIs with millisecond latency, currently, low code is not the right approach. The likelihood of low code meeting your needs scales inversely with the nicheness of the problem. If your task is generic, e.g., answer FAQs, lean on templates, if it is niche, e.g., predict rare equipment failures in nuclear plants, prepare to write code. Hybrid approaches. Hybrid systems leverage low code to manage routine tasks while reserving custom code for critical components. This blended strategy enables organizations to quickly prototype AI agents using low code tools while implementing niche functionalities using custom code wherever necessary. By adopting a hybrid approach, organizations can address specific needs that off-the-shelf solutions might not fully cover, ensuring that the resulting system is both robust and adaptable. One practical example is the development of a sales lead qualification agent. In this scenario, a low-code platform might initially be used to establish basic data flows, integrate with customer relationship management, CRM systems, and quickly set up communication channels. Once the foundational workflows are in place, developers can embed custom Python scripts to perform advanced analytics and decision making. For instance, a custom module can analyze historical sales data to adjust lead scoring dynamically, incorporate machine learning models to predict lead conversion probabilities, or execute filtering algorithms based on specific business rules. This tailored coding not only refines the agent's accuracy in qualifying leads, but also integrates seamlessly with broader enterprise systems. To achieve success with a hybrid approach, several best practices should be followed. 1. Modular design. Structure your project so that low-code components and custom code modules operate as independent yet interconnected units. This modularization ensures that each component can be updated, replaced, or scaled without impacting the overall system functionality. 2. Clear interface boundaries. Clear interfaces between the low code and custom coded components. Use well-documented APIs and data exchange formats to ensure smooth integration. This minimizes the risk of miscommunication between systems and reduces developer troubleshooting time. 3. Robust testing and monitoring. Implement cohesive testing strategies that cover both the low code workflows and the custom scripts. Continuous integration and automated testing help catch errors early. Additionally, set up monitoring tools to track performance metrics and identify potential bottlenecks or failures in real time. 4. Scalability Considerations. Plan for scalability from the outset. While low-code platforms often manage basic scaling automatically, custom code should be designed with scalability in mind. Use cloud-based services and containerization where appropriate to ensure that increased load or data volume does not compromise performance. 5. Documentation and Collaboration. Maintain thorough documentation that details how the low code components interact with the custom code. This practice supports future development efforts, facilitates knowledge transfer within teams, and ensures that maintenance remains manageable over time. In summary, hybrid approaches offer a balanced solution for organizations that need rapid deployment and customization. Hybrid is not a compromise. It is strategic arbitrage. Low code's efficiency for routine tasks can be harnessed, with the time saved reinvested in developing tailored logic that sets you apart. Full code agent development. Coding an agent from scratch offers extensive control and customization, letting developers create precise solutions for business requirements. This approach must be taken when off-the-shelf or low-code solutions simply fail to provide necessary flexibility or performance. Python has emerged as the language of choice for many full code projects due to its extensive ecosystem, readability, and ease of integration with various AI frameworks. Building from scratch with Python. Developing an agent fully in code begins with setting up the environment using Python. Developers typically leverage frameworks such as Flask or FastAPI for building APIs, along with libraries like requests for handling external API calls. The advantage of this approach is that it enables the creation of a tailored architecture where every component can be finely tuned and optimized. Core components of a full code agent. A well-designed full code agent comprises three core components memory, reasoning, and action. Memory. Memory in an agent refers to its ability to store and recall context over interactions. This can be achieved using in-memory data structures for short-term tasks or persistent databases like SQL Lite, PostgreSQL, or NoSQL solutions for long-term storage. Effective memory management is crucial for applications that require context awareness, such as conversational agents or systems that track user interactions over time. Reasoning. The reasoning component is responsible for decision making. This is where the integration of language learning models, LLMs, such as OpenAI's GPT, or other advanced machine learning models comes into play. Developers can use Python libraries like Hugging Faces Transformers to implement complex natural language processing tasks. Custom algorithms and logic can further refine the outputs from these models, enabling the agent to interpret inputs, process data, and generate intelligent responses. Action. Once an action is made, the agent must act. This involves triggering responses, interacting with databases, or making external API calls. Custom code can be written to manage these operations reliably, ensuring that actions are executed in a secure and efficient manner. This component is critical in scenarios where the agent needs to modify system states, trigger workflows, or provide real-time feedback. An example of full code development is the creation of data analysis agents. In such a scenario, an organization would need to automate the process of analyzing large data sets and generating custom reports. By developing a full code solution, developers can integrate Python libraries such as Pandas or NumPy for data manipulation, alongside visualization tools like Mapplotlib or CORN for rendering insights. The agent's memory component stores historical data and contextual information, while its reasoning component processes complex queries and patterns in the data. Finally, the action component automates the generation and distribution of customized reports. This comprehensive step ensures that the agent not only analyzes data accurately, but also adapts to evolving data patterns over time. Advanced features, Reflection and Planning. Beyond the core components, advanced features can elevate a full code agent from a basic tool to a sophisticated system capable of self-improvement and strategic operation. Reflection. Reflection involves the agent's ability to evaluate its past performance and outcomes. By implementing logging and feedback loops, developers can enable the agent to assess the effectiveness of its actions and decision-making processes. This self-assessment mechanism allows for iterative improvements and adjustments and strategies, ultimately leading to a more refined and efficient system. Planning Planning is the capability to execute multi-step tasks that require foresight and scheduling. By incorporating planning libraries or custom developed algorithms, an agent can manage sequences of actions that consider both immediate and long-term objectives. This is particularly useful in scenarios like supply chain management or strategic business planning, where sequential decision making and future state predictions are critical. Full code agent development offers the highest degree of flexibility and performance by allowing developers to build every aspect of the agent from the ground up. Although this approach requires more time and technical expertise compared to low-code alternatives, the resulting system is capable of handling complex, high-volume tasks with advanced features such as reflection and multi-step planning. For organizations with specific requirements and the resources to invest in bespoke development, full code solutions present an ideal path to achieving a highly optimized and adaptable AI agent. Choosing the right approach. CTOs and CIOs often face a critical decision, leverage low code solutions for rapid results, or invest in full code development for long-term gains. This decision can be framed as a multi-armed bandit problem, where each choice carries trade-offs. Below is a structured approach to evaluating the best path forward. Key variables to consider 1. Problem complexity. Tasks like sending follow-up emails after meetings are well suited for low code solutions. High complexity. Challenges such as predicting ICU patient deterioration using real-time vitals typically require full code development for precision and customization. 2. Technical debt tolerance. Low code solutions can introduce hidden technical debt. For example, a Shopify store relying on 50 Zapier automations may face significant risks if API changes occur. 3. Scaling trajectory. Consider whether your solution needs to manage significantly larger volumes of data or users in the future. Custom code often provides cleaner scalability for high growth scenarios. Conclusion. The future where code and no code converge. A gentic AI architecture presents a spectrum of development strategies, from low code rapid prototyping to full code custom solutions, each with its distinct advantages. The distinction between low code and full code is becoming increasingly blurred. Platforms such as Replit now allow for in-browser code editing, while technologies like ChatGPT can generate Python scripts from natural language prompts. In the future, a CTO might simply describe an agent in plain English, observe AI scaffold the situation, and then manually fine tune the code to deliver the solution.

People on this episode