# I don't prompt agents anymore...

## Executive summary

The video clarifies that 'graph engineering' primarily refers to building **Control Graphs**, which are structured workflows or SOPs designed to make AI agents reliable and predictable. The speaker details three primary methods for implementing these graphs: using dedicated code frameworks (like `LangGraph` or Dynamic Workflow), leveraging the LLM itself as the orchestrator, or employing agent-to-agent communication patterns. Implementing robust graphs requires defining clear nodes/edges, managing state artifacts, and crucially, integrating deterministic tools like verifiers and scripts to ensure reliability.

## Key takeaways

- Focus on Control Graphs: The term 'graph' is often misused; the practical focus should be on **Control Graphs**—workflows that enforce SOPs for reliable agent execution. This is distinct from Knowledge Graphs or Graph of Loops (though the latter is a new, complex area).
- Implement Reliability Layers: For any automated process, setting up a dedicated 'verifier' skill/agent node is critical to building confidence and ensuring the agent's output meets expected standards.
- Choose Your Graph Implementation Method: Graphs can be enforced via: 1) **Code-as-Graph** (using tools like Dynamic Workflow or `LangGraph`), 2) **Large Model as Graph** (defining SOPs in text/JSON for the LLM to follow), or 3) **Agent Teams** (an orchestrator agent managing a team of specialized agents).
- Best Practices for Workflow Design: To maximize reliability, always define clear inputs and outputs for each node. Use dedicated scripts/code for complex data fetching or deterministic steps rather than relying solely on the LLM.

## Technical details

- Control Graph Definition: A control graph represents a dynamic workflow (SOP) that ensures agents achieve reliable results, moving beyond simple human prompting. This is the core concept Peter was referring to.
- Agent Workflow Patterns: Two major patterns are emerging: **Loops** (triggered by time, event, or goal for continuous optimization) and the **Orchestrator Pattern** (where a central agent manages context and spins up teams of specialized agents).
- Code-as-Graph Implementation: Uses dedicated frameworks like Dynamic Workflow from Cloud Code or `LangGraph`. It defines nodes (actions), edges (next steps), and state (data carried over). Example: A 'ship change workflow' that progresses through Setup, Implement, and Verify phases using JavaScript primitives.
- LLM as Graph Implementation: The process is defined by a structured SOP (e.g., in text or JSON) which the LLM follows iteratively. Example: Andrew Copsy's auto research project, where the agent continuously updates and evaluates a script (`train.py`) based on metrics until improvement is achieved.
- State Management: Regardless of the graph type, maintaining state is crucial. This can be done by having an artifact store (like a markdown file) or using structured output schemas to pass context between nodes/agents.

## Practical implications

- Build engineers can move beyond simple prompt engineering by implementing structured, multi-step workflows (Control Graphs).
- The concept of dedicated 'verifier' nodes must be integrated into any automated pipeline to ensure output quality.
- Using code primitives (JavaScript/APIs) for data fetching and deterministic steps significantly increases the reliability and speed of agent automation compared to relying solely on LLM reasoning.

## Topics

Graph Engineering, Agent Orchestration, Workflow Automation, LangGraph, Dynamic Workflow, SOP, HubSpot Cloud Code Playbook, AI Builder Club Workshop

Source: https://www.youtube.com/watch?v=_9OT25ZvrWs
