search
Author Avatar
Artefact July 23, 2026 Active 5 min read

Could Gel Data Be the Answer to Graph Agentic Loops?

Listen to article
0:00
--:--

As autonomous AI systems evolve, software architecture is shifting away from linear, single-turn prompts towards graph agentic loops. In these environments, AI agents do not merely process text in isolation; they run continuous, recursive cycles of reasoning, observing, retrieving context, and executing actions across dynamic networks of interconnected entities.

However, executing complex graph agentic loops introduces a major infrastructure challenge: how do you manage deeply structured relational logic alongside associative semantic memory without building a fragile, high-latency data stack?

Developers have traditionally patched together relational databases for state, dedicated graph stores for relationships, and vector databases for semantic retrieval. Gel (formerly EdgeDB, developed by Gel Data) presents an alternative approach. By marrying a graph-relational model with native vector capabilities directly on top of PostgreSQL, could Gel Data be the missing foundation for production-grade graph agentic loops?

The Architectural Challenge of Graph Agentic Loops

To navigate a graph agentic loop effectively, an AI agent must continuously query its environment and maintain two distinct cognitive layers:

Structural and Relational State: The agent needs to understand its immediate context within a graph—what step it is executing, which tools it has called, how entities relate to one another, and which dependencies constrain its next move.

The agent needs to recall past execution logs, unstructured documents, or prior interactions that are conceptually similar to its current state.

Operating this dual memory model traditionally required a split-brain setup, leading to notable operational friction. Developers typically assembled a patchwork "Franken-stack" to manage these workloads. For graph traversal, they were forced to choose between writing fragile, multi-table SQL JOINs or introducing a dedicated, standalone graph database. For semantic memory, they had to integrate an external vector database, such as Pinecone or Qdrant, that remained fundamentally detached from the core transactional database.

This separation creates severe operational vulnerabilities. Managing data consistency across separate systems introduces a constant risk of synchronisation drift, often resulting in orphaned vectors and hallucinated agent states. Because the agent loop must query multiple databases during a single reasoning cycle, accumulated network round-trips introduce significant latency, making real-time autonomous execution nearly impossible.

Gel Data addresses these friction points by consolidating these requirements into a single, unified database layer. Instead of relying on rigid tables or external vector stores, Gel models entities and relationships as first-class graph-relational objects while natively handling vector embeddings through its built-in ext::ai extension. Because the entire system operates on a single ACID-compliant engine built on PostgreSQL, state updates and vector writes stay perfectly aligned, allowing the loop to execute single, composable queries that return both structural and semantic data instantly.

Navigating Graph State Without Relational Overhead

Large Language Models (LLMs) struggle to write or interpret multi-table SQL JOINs reliably without hallucinating foreign key constraints. Yet graph agentic loops demand deep, multi-hop contextual awareness. Agents reason naturally in terms of entities, properties, and relationships, a structure far closer to a graph or nested JSON object than a flat relational table.

Gel operates as a native graph-relational database. It replaces rigid SQL tables with strongly typed "Objects" and directional "Links," making graph traversals simple:

In Gel, links between entities are first-class constructs. An agent running a loop can execute a single query to traverse complex relational pathways (such as Agent → ActiveTask → DependencyGraph → SourceDocument) without writing verbose JOIN logic.

During the "Observe" phase of a loop, the agent requires strict operational boundaries. Gel allows developers to retrieve a tightly defined relational web surrounding an entity, supplying the LLM with grounded graph context that drastically reduces state hallucinations.

Embedding Semantic Vectors Directly into the Graph

Structural graphs provide boundary conditions, but autonomous agents also require semantic memory to search past experiences. Gel addresses this by embedding vector operations directly into the database engine via its native ext::ai extension.

Automated Embedding Pipelines: Gel allows developers to define automated embedding triggers directly within the schema. When an agent logs a new thought, action, or document observation, Gel can automatically call embedding APIs (such as OpenAI, Anthropic, or Mistral) to generate and index vectors in the background.

Because vector embeddings reside alongside graph-relational data, an agent can perform precise hybrid queries within a single round-trip. For example, a single EdgeQL query can instruct the database to:

"Retrieve past execution logs semantically similar to 'API timeout' [Vector], restricted strictly to tasks linked to the 'Payment Gateway' service, and marked as 'Critical' [Graph-Relational]."

Optimised Engine for Recursive Loop Execution

The viability of any database for agentic loops depends on how well it handles the performance demands of rapid, recursive querying. Gel offers several distinct operational advantages for continuous loop execution:

  • Because Gel compiles to PostgreSQL, state changes and vector logs occur within the exact same ACID transaction. If an agent loop encounters an error and rolls back, its semantic memory rolls back alongside its relational state—eliminating ghost entries and out-of-sync vector data.

  • In continuous agentic loops, network latency compounds quickly. By retrieving both graph state and semantic search results in a single, highly optimised query, Gel reduces round-trip overhead, allowing loops to cycle faster while keeping token usage efficient.

  • Gel’s query language, EdgeQL, is strongly typed, declarative, and composable. It naturally outputs deeply nested JSON structures that match the exact schema requirements expected by modern LLM function-calling APIs.

Is Gel Data the Answer?

For teams building complex, multi-step AI agents, Gel Data presents a compelling, highly practical answer to the challenge of graph agentic loops.

Rather than forcing developers to choose between the rigid guarantees of SQL, the complexity of dedicated graph databases, or the isolated nature of standalone vector stores, Gel consolidates these patterns into a unified abstraction built directly on PostgreSQL.

By delivering atomic consistency across graph state and semantic embeddings, Gel simplifies backend architecture, lowers execution latency, and provides the exact structural foundation required for the next generation of autonomous AI agents in my opinion; it's just a shame that the project was wrapped up...

← Newer Artefact Older Artefacts →