Structures Explained

Structures in Gen AI Builder are Griptape-powered agents, pipelines, and workflows that enable advanced AI logic, data processing, and system integration.

Structures are foundational to building production-ready, intelligent applications with EDB Postgres® AI (EDB PG AI):

  • Execute complex AI workflows
  • Transform and enrich data
  • Implement custom Tools and Retrievers
  • Integrate with external APIs and business systems

Without Structures, Assistants and RAG pipelines are limited to static retrieval and generation — Structures provide the custom logic that brings intelligence and business context to your AI Factory applications.


Before you start

Prerequisites for understanding Structures:

  • Familiarity with Assistants and Knowledge Bases
  • Awareness of Retrievers, Rulesets, and Tools
  • Basic understanding of Griptape Structures and RAG pipelines

Suggested reading:


What is a Structure?

A Structure is a reusable component that encapsulates advanced AI behavior:

  • AI agents and pipelines
  • Data transformations
  • API integrations
  • Workflow orchestration
  • Custom retrieval logic

Structures can be:

  • Run on demand from the AI Factory Web Console
  • Invoked programmatically via API
  • Published as Tools for Assistants
  • Integrated into Data Source pipelines and Knowledge Base pipelines

In short: Structures bring custom intelligence and business process integration to your AI Factory applications.


Why use Structures?

  • Define organization-specific business logic
  • Support multi-step reasoning and workflow orchestration
  • Extend Assistants with custom Tools
  • Enrich and transform incoming data
  • Implement custom retrieval pipelines
  • Integrate AI with external systems (APIs, databases, SaaS platforms)

Structures make your AI applications extensible, compliant, and deeply integrated with enterprise systems.


How Structures work

Structures are implemented as:

  • Griptape Agents → conversational AI logic
  • Griptape Pipelines → multi-step data transformation
  • Griptape Workflows → complex orchestration across agents and tools

A Structure includes:

  • Structure config → YAML or Python definition
  • Structure code → Python, packaged as Zip or GitHub repo
  • Environment variables → for API keys, secrets, and parameters

Execution paths:

API Call → Structure Execution
Assistant → Tool → Structure Execution
Data Source Pipeline → Structure Execution

Where Structures fit in AI Factory pipelines

Structures can:

  • Implement custom Data Sources
  • Perform Data Source transformations
  • Provide Tools for Assistants
  • Enrich RAG pipelines with custom retrieval logic

When to use Structures

Use Structures when you need:

  • Advanced AI capabilities beyond simple Q&A
  • Complex data transformations
  • Business workflow orchestration
  • API integrations and external lookups
  • Dynamic Tools for Assistants
  • Custom search with advanced ranking or filtering

Typical use cases:

  • Transaction categorization and tagging
  • Data anonymization for privacy compliance
  • Product catalog enrichment
  • API-driven Tools for Assistants (inventory, pricing, logistics)
  • Complex summarization agents
  • Custom hybrid retrieval logic for RAG pipelines

Patterns of use

Standalone Structure

  • Executed on demand via UI or API
  • Example: Data Anonymizer run manually or on schedule

Structure as a Tool

  • Published as a Tool in AI Factory
  • Invoked by Assistants at runtime
  • Example: Product Inventory Lookup Tool used by Support Assistant

Structure as Data Transformer

  • Integrated into Data Source pipeline
  • Transforms raw data before indexing
  • Example: PDF Parser + Metadata Enricher pipeline

Structure as Custom Retriever / Data Source

  • Implements a custom Retriever or custom Data Source
  • Example: Real-Time Pricing Retriever that queries external pricing APIs and merges results with Knowledge Base content

Structure as Business Workflow Orchestrator

  • Executes multi-step business logic
  • Example: Order Processing Workflow → fetch inventory, calculate shipping, update CRM, notify customer

Best practices

  • Package Structures cleanly:
  • Clear Structure Config
  • Minimal, isolated external dependencies
  • Externalize secrets via environment variables
  • Implement robust error handling and retries
  • Validate performance for production use cases
  • Use versioned Data Lake paths where applicable
  • Monitor execution performance and success rates
  • Follow Griptape best practices:
  • Modular pipelines and workflows
  • Stateless agents where possible
  • Clear separation of transformation and orchestration logic
  • Use audit trails for critical business workflows
  • Maintain governance for any externally integrated APIs or data

Sovereign AI alignment

Structures are a key enabler of Sovereign AI with EDB PG AI:

  • Run inside your infrastructure
  • Fully auditable and version-controlled
  • Behavior and API integrations are transparent and governed
  • No reliance on third-party "black box" plugins or agents
  • Integrated observability and monitoring via Hybrid Manager

Structures enable you to build intelligent, integrated, compliant AI workflows — fully under your control.


Summary

Structures make your AI Factory extensible and production-grade:

  • Implement custom business logic
  • Integrate with enterprise APIs and systems
  • Transform and enrich data pipelines
  • Extend Assistants with powerful Tools
  • Enable Sovereign AI with full auditability and control

Without Structures, your AI Factory applications cannot fully reflect your business workflows or compliance requirements.


Next steps


Structures turn EDB PG AI from a "chat system" into a full-fledged intelligent application platform — enabling complex, governed AI workflows across your business.



Could this page be better? Report a problem or suggest an addition!