1. The Death of Prompt Maximalism: Why "Prompting Harder" Failed

In the early days of generative AI (2022 to early 2024), developers believed that nearly every limitation of large language models could be conquered with the "perfect prompt." If a model produced buggy code, the advice was to append "Think step by step". If it hallucinated nonexistent APIs, engineers layered on 500 lines of XML delimiters, few-shot examples, and stern warnings: <rules>NEVER invent a function that does not exist</rules>.

We called this era Prompt Maximalism. It produced brittle, 4,000-token system prompts that felt more like magic incantations than software engineering. And when applied to complex, multi-file software engineering tasks, it hit an impenetrable wall.

Consider a realistic developer challenge: upgrading a production Django app to version 5.2, resolving deprecated ORM queries across 14 modules, and migrating the database schema while maintaining 100% test suite parity.

If you hand this task to a state-of-the-art model in a single prompt—no matter how beautifully crafted—the probability of success is virtually zero. The model will write plausible-looking code, confidently tell you that the migration succeeded, and leave you with syntax errors, broken foreign key constraints, and failing tests.

The Fundamental Law of Open-Loop AI

In any non-trivial task requiring multiple discrete decisions, a system operating without verification feedback compounds errors exponentially:

P(Success) = pn

If a model makes 10 consecutive coding decisions with an outstanding 95% single-step accuracy (p = 0.95, n = 10), the end-to-end success rate of a single-shot prompt is only 59.8%. If n = 30 steps, the chance of reaching a working solution collapses to 21.4%.

Human software engineers do not write an entire software release blindfolded in one sitting. We write a function, run the compiler, check the terminal output, inspect unit test failures, fix the line where the off-by-one error occurred, re-run the tests, and only commit our code once every test passes cleanly.

This insight marks the defining transition of modern AI systems: moving from writing the next prompt to engineering the loop that prompts, acts, observes, verifies, retries, and stops.


2. What Is Loop Engineering? The Core Definition

In cybernetics and classical control systems, a closed-loop control system continuously measures its actual output, compares it against the desired reference goal, and uses the resulting error signal to adjust its control action. A thermostat is a closed loop; a simple timed space heater is an open loop.

In modern AI agent architecture, Loop Engineering is defined as:

The discipline of designing, orchestrating, constraining, and optimizing the stateful runtime loop that surrounds probabilistic foundation models — enabling the agent to autonomously execute tools, capture environment telemetry, verify correctness against deterministic criteria, backtrack from errors, and halt safely upon meeting verifiable stopping conditions.

Where prompt engineering focuses on what to say to the model, loop engineering focuses on the algorithmic harness that executes around the model. The model is merely a transient cognitive component inside a rigorous state machine.

Open-Loop vs Closed-Loop Engineering Architecture
Figure 2: Architectural comparison between fragile Open-Loop generation (single-pass) and robust Closed-Loop Engineering (iterative test-gated control).

Notice the fundamental difference: in an open-loop architecture, the human user is forced to be the test runner, linter, and retry loop. In a closed-loop system, the machine tests itself, observes its own errors, and attempts remediation autonomously before presenting a verified solution.


3. The Three Eras: Prompting → Context → Loops

To understand how we arrived at loop engineering, we must trace the evolutionary arc of generative AI development over the past four years. Each era addressed the insurmountable bottleneck of the era before it.

The Three Eras of AI Application Development: Prompt Engineering to Context Engineering to Loop Engineering
Figure 3: The progression from phrasing prompts (Era 1) to injecting retrieved chunks (Era 2) to architecting closed feedback loops (Era 3).

Era 1: Prompt Engineering (2022–2023) — The Natural Language Phase

In Era 1, developers interacted with LLMs as standalone black-box oracles. The tooling consisted of prompt templates, few-shot prompt libraries, and techniques like Chain-of-Thought (CoT) and ReAct (Reasoning + Acting).

The Bottleneck: The model had no access to external reality. It did not know what files existed on your local machine, could not query internal databases, and suffered from hallucinations that no amount of prompt tweaking could eliminate.

Era 2: Context Engineering (2023–2024) — The Information Retrieval Phase

To solve the hallucination bottleneck, the industry pivoted to Context Engineering. We built Retrieval-Augmented Generation (RAG) pipelines, vector search indexes (multimodal embeddings), semantic rerankers, and context-stuffing mechanisms across 128k to 1M token windows.

The Bottleneck: Context engineering provided relevant data, but the interaction remained passive and unidirectional. An LLM could read a documentation page or a code repository chunk, but if its generated code had a missing semicolon or an invalid import, the system had no way to discover the mistake. More context often exacerbated the "lost in the middle" phenomenon and inflated token costs without improving task completion.

Era 3: Loop Engineering (2025–2026+) — The Closed-Loop Feedback Phase

Era 3 recognizes that intelligence is an active, iterative process. In this paradigm, the primary job of the AI engineer is no longer writing the prompt or even fetching the context. It is building the execution environment, feedback telemetry, verification gates, state rollbacks, and circuit breakers that allow the agent to solve problems through self-correcting trial and error.

This is why real-world autonomous coding benchmarks like SWE-bench skyrocketed from a humble 3.8% resolution rate in late 2023 to over 65% in 2026. The underlying models certainly improved—but the dramatic leap in problem-solving capability was unlocked by engineering the loop.


4. Deconstructing The Loop: The 6 Critical Phases

Every production-grade loop engineering system revolves around six interconnected phases. If any single phase is weakly engineered, the entire agent degrades into unpredictability.

The 6 Essential Phases of Loop Engineering
  • Phase 1: Prompt (Intent & State Assembly) — Dynamically formulating the prompt from current system state, task objectives, and past iteration history.
  • Phase 2: Act (Deterministic Tool Execution) — Executing bounded, sandboxed actions (file modifications, bash execution, AST transforms).
  • Phase 3: Observe (Telemetry & Feedback Capture) — Capturing process return codes, compiler errors, stdout, stderr, and file diffs.
  • Phase 4: Verify (Multi-Tier Quality Gates) — Evaluating output against automated linters, type checkers, unit tests, and security scanners.
  • Phase 5: Retry (Error Backtracking & Compaction) — Pruning irrelevant history, rolling back corrupted files, and injecting actionable failure data.
  • Phase 6: Stop (Deterministic Halting & Circuit Breakers) — Terminating only upon verified completion, budget exhaustion, or cycle detection.

Phase 1: Prompt (Dynamic State & Intent Assembly)

In loop engineering, the prompt is never a static string copied from a notepad. It is a dynamically compiled snapshot of state. At iteration i = 0, the prompt contains the user's high-level requirement and repository overview. At iteration i = 3, the prompt contains:

  • The original objective and acceptance criteria.
  • The file diffs applied in previous iterations.
  • The exact compiler or pytest failure output observed during the last verification pass.
  • A structured reflection constraint: "Your previous patch failed with AttributeError: 'User' object has no attribute 'get_role'. Review line 42 of auth/service.py and propose a corrected edit."

Phase 2: Act (Deterministic Tool Execution)

The model does not simply print text; it emits structured tool invocations (JSON schemas or function calls). In modern developer agents (like AI harnesses, Cursor, Claude Code, and Antigravity), these tools include:

  • Selective File Replacement: Chunk-based find-and-replace rather than rewriting 1,000-line files from scratch, preventing accidental deletions.
  • Sandboxed Shell Execution: Running commands inside isolated Docker containers or ephemeral micro-VMs with CPU and network boundaries.
  • AST (Abstract Syntax Tree) Querying: Searching for symbol definitions and call hierarchies deterministically instead of guessing file paths.

Phase 3: Observe (Telemetry & Output Sanitization)

When a tool runs, the loop captures real-world environment telemetry. But raw telemetry can be catastrophic if fed back blindly. A npm test command might output 8,000 lines of verbose logs, completely blowing past the context window.

Observation Pruning: A well-engineered loop extracts only the relevant slice of telemetry—the specific assertion failure, file name, line number, and stack trace—while stripping noise. If the process timed out or was killed by an Out-Of-Memory (OOM) killer, the observation parser flags this explicitly to the agent.

Phase 4: Verify (Multi-Tier Quality Gates)

Verification is the intellectual heart of loop engineering. Without verification, an agent cannot know if its action brought it closer to the goal or drove it off a cliff.

High-reliability loops employ a hierarchy of verification gates:

  1. Level 1 — Syntax & Formatting: Does the file parse as valid JSON/Python/TypeScript? (e.g. running ast.parse() or eslint). Cost: ~5 milliseconds.
  2. Level 2 — Static Type Analysis: Do type checkers (mypy, tsc) pass without signature mismatches? Cost: ~200 milliseconds.
  3. Level 3 — Targeted Unit Testing: Do existing unit tests for the modified module pass? (e.g., pytest tests/unit/test_auth.py). Cost: ~1–3 seconds.
  4. Level 4 — Regression & Integration Testing: Does the broader test suite pass without collateral damage? Cost: ~10–30 seconds.
  5. Level 5 — Semantic / Critic LLM: A secondary model reviews the git diff against user requirements and security guidelines.

Phase 5: Retry (Backtracking & Error Reflection)

If a verification gate fails, what happens next? A naive loop simply adds the error to the chat log and asks "Try again". This rapidly causes doom loops where the model repeats the same mistake five times in a row.

A properly engineered retry mechanism implements:

  • Git Worktree Rollbacks: If an iteration leaves the repository in a corrupted or uncompilable state, the loop executes git checkout -- . to revert back to the last known green checkpoint before re-prompting.
  • Hypothesis Forcing: Requiring the model to articulate why its prior attempt failed before generating any replacement code.
  • Context Compaction: Summarizing or discarding failed tool outputs from 3 iterations ago so that ancient error logs do not confuse the current decision.

Phase 6: Stop (Deterministic Halting & Circuit Breakers)

How does the loop know when to terminate? Relying on the model to output "I have finished your task!" is notoriously unreliable—models frequently claim completion when tests are still failing or files remain untouched.

Stopping conditions must be programmatically enforced:

  • Success Exit: All verification gates pass (Test runner exit code 0, clean git status, zero lint errors).
  • Iteration Cap: Reaching a maximum loop limit (e.g., max_iterations = 10) triggers an immediate graceful stop.
  • Token / Budget Circuit Breaker: If token consumption exceeds a predefined dollar budget (e.g., $1.50), halt immediately to prevent runaway billing.
  • Cycle Detection: If the model generates identical tool calls or file diffs across two consecutive attempts, break the cycle and escalate to human review.

5. Prompt Engineering vs. Loop Engineering: The Comprehensive Comparison

The difference between these paradigms is not subtle. It represents the divergence between natural language crafting and systems engineering.

Dimension Prompt Engineering Context Engineering Loop Engineering
Primary Focus Phrasing, role personas, few-shot examples RAG retrieval, chunking, embeddings, context stuffing Execution state machine, test verification, retries, halting
Execution Model Single-shot (Open-loop) Single-shot with injected retrieval (Open-loop) Multi-turn closed-loop feedback cycle
Error Detection None (User manually spots bugs) None (User manually checks retrieved accuracy) Deterministic (Compilers, linters, unit tests, exit codes)
Failure Recovery User retypes prompt with more instructions User tweaks search queries or chunk sizes Automated git rollback, hypothesis reflection, retry gates
Context Management Static prompt window Vector top-k chunks injected passively Dynamic sliding window, tool output compaction, state pruning
Stopping Condition Model produces <|endoftext|> token Model finishes text generation Verification passes (exit code 0), iteration cap, or budget limit
Benchmark Metric MMLU, HumanEval (Single-turn functions) Needle In A Haystack, RAG Triad scores SWE-bench Verified, WebArena, multi-file resolution rates
Tooling & Stack LangChain, prompt templates, Playground Pinecone, Qdrant, LlamaIndex, pgvector Docker sandboxes, LangGraph, custom state machines, AST parsers

6. Inside Real-World Coding Agents: How Claude Code, Cursor, and Antigravity Engineer the Loop

When you watch modern developer agents solve real GitHub issues, build entire features, or debug complex distributed systems, you are watching loop engineering in action.

Case Study 1: The SWE-bench Revolution

SWE-bench is the gold standard benchmark for AI agents, testing whether an LLM can resolve real bug issues taken from popular Python repositories (Django, SymPy, scikit-learn, etc.).

When SWE-bench was introduced in late 2023, passing even 4% of issues seemed difficult. Early systems simply gave the issue description and codebase summary to GPT-4 in a single prompt.

By 2025 and 2026, state-of-the-art agent frameworks crossed 60%–70% resolution rates. How?

  • The SWE-agent ACI (Agent-Computer Interface): Instead of giving the model full bash access, Princeton researchers engineered custom tools (file viewer with line-number pagination, custom file search, syntax checker). The loop intercepted syntax errors before the model could proceed.
  • The "Reproduce First" Loop: The agent is first required to write a minimal reproducing test case that fails. It iterates until the reproduction test fails with the exact reported bug. Only then does it enter the implementation loop. Once its patch makes the reproduction test pass and existing unit tests pass, the loop halts.

Case Study 2: Claude Code & Cursor Agent Modes

In developer tools like Anthropic's Claude Code CLI and Cursor's Composer Agent, the outer loop provides an elegant developer experience:

  1. Planning Phase: The agent reads files, inspects directory trees, and drafts a structured plan without mutating code.
  2. Execution Phase: It applies targeted string replacements to files.
  3. Verification Phase: Behind the scenes, the tool runs project linters or invokes user-configured test commands (npm test, cargo check).
  4. Self-Correction: If the build breaks, the agent sees the compiler diagnostics in its observation stream and immediately issues a patch. If the user intervenes, the loop incorporates human feedback as an external observation.

7. Fatal Loop Failure Modes (And How to Prevent Them)

Designing autonomous loops introduces complex failure dynamics that never existed in classical prompt engineering. When loops go wrong, they do not just produce bad text—they burn money, corrupt repositories, and enter infinite cycles.

The 5 Fatal Loop Antipatterns

1. The Doom Loop (Repetition Spiral): The model encounters a missing dependency, runs pip install foo, receives a permissions error, and runs the exact same command 10 times in a row hoping for a different outcome.

2. Context Bloat & Needle Dilution: Dumping thousands of lines of raw terminal logs into the chat context pushes system instructions out of the model's active attention span, leading to cognitive degradation.

3. Thrashing & Oscillating Edits: The agent fixes test A, but breaks test B. In the next iteration, it fixes test B, but breaks test A. Without git diff memory, it oscillates between two mutually exclusive solutions forever.

4. The "Liar Agent" (Premature Hallucinated Completion): The model outputs "I have thoroughly tested this feature and everything is working perfectly!" even though the test command exited with code 1 or was never executed.

5. Runaway Budget Consumption: An agent with an unbounded iteration count gets stuck debugging an obscure edge case overnight, consuming hundreds of dollars in API credits on a single trivial issue.

Architectural Defenses Against Loop Failures

Failure Mode Root Cause Loop Engineering Defense
Doom Loop Model fails to realize it is repeating identical failed actions Action Hashing & Cycle Detector: Hash tool names + parameters. If hash matches an attempt from the last 3 steps, trigger an immediate reflection intercept.
Context Bloat Terminal stdout/stderr exceeds token capacity Telemetry Compaction: Truncate outputs to head/tail (first 20 lines, last 40 lines) and extract only lines containing ERROR: or FAILED.
Thrashing Agent lacks global regression visibility Global Test Gate + Checkpoint Rollback: Never commit an iteration unless both new and existing test suites pass. Revert to last green commit on regression.
Liar Agent Model's polite conversational training biases it toward claiming success Hard Verification Enforcer: Treat the model's text as untrusted. The loop only terminates if the test runner's system process returns exit code 0.
Runaway Cost Unconstrained while-loops without resource budgets Hard Circuit Breakers: Fixed max_iterations = 12, cumulative token budget cap (e.g. max_cost = $2.00), and wall-clock timeout.

8. Practical Implementation: Building a Production-Grade Agent Loop in Python

Let's look at how loop engineering is implemented in real code. Below is a production-style, standalone Python agent loop that demonstrates state tracking, tool execution, test verification, cycle detection, and circuit breakers.

production_agent_loop.py Python 3.12+ • Production Architecture
import hashlib
import subprocess
from dataclasses import dataclass, field
from typing import List, Dict, Any, Optional

@dataclass
class LoopState:
    objective: str
    iteration: int = 0
    max_iterations: int = 8
    history: List[Dict[str, Any]] = field(default_factory=list)
    action_hashes: List[str] = field(default_factory=list)
    is_complete: bool = False
    exit_reason: str = ""

class AgentLoopEngine:
    def __init__(self, workspace_path: str, test_cmd: str):
        self.workspace = workspace_path
        self.test_cmd = test_cmd

    def compute_action_hash(self, action: Dict[str, Any]) -> str:
        """Prevent doom loops by fingerprinting tool calls."""
        serialized = f"{action.get('tool')}:{action.get('args')}"
        return hashlib.sha256(serialized.encode()).hexdigest()

    def run_verification(self) -> tuple[bool, str]:
        """Deterministic verification gate: Executes real project tests."""
        try:
            res = subprocess.run(
                self.test_cmd,
                shell=True,
                cwd=self.workspace,
                capture_output=True,
                text=True,
                timeout=30
            )
            passed = (res.returncode == 0)
            # Compact telemetry to keep context window clean
            output = res.stdout if passed else (res.stdout[-1200:] + "\n" + res.stderr[-800:])
            return passed, output
        except subprocess.TimeoutExpired:
            return False, "ERROR: Verification test command timed out after 30s."

    def execute_tool(self, tool_name: str, args: Dict[str, Any]) -> str:
        """Deterministic execution of bounded file and shell tools."""
        if tool_name == "replace_file_chunk":
            filepath = args["filepath"]
            with open(filepath, "r") as f:
                content = f.read()
            if args["target"] not in content:
                return f"ERROR: Target content not found in {filepath}"
            updated = content.replace(args["target"], args["replacement"], 1)
            with open(filepath, "w") as f:
                f.write(updated)
            return f"SUCCESS: Updated {filepath}"
        return f"ERROR: Unknown tool {tool_name}"

    def run(self, state: LoopState) -> LoopState:
        """The Master Closed-Loop Control Cycle."""
        print(f"[*] Starting Agent Loop for objective: {state.objective}")

        while state.iteration < state.max_iterations:
            state.iteration += 1
            print(f"\n--- [Iteration {state.iteration}/{state.max_iterations}] ---")

            # 1. PROMPT: Compile state and feedback for the LLM
            prompt = self.assemble_prompt(state)

            # 2. ACT: Obtain tool call from model (simulated or API call)
            action = self.call_model_for_action(prompt)
            action_hash = self.compute_action_hash(action)

            # CIRCUIT BREAKER: Cycle Detection
            if action_hash in state.action_hashes[-2:]:
                print("[!] CYCLE DETECTED: Model attempted identical action twice.")
                state.history.append({
                    "role": "system",
                    "content": "CRITICAL: You repeated the exact same failing action. "
                               "Do not try this again. Choose an alternative approach."
                })
                continue
            state.action_hashes.append(action_hash)

            # 3. OBSERVE: Execute tool and capture result
            tool_res = self.execute_tool(action["tool"], action["args"])
            print(f"[Tool Execution]: {tool_res}")

            # 4. VERIFY: Run deterministic test gate
            passed, test_output = self.run_verification()
            print(f"[Verification Gate]: {'PASS (exit 0)' if passed else 'FAIL'}")

            # 5. RETRY or STOP: Evaluate stopping conditions
            if passed:
                state.is_complete = True
                state.exit_reason = f"Verified completion: Tests passed at iteration {state.iteration}."
                print(f"[SUCCESS] {state.exit_reason}")
                break
            else:
                # Inject failure telemetry for self-correcting retry
                state.history.append({
                    "role": "user",
                    "content": f"Tool output: {tool_res}\nVerification FAILED:\n{test_output}\n"
                               f"Analyze why this failed and fix the root cause."
                })

        if not state.is_complete:
            state.exit_reason = f"Halted: Reached maximum iterations ({state.max_iterations}) without passing verification."
            print(f"[CIRCUIT BREAKER] {state.exit_reason}")

        return state

    def assemble_prompt(self, state: LoopState) -> str:
        # Gathers system instructions, objective, and trimmed history
        return f"Objective: {state.objective}\nHistory steps: {len(state.history)}"

    def call_model_for_action(self, prompt: str) -> Dict[str, Any]:
        # Connects to Anthropic, OpenAI, or Gemini APIs for structured tool calling
        return {"tool": "replace_file_chunk", "args": {"filepath": "app.py", "target": "a", "replacement": "b"}}

Observe the key engineering details in this implementation:

  • The Model Does Not Decide When It Is Done: The function run_verification() decides whether the task succeeded by checking real operating system exit codes.
  • Fingerprinted Cycle Detection: The method compute_action_hash() stops repetition spirals before they drain tokens.
  • Compacted Observations: Slicing res.stdout[-1200:] ensures that massive logs cannot blow up the context window.
  • Hard Circuit Breakers: The loop strictly halts at max_iterations = 8, guaranteeing that no rogue task runs indefinitely.

9. Best Practices for Engineering Production AI Loops

When architecting autonomous loops for enterprise applications, follow these five golden rules to maximize reliability and minimize cost:

The 5 Golden Rules of Loop Engineering
  • 1. Prefer Deterministic Over Probabilistic Verification: Never ask an LLM "Did your code fix the bug?" when you can run pytest, npm test, or cargo check. Deterministic exit codes never hallucinate.
  • 2. Use Git Worktree Checkpointing: Always create an isolated git branch or stash before an agent starts mutating files. If an iteration introduces unrecoverable syntax errors, roll back immediately with git reset --hard.
  • 3. Implement Context Sliding & Compaction: Do not let tool outputs accumulate indefinitely. After iteration 3, compress earlier tool outputs into one-sentence summaries ("Attempted regex patch in auth.py; failed with TypeError").
  • 4. Enforce Hard Budget & Iteration Caps: Hardcode ceilings on maximum steps (typically 8–15 for developer tasks) and cumulative token spend ($1.00–$3.00). If an agent hasn't solved an issue in 12 iterations, it is thrashing and should escalate.
  • 5. Provide Actionable Failure Telemetry: When an action fails, do not just tell the model "That failed". Give it the exact stderr traceback, the exit code, and the failing line number. Models are remarkably proficient at self-correction when provided with high-signal compiler feedback.

10. Frequently Asked Questions (FAQ)

What is Loop Engineering in AI?

Loop Engineering is the discipline of building, constraining, and optimizing the iterative execution lifecycle of an autonomous AI agent. Instead of treating an LLM as a one-shot text generator, loop engineering wraps the model in a closed-loop feedback system that alternates between Prompting, Acting (tool invocation), Observing (environment telemetry), Verifying (deterministic testing), Retrying (error backtracking), and Stopping (halting criteria).

How does Loop Engineering relate to Prompt Engineering?

Prompt engineering focuses on natural language instructions, few-shot formatting, and persona setup for a single model call. Loop engineering treats that model call as just one component inside a broader deterministic state machine. While prompt engineering determines what the model is asked, loop engineering governs how its actions are tested, verified, corrected, and stopped.

What is the difference between an AI Harness and Loop Engineering?

An AI Harness is the physical infrastructure and runtime environment (the container sandbox, permission boundaries, telemetry collectors, and tool interfaces). Loop Engineering is the algorithmic logic and control flow (state transitions, verification gates, retry policies, and stopping conditions) executed within that harness.

Why can't we just rely on bigger models instead of engineering loops?

Even a hypothetical superintelligent model cannot guess the exact runtime environment of your local system without testing it. Code execution involves dynamic dependencies, network latency, operating system nuances, and complex edge cases. Intelligence without feedback is open-loop guessing; intelligence with feedback is closed-loop problem solving.

What is a Ralph Loop or Agentic Loop?

An agentic loop refers to the cyclic control sequence (such as ReAct: Reason, Act, Observe, or plan-and-solve cycles). The term Ralph Loop has emerged in modern AI engineering circles to denote fast, inner-loop self-healing cycles where an agent writes a change, immediately runs a linter/compiler, and automatically corrects syntax errors before escalating to slower outer-loop verification.


11. Sources & Reliable References

  • Yang, J., et al. (2024). SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. arXiv:2405.15793.
  • Jimenez, C. E., et al. (2024). SWE-bench: Can Language Models Resolve Real-World GitHub Issues? ICLR 2024. arXiv:2310.06770.
  • Anthropic Engineering (2025). Building Effective Agents: Evaluating Inner Loops vs. Outer Loops in Autonomous Software Systems.
  • Yao, S., et al. (2023). ReAct: Synergizing Reasoning and Acting in Language Models. ICLR 2023.
  • LangChain & LangGraph Architecture (2025). Stateful Graphs, Human-in-the-Loop Checkpoints, and Fault Tolerance in Agentic Loops.

Continue exploring modern AI systems, prompt management, and agentic workflows across Promptnote: