Generative Workflow Engine™: Building Ema’s Brain
banner
September 11, 2024, 19 min read time

When designing Ema's agentic OS, we faced a fundamental challenge: How do we create an AI system that thinks and acts like a human and works collaboratively with other human employees? Traditional workflow engines couldn't meet our ambitious goals, so we developed the Generative Workflow Engine™ (GWE).

Just as the prefrontal cortex serves as the brain's executive center, orchestrating complex cognitive functions, the Generative Workflow Engine™ (GWE) acts as the central command of Ema's agentic operating system. In this role, GWE functions as a sophisticated planner, executor, monitor, and optimizer, coordinating the activities of specialized agents much like how the prefrontal cortex manages various brain regions. This parallel structure allows for high-level decision-making, adaptability, and continuous improvement, mirroring the human brain's remarkable ability to tackle complex challenges and learn from experience. It coordinates various AI agents, each with unique expertise, to form an intelligent agent mesh capable of tackling complex tasks.

This revolutionary approach goes beyond the simple task automation of conventional workflow engines, which have been used in enterprise applications for decades. Unlike conventional workflow engines, GWE leverages built-in small language models to generate and orchestrate workflows with runtime context awareness and intelligence. By orchestrating these diverse components, GWE empowers Ema to navigate a wide range of scenarios across various industries, from customer service to internal productivity applications, with unprecedented efficiency and accuracy.

GWE operates in two phases: build time and run time. At build time, GWE takes AI Employee information and creates the agent mesh. At run time, it orchestrates the agent mesh to execute the tasks of the AI Employee. Its primary responsibilities include:

At Build Time

  • Create workflows to solve a problem: Given a high-level goal, GWE generates an appropriate agentic workflow to tackle the problem.
  • Recruit agents: Identify and select the most suitable agents for specific tasks in the workflow.
  • Configure the agent mesh: Establish interconnections between agents and provide initial configuration instructions.
  • Train agent mesh using customer's data: Customize the collective intelligence of the agent network by incorporating and learning from customer-specific data and patterns.

The resulting agent mesh serves as the dynamic, runtime incarnation of the AI Employee, bringing its capabilities to life in real-time. Interestingly, the build process for an agent mesh in GWE closely parallels human organizational processes:

  • Job Description: Begin with a high-level goal and decide the capabilities of the underlying agent mesh, akin to a manager creating a detailed job description.
  • Recruitment: GWE generates an agent mesh based on this description, mirroring the recruitment of a new employee.
  • Onboarding: Setting up the agent mesh is akin to configuring an employee's access to various systems and resources.
  • Training: The process of training the agent mesh corresponds to the training and skill development of human employees.

At Run Time:

  • Orchestrate agent mesh: Coordinate the activities of multiple agents in real-time, ensuring seamless collaboration and efficient task execution.
  • Evaluate quality and performance of the agent mesh and agents: Continuously assess the effectiveness of both individual agents and the overall network, identifying areas for improvement.
  • Coach agents: Provide feedback and guidance to individual agents, enhancing their performance and adapting their behaviors based on observed outcomes.
Hero Banner

Building an agentic mesh

GWE offers multiple approaches to create and refine the Agent Mesh, catering to different user preferences and levels of technical expertise:

  1. Conversational Creation: Similar to describing a job to a hiring manager, users can outline the desired functionality conversationally. GWE interprets this natural language input to generate an appropriate agent mesh.
  2. GUI-Based Design: For those who prefer visual control, GWE provides a graphical interface to visualize the structure of the agentic mesh. This allows precise placement of agents and definition of their communication pathways, offering a hands-on approach to mesh design.
  3. Direct Configuration: Advanced users can edit the JSON configuration file directly, providing the highest level of control over the mesh structure and agent properties.
  4. Iterative Refinement: Importantly, these methods are not mutually exclusive. Users can start with one approach and seamlessly switch between methods as needed. This flexibility allows for iterative refinement, combining the intuitive nature of conversational input with the precision of GUI or direct configuration.

GWE acts as a sophisticated planner, creating a workflow to achieve user-defined goals by coordinating various AI agents into an intelligent mesh. While GWE guides this process, human approval is required to finalize the agent mesh, ensuring alignment with intended goals and specific requirements.

Ema’s AI agents

Think of agents as specialized individuals within Ema's ecosystem, each possessing unique expertise. These agents have access to a wide array of knowledge, skills, reasoning abilities and actions that allow them to interact with various applications effectively. While these capabilities work in harmony, each has its own unique characteristics and degrees of flexibility.

Focused and specialized, not general purpose

In the field of artificial intelligence, it's tempting to build all-in-one agents, but our Generative Workflow Engine™ focuses on specialization. Our agents are designed to be experts in specific tasks, not generalists. Our approach of using specialized agents offers several key advantages:

  • Expertise: Each agent maintains a high level of competence in its designated area, ensuring tasks are handled with maximum efficiency.
  • Explainability: Specialized agents make it easier to trace and understand the decision-making process, enhancing the system's transparency.
  • Reusability: Agents can easily be used for similar tasks by different AI employees, increasing overall system efficiency.
  • Scalability: The system can be expanded by introducing new specialized agents as needed, without disrupting existing functionalities.
  • Modularity: Specific functionalities can be updated or enhanced without affecting the entire system.

This specialized approach mirrors human organizations, where teams of experts collaborate on complex tasks. Our research has shown that this structure outperforms a single, monolithic entity in handling multifaceted challenges, resulting in improved overall effectiveness, and enhanced reliability of the agentic mesh.

Here are some examples of agents in Ema’s agent library:

  • Document Parser: Expertly extracts and interprets information from various document types.
  • Researcher: Efficiently gathers and synthesizes information from diverse sources.
  • Rule Extractor: Extract rules from a given document.
  • Rule Validator: Given a set of rules and content, it validates whether the rules are met or not.
  • Writer: Creates original content, based on given parameters.
  • Coder: Specializes in writing, debugging, and optimizing code across different programming languages.
  • Responder: Crafts appropriate and context-aware responses in conversational scenarios.
  • Action Executor: Execute action in a given system of record, for example, “close the ticket in Zendesk” or “send an email to prospective customer”.
  • Evaluator: Reviews tasks, such as validating data analysis results or cross-checking complex reports.

Knowledge, Skills and Actions

Our agents are capable of understanding enterprise knowledge bases, acquiring new skills and taking actions in the enterprise.

Knowledge

Agents can quickly retrieve relevant information from our knowledge bases, enabling them to provide responses and take actions that are grounded in accurate enterprise data. This capability helps eliminate the risk of hallucinations, ensuring that the information shared with users is reliable and trustworthy.

Skills

Our agents are equipped with a variety of essential skills, including intent detection, synthesis, summarization, reasoning, language understanding, and presentation. These skills are powered by EmaFusion™ - our proprietary mixture of experts model combining the reasoning power of 2T parameters over 100+ LLMs. Agents have access to all the skills and they can adapt their skill usage based on the context of the task, the user's preferences, or the specific requirements of a given scenario, ensuring optimal performance across different situations.

Actions

When needed, agents can perform specific actions within our systems, such as invoking APIs, triggering processes, and interacting with external systems. This ability to execute actions empowers our agents to complete tasks efficiently and deliver comprehensive service to users.

Reasoning Ability

Every Ema agent has reasoning ability powered by EmaFusion™. These reasoning skills function as an agent's brain, providing situational intelligence and enabling them to:

  • Process information and decide on actions needed to achieve their objective using a chain of thought reasoning.
  • Request assistance from the Generative Workflow Engine™ (GWE) when needed.
  • Seek human intervention in appropriate situations - ensuring sensitive decisions receive appropriate oversight.

Agentic communication

Agents within a mesh communicate with each other through both conversational and programmatic means. This dual-mode communication system offers several key advantages:

  • Human-like problem-solving and reasoning: The conversational aspect allows agents to engage in dialogue-style problem-solving, mimicking human thought processes and decision-making patterns.
  • GWE monitoring: Natural language communication makes it very easy for GWE to monitor the interactions between agents and change agent instructions and prompts.
  • Flexibility: Agents can adapt their communication style based on the task at hand, switching seamlessly between natural language interactions and structured data exchanges.
  • Enhanced observability and explainability: The transparency of agent interactions, particularly in conversational mode, makes it remarkably easy to trace the flow of information and decision-making processes within the agent mesh.
  • Efficient data transfer: Programmatic communication enables rapid and precise exchange of complex data structures when needed, enhancing overall system performance.

Adaptive Learning and Optimization

The Generative Workflow Engine™ (GWE) is designed with advanced capabilities that allow it to learn, adapt, and optimize its performance over time. Here are three key features that make GWE a powerful and evolving system:

Long Term Memory (LTM)

GWE maintains a sophisticated long-term memory. This LTM encompasses the context of the GWE, its agents, configurations, and instructions received from humans. By synthesizing and storing this information, GWE can apply learned patterns to future tasks. For example, it might remember to always use formal language in responses or to avoid sending requests during weekends, based on previous instructions.

Learning from Human Feedback

Similar to a new employee learning on the job, GWE has built-in capabilities to receive and learn from human feedback. Using Reinforcement Learning from Human Feedback (RLHF), GWE can adjust its behavior, tweak ML models, and update its LTM. This feedback is then passed to the right agents in the mesh, allowing each to improve their specific tasks. Unlike human employees who may take weeks or months to learn, the agent mesh can adapt in minutes to hours, significantly accelerating the learning process.

Continuous Optimization

GWE doesn't just learn; it actively optimizes its performance. By monitoring inter-agent interactions and incorporating human feedback, GWE can suggest improvements to both individual agents and the overall mesh structure. This might involve adjusting agent instructions, such as prioritizing certain knowledge bases or employing more robust evaluation mechanisms. GWE can also recommend structural changes to the agent mesh, like adding new agents or reconfiguring the mesh flow for better accuracy. This ongoing optimization process, guided by GWE and overseen by humans, ensures that the system continually evolves to meet changing requirements and improve its performance in any given task.

Through these capabilities, GWE creates a dynamic, adaptive system that becomes more efficient and effective over time, always striving to deliver optimal results.

Bringing it all together: Ema’s AI Employees

Here is an example of an agent mesh for an AI Employee writing Business Proposals:

Problem Statement:

Business proposal writing teams take an RFP (Request for Proposal), understand the requirements and write-up a completed proposal. These documents are often 200+ pages long and need hundreds of human hours scavenging through thousands of other documents to synthesize the right content.

Ema’s AI Employee:

Ema’s Business Proposal Writer AI Employee can generate responses to a new RFP in just minutes saving enterprises thousands of person-hours and enabling them to grow their topline without growing headcount. While the actual product for Business Proposal Writer uses a far more complex Agent Mesh, we illustrate with a simplified example below:

Hero Banner
  • A document parser extracts key sections: Introduction, Scope of Work, Vendor Requirements, Evaluation Criteria, and Submission Guidelines.
  • Rule extractor generates initial rules, such as vendor experience, project timeline, and budget ceiling, calling for human input on cybersecurity compliance.
  • Researcher agent gathers data on previous RFPs, best practices, and market rates, ensuring relevance and reliability.
  • Writer agent drafts the RFP, ensuring consistency and identifying gaps.
  • Rule validator reviews for accuracy and requests human validation on unclear budget details.
  • Writer revises sections based on feedback.
  • Responder agent finalizes the document, incorporating revisions and ensuring formatting consistency.
  • Action executor sends the final document to stakeholders for approval.

During this process, the agents leverage their reasoning and evaluation skills to produce a final RFP document in minutes, relying on human input for critical decisions and feedback to enhance their performance.

Ema’s Business Proposal Writer is already in use across enterprises, saving thousands of man-hours. Here is a visual representation of Ema’s Business Proposal Writer in action.

Revolutionizing Automation with Ema’s Agentic Platform

Ema’s Agentic Platform is set to transform your workforce and drive value across numerous use cases. At its core is the Generative Workflow Engine™ (GWE), a groundbreaking tool for complex problem-solving—not just another task automation tool. GWE orchestrates, monitors, and optimizes intricate networks of AI agents, designed to tackle multifaceted challenges across industries and functions. With a powerful agent library, GWE creates new AI employees capable of addressing a wide range of enterprise automation needs.

These agents go beyond simple information processing. Equipped with vast knowledge bases, reasoning capabilities, and the ability to execute actions, they offer a new level of problem-solving. Their strong reasoning skills help them navigate complex scenarios, make informed decisions, and deliver innovative solutions. EmaFusion™, a pioneering technique for integrating public and private models, empowers these agents to perform tasks with high accuracy at minimal cost. Additionally, with Reinforcement Learning from Human Feedback (RLHF) and a sophisticated Long-Term Memory (LTM) system, the agents continuously adapt and evolve, creating a dynamic AI ecosystem.

Our enterprise clients are already benefiting from pre-built AI employees for customer support, employee experience, sales and marketing, legal and compliance and a variety of other areas. They also use the platform to custom-build AI employees tailored to their specific needs.

Ema supports both multi-cloud and on-premises deployments, with a strong emphasis on security and compliance, including SOC 2, ISO 27001, HIPAA, NIST, and GDPR standards. Ema offers a highly performant, flexible, and trusted Agentic AI platform that delivers exceptional value to your enterprise.

Hire Ema to transform your enterprise and discover what you can achieve.