Skip to content

Agent Execution Lifecycle Flow

Quick Reference

This document outlines the step-by-step lifecycle of an agent executing a task within the CodyMaster framework.

Execution Flow

The following diagram illustrates the sequence of events from task inception to completion.

mermaid
sequenceDiagram
    participant User
    participant CLI as CM CLI
    participant Dispatch as Agent Dispatch
    participant Memory as Context DB
    participant Agent as LLM Agent

    User->>CLI: cm sprint start
    CLI->>Dispatch: Initialize Task
    Dispatch->>Memory: Load Context & Memory
    Memory-->>Dispatch: Context loaded
    Dispatch->>Agent: Prompt & Skills
    Agent-->>Dispatch: Code Changes
    Dispatch->>Memory: Save Learnings
    Dispatch-->>User: Task Complete

Diagram Description

  1. The User initiates a sprint via the cm CLI.
  2. The CM CLI forwards the request to Agent Dispatch.
  3. Agent Dispatch fetches the project memory from the Context DB.
  4. The LLM Agent generates code based on the prompt and skills.
  5. Learnings are saved back to the Context DB, and the user is notified.

Error Handling

If the agent fails to generate valid code, the Guardian pipeline intercepts the output and requests a retry.

CodyMaster — AI-assisted engineering toolkit