Caylent Accelerate™

Getting Started with Agentic Workflows

Generative AI & LLMOps

Learn the fundamentals of agentic workflows, covering design considerations, key AWS tools, and explore a step-by-step guide for building your first workflow using Amazon Bedrock.

Agentic workflows mark a paradigm shift from traditional generative AI systems, which rely on a single, monolithic model to perform all aspects of a task. By linking multiple AI models together, each specialized in distinct functions, agentic workflows enable the creation of sophisticated application architectures that can tackle complex problems. This approach moves beyond the limitations of isolated Large Language Models (LLMs), opening up a new realm of possibilities for application design. Understanding how to plan, design, and build an agentic workflow is becoming increasingly important for effectively leveraging the full potential of modern AI technologies.

In this blog, we’ll explore the fundamentals of agentic workflows. We'll dive into the planning and design considerations, examine the key AWS tools that you can use for their creation, and walk through the foundational steps to build your first agentic workflow using Amazon Bedrock.

Planning for Agentic Workflows

Effective agentic workflows are born from careful planning and a clear understanding of their purpose and design principles. Before diving into development, it's essential to establish what these workflows are intended to achieve and what strategic considerations should guide their architecture. This may sound similar to gathering traditional software requirements, but in agentic workflows, it's even more critical because you're defining the axis of decomposition: how the system breaks the overall task into agent-specific responsibilities.

Why use an agentic workflow?

At its core, an agentic workflow is an advanced AI execution framework. It structures a series of connected steps that are dynamically executed by one or more AI agents to achieve a specific goal. In this context, an AI agent is an intelligent entity powered by a foundation model, often a large language model (LLM). These agents can receive inputs, reason about them to understand the context, and make informed decisions. They can also formulate plans to achieve objectives and execute actions using a predefined set of available tools, such as APIs, databases, knowledge bases, or code interpreters. Furthermore, agents can maintain a persistent memory, allowing them to learn from past interactions and retain context over time.

The primary purpose of an agentic workflow is to break down complex tasks into smaller, more manageable sub-tasks. Each sub-task can then be assigned to a specialized AI agent or model optimized for that particular function. For instance, in a sophisticated customer support system:

  • One agent might be responsible for initial input processing, understanding the user's language, and identifying their intent.
  • Another agent, specialized in information retrieval, could then query a knowledge base containing product documentation or search external APIs for real-time data.
  • A third agent might synthesize this information, perhaps considering the user's history from the agent's memory, to formulate a comprehensive and contextually appropriate response.

This division of tasks offers several key benefits:

  • Handling Complexity and Specialization: By decomposing problems, agentic workflows can tackle tasks that would be too multifaceted or demanding for a single AI invocation to handle. Specialized models typically outperform general-purpose models on the specific tasks for which they are trained or fine-tuned, resulting in higher quality and more efficient processing.
  • Overcoming Single-Model Limitations: Individual LLMs, despite their advancements, have inherent constraints including finite context windows, the potential for generating incorrect information (hallucinations), and a lack of direct access to real-time or proprietary data. Agentic workflows mitigate these issues by distributing the cognitive load and equipping agents with tools, such as Retrieval Augmented Generation (RAG), for accessing external knowledge, thereby grounding responses in factual data.
  • Enhanced Application Design: This approach allows for the design of more robust, flexible, and intelligent AI applications. You are no longer confined by the capabilities of a single model; instead, you can orchestrate a team of models, each contributing its unique strengths.
  • Adaptive and Self-Evolving Processes: A powerful aspect of some agentic workflows is their capacity for reflection and iteration. Agents can be designed to assess the results of their actions at each step, reflect on outcomes, adjust their plan if necessary, and iterate until a satisfactory outcome is achieved. This allows workflows to become responsive, adaptive, and, to some extent, self-evolving processes, improving their performance over time.

What to consider when planning agentic AI design

Designing an effective agentic workflow requires thoughtful consideration of how different components will interact and which models are best suited for each part of the process.

How will models work together?

The collaboration between AI agents is a cornerstone of agentic design. A central mechanism for managing these collaborations is orchestration. An orchestrator, often a designated supervisor agent, directs the overall workflow, assigns tasks to specialist agents, and manages the flow of information between them. When designing these interactions, you need to define:

Interaction Patterns: The way agents collaborate can take several forms:

  • Supervisor-Worker Pattern: A common model where a supervisor agent breaks down a complex problem, delegates sub-tasks to specialized worker agents, monitors their progress, and synthesizes their results.
  • Sequential Pipeline: Agents process information in a sequence, with the output of one agent becoming the input for the next. This is suitable for tasks with clear, ordered steps.
  • Parallel Processing: Multiple agents work on different sub-tasks concurrently, with their results later aggregated. This can significantly improve efficiency for tasks that can be parallelized.
  • Event-Driven Interactions: Agents react to events or messages published by other agents or external systems. This leads to a more dynamic and decoupled workflow, suitable for environments where changes occur unpredictably.

Data Flow and Communication: How will information be passed between agents? Standardized data formats (like JSON) are common for ensuring compatibility. For large data payloads, such as documents or extensive query results, consider mechanisms like payload referencing. This involves passing pointers to data stored in a shared location (e.g., Amazon S3) rather than transmitting the entire data object with each interaction. This practice significantly reduces communication overhead, latency, and cost.

Task Decomposition and Use Case Segmentation: The first practical step in designing the collaboration is to break down your intended use case into logical segments. Analyze the end-to-end process and identify distinct stages or sub-processes that can be mapped to different AI models or specialized agents. Common task decomposition strategies include:

  • Functional Decomposition: Identify distinct functions or capabilities required. For example, an e-commerce order processing workflow might be decomposed into agents for input validation, inventory checking, payment processing, and shipping arrangement.
  • Sequential Decomposition: If the problem involves a series of steps that must be performed in a particular order (e.g., research report generation: topic clarification -> information retrieval -> summarization -> drafting -> review).
  • Parallel Decomposition: Identify sub-tasks that can be performed concurrently (e.g., in travel planning, simultaneously searching for flights, hotels, and activities).
  • Hierarchical Decomposition: For very complex problems, tasks are broken into primary sub-tasks, which are further decomposed. A supervisor agent might manage top-level tasks, delegating to specialist agents, which, in turn, might orchestrate even more specialized sub-agents or tools. An example of use case segmentation could be an application that analyzes customer feedback, involving an agent for voice transcription, another for sentiment analysis, a third for topic categorization, and a final one for summarizing the findings.

Assigning the right model to the right task

Once tasks are decomposed, selecting the appropriate AI model for each role is vital. This involves model specialization and careful evaluation.

Evaluate Different Models: The AI landscape offers a diverse range of models, each with varying strengths. It's important to evaluate models based on their performance for the specific tasks they will be responsible for.

Performance Criteria: Key criteria for model selection include:

  • Accuracy and Quality: How well the model performs the specific task (e.g., correctness of information, factual consistency, quality of generated content like summaries or code).
  • Latency: The time taken to generate a response. Low latency is especially important for interactive, user-facing applications.
  • Cost: The expense associated with using the model, often measured per processed token (input and output) or per inference call.
  • Context Window Size: The amount of information (text, images, etc.) the model can process at once. Larger context windows can be beneficial for tasks requiring understanding of extensive preceding dialogue or large documents.
  • Customization Capabilities: Whether the model can be effectively fine-tuned with your own data to improve performance on specialized tasks or easily integrated with Retrieval Augmented Generation (RAG) for accessing external knowledge.
  • Responsible AI Features: Availability of features or inherent characteristics that support responsible AI development, such as resistance to generating harmful content or transparency in how it might have arrived at an answer.

Leverage Specialized Models: Services like Amazon Bedrock provide access to a wide array of foundation models. For example, within the Amazon Nova family of models, exclusive to Amazon Bedrock, different variants are optimized for various purposes – from Amazon Nova Pro for highly complex reasoning, planning, and multimodal understanding, to Amazon Nova Lite for tasks that require strong performance with greater cost-effectiveness. Choosing the right model for each agent ensures that every part of your workflow operates efficiently and effectively. Amazon Bedrock also provides model evaluation tools, allowing you to systematically compare different FMs using automatic evaluations against curated or custom datasets, human evaluation workflows for subjective metrics, or even using a powerful LLM as a judge. This helps in making data-driven decisions for model selection.

Careful planning in these areas, considering both the collaborative structure and the individual strengths of the models, lays a solid foundation for building powerful and efficient agentic workflows.

Tools for agentic workflows

Building sophisticated agentic workflows within the AWS ecosystem is made significantly easier than building from scratch, thanks to the availability of foundational models, development environments, and specialized data stores necessary to bring complex AI applications to life.

Here are some of AWS's key offerings for agentic workflow development:

Amazon Bedrock

Amazon Bedrock is a fully managed service that simplifies the development of generative AI applications by providing access to a broad selection of high-performing foundation models (FMs) from leading AI companies, as well as AWS's own models, through a single, unified API. This dramatically accelerates experimentation and deployment, as developers don't need to manage any underlying infrastructure. Key FMs available through Amazon Bedrock include those from:

  • AI21 Labs (e.g., Jurassic, Jamba)
  • Anthropic (e.g., Claude family, including advanced models like Claude 3.5 Sonnet and Claude 3.7 Sonnet)
  • Cohere (e.g., Command, Embed)
  • DeepSeek
  • Luma AI
  • Meta (e.g., Llama family)
  • Mistral AI (e.g., Mistral, Mixtral)
  • Stability AI (e.g., Stable Diffusion)
  • AWS (e.g., Titan family for text, embeddings, and image generation; and the Amazon Nova family, offering frontier intelligence and leading cost-performance exclusively on Amazon Bedrock, with variants suited for text generation, chat, image understanding, and more).

Amazon Bedrock allows you to not only access these models but also to test them extensively in interactive playgrounds, evaluate their performance for your specific use cases, and customize them. Capabilities include fine-tuning models with your own data for improved performance on specialized tasks and implementing Retrieval Augmented Generation (RAG) by connecting models to your company's data sources via Knowledge Bases for Amazon Bedrock

Critically for this discussion, Agents for Amazon Bedrock is a feature that enables you to build applications that can understand user requests, break them down into tasks, make API calls to enterprise systems and data sources through action groups, query knowledge bases, and orchestrate these steps to fulfill requests. This provides the core engine for many agentic workflows on AWS. Furthermore, Amazon Bedrock incorporates Guardrails, which allow you to implement safeguards for responsible AI. You can define policies to filter harmful content, remove personally identifiable information (PII), or restrict agents to specific topics, helping ensure your AI applications operate within desired ethical and safety boundaries. For more information, visit https://aws.amazon.com/bedrock/.

Amazon SageMaker Studio

Amazon SageMaker Studio is a comprehensive, web-based integrated development environment (IDE) designed for the full lifecycle of machine learning development on AWS. While Amazon Bedrock provides managed access to pre-trained and customizable FMs, Amazon SageMaker Studio offers a broader suite of tools for data scientists and ML engineers who may need to build, train, and deploy custom models from scratch or perform intricate MLOps tasks. Amazon SageMaker Studio supports:

Amazon SageMaker Studio can complement Amazon Bedrock in an agentic workflow in several ways. For instance, if an agent requires a highly specialized model with unique architectural needs not covered by Amazon Bedrock's offerings, Amazon SageMaker can be used to train or fine-tune that model. This custom model can then be deployed on an Amazon SageMaker endpoint and integrated into a Bedrock-orchestrated agentic workflow via an action group that calls the Amazon SageMaker endpoint. Amazon SageMaker also provides advanced MLOps capabilities that can govern the lifecycle of custom components within a larger Bedrock-managed agentic system. Increasingly, AWS is unifying these experiences, allowing Amazon Bedrock functionalities to be accessed within the Amazon SageMaker Studio environment, providing a more integrated workspace for generative AI development.

Vector Databases

Vector databases are specialized databases engineered to efficiently store, manage, and search high-dimensional vector embeddings. These embeddings are numerical representations of data (text, images, audio, etc.) generated by AI models, capturing their semantic meaning and context. Their role in agentic workflows is primarily:

  • Powering Retrieval-Augmented Generation (RAG): Vector databases store embeddings of documents or data chunks from an organization's knowledge sources. When an agent needs to answer a query using RAG, it converts the query into an embedding and searches the vector database for the most semantically relevant stored information. This retrieved context is then provided to an LLM to generate a more accurate, factual, and context-aware response. Vector databases use Approximate Nearest Neighbor (ANN) search algorithms to perform these similarity searches rapidly and at scale, which is essential for responsive RAG systems.
  • Enabling Semantic Search: Allowing applications to search based on meaning and context rather than just keywords.
  • Facilitating Hybrid Search: Some vector databases, or search services with vector capabilities, support hybrid search. This technique combines traditional keyword-based (lexical) search with semantic vector search, often leading to more relevant and comprehensive results by capturing both exact matches and contextual similarity.

AWS offers several services that can function as or integrate with vector databases:

  • Amazon OpenSearch Service: A managed service for OpenSearch that includes robust k-Nearest Neighbor (k-NN) search capabilities, making it a powerful vector database solution. It supports various vector search engines and advanced features like hybrid search. Amazon OpenSearch Serverless is a common choice for Amazon Bedrock Knowledge Bases due to its ease of management.
  • Amazon Aurora PostgreSQL-Compatible Edition: This relational database service can function as a vector database through extensions like pgvector. This allows storing vector embeddings alongside existing relational data and leveraging SQL for combined queries. Amazon Bedrock Knowledge Bases support using Aurora PostgreSQL with pgvector as a vector store.
  • Other supported vector stores for Amazon Bedrock Knowledge Bases include Pinecone, Redis Enterprise Cloud, and MongoDB Atlas, offering flexibility based on existing infrastructure or specific needs.

These tools provide a robust foundation for constructing, managing, and scaling powerful agentic AI solutions on the AWS cloud.

Getting Started with Agentic AI

Navigating the complexities of agentic AI, from initial strategy through robust implementation and ongoing optimization, can be a significant undertaking. The challenges of designing effective multi-agent collaboration, ensuring data security and governance, managing costs, and debugging intricate interactions require specialized expertise. Caylent's teams of experts are dedicated to helping organizations like yours plan and implement effective agentic AI pipelines on AWS.

As an AWS Premier Services Partner with deep expertise in generative AI, Caylent can effectively guide you through the agentic development process, leveraging the full potential of AI agents. We help ensure that your agentic workflows are not just technologically impressive but are also strategically aligned with your organization’s core objectives, delivering the maximum possible value. Our approach focuses on building solutions that are scalable, secure, and cost-effective, enabling you to confidently adopt these transformative technologies.

You can explore our generative AI offerings further at Caylent Generative AI on AWS and learn about our strategic approach through initiatives like the AWS Generative AI Strategy Catalyst. Caylent’s guidance ensures that your investment in agentic AI translates into meaningful business outcomes, helping you overcome the inherent challenges and harness the full power of these advanced systems.

Generative AI & LLMOps
Guille Ojeda

Guille Ojeda

Guille Ojeda is a Software Architect at Caylent and a content creator. He has published 2 books, over 100 blogs, and writes a free newsletter called Simple AWS, with over 45,000 subscribers. Guille has been a developer, tech lead, cloud engineer, cloud architect, and AWS Authorized Instructor and has worked with startups, SMBs and big corporations. Now, Guille is focused on sharing that experience with others.

View Guille's articles

Learn more about the services mentioned

Caylent Catalysts™

Generative AI Strategy

Accelerate your generative AI initiatives with ideation sessions for use case prioritization, foundation model selection, and an assessment of your data landscape and organizational readiness.

Caylent Catalysts™

AWS Generative AI Proof of Value

Accelerate investment and mitigate risk when developing generative AI solutions.

Accelerate your GenAI initiatives

Leveraging our accelerators and technical experience

Browse GenAI Offerings

Related Blog Posts

Caylent Renews Strategic Collaboration Agreement with AWS to Deliver Industry-Specific GenAI Solutions

Creation of new industry principal strategists to shape go-to-market strategies and solutions to accelerate customer outcomes.

Caylent Announcements
Generative AI & LLMOps

Kiro: First Impressions

Discover our first impressions of Kiro, AWS's new agentic IDE that makes it easier for developers to go from prototype to production.

Generative AI & LLMOps

Modernizing Legacy Databases: 5 Common Challenges (and How to Overcome Them Faster)

Say goodbye to licensing costs like Oracle and SQL Server by migrating to open-source options on AWS. Caylent Accelerate™, our AI-powered solution, automates 70% of the work, reducing time, risk, and cost.

Generative AI & LLMOps