Griptape Documentation

repository·main·Indexed 25 days ago

https://github.com/griptape-ai/griptape

A modular Python framework (v1.11.0) for building generative AI applications. Griptape provides abstractions for LLM workflows, RAG, and tool integration through core components including Structures (Agents, Pipelines, Workflows), Tasks, Memory, Drivers, Engines, and Tools. It also includes Griptape Cloud for low-code Assistant creation, Knowledge Base management, and Data Lake integration.

Tokens
40.3K
Snippets
89
Records
321
Agent score
80%

What's inside Griptape

  1. Explore Griptape Nodes for visual AI development

    main
    Griptape Nodes is a visual AI development platform that allows you to create AI workflows and applications using a drag-and-drop interface with visual building blocks. For advanced customization, you can extend the platform's functionality using Python scripting.
  2. Build applications with the Griptape Framework

    main
    The Griptape Framework is an open-source library designed for creating robust generative AI (genAI) applications. It provides flexible abstractions and built-in tools to help developers manage the complexity of AI-driven software.
  3. Use Griptape Cloud for managed AI services

    main
    Griptape Cloud is a managed offering for deploying and scaling AI applications. It provides capabilities for setting up RAG (Retrieval-Augmented Generation) pipelines, code hosting, and managing custom Tools for LLM Agents. All cloud features are accessible via a dedicated API.
  4. What is a Pipeline and how does it differ from an Agent?

    main
    A Pipeline is a structural component in Griptape designed to orchestrate multiple Task objects. While an Agent typically focuses on a single goal or interaction loop, a Pipeline allows you to chain or manage a sequence of distinct tasks. You can retrieve the final result of the entire pipeline execution by accessing its output attribute.
  5. What is a Griptape Structure?

    main

    A Structure is a way to move beyond simple LLM prompting by providing programmatic control over application logic and data flow. Structures allow you to:

    • Ensure agents perform specific tasks consistently.
    • Provide access to specific datasets for querying.
    • Access external APIs, services, and tools.
    • Process user inputs and LLM responses.
    • Define specific output formats and delivery methods.
    • Prescribe a deterministic series of tasks.
    • Connect multiple application components together.
  6. What is Task Memory and when to use it

    main

    Task Memory is a feature in Griptape that controls where data returned by Tools is stored. Instead of sending all tool outputs directly to the LLM (the prompt), you can opt to store them in Task Memory.

    Use Task Memory in these scenarios:

    • Security/Regulatory requirements: To prevent sensitive data from being sent to an LLM provider's cloud.
    • Large textual content: When tool output exceeds the LLM's token limit (context window). You can store the large content in Task Memory and use a specialized tool to query it.
    • Non-textual content: To store and later act upon images, videos, or PDFs generated by tools.
  7. What is a Task in Griptape

    main

    A Task is a purpose-built abstraction for the Large Language Model (LLM). Griptape provides various specialized Task types for different use cases (e.g., prompting, extraction, summarization, RAG).

    Tasks that take input use the input field to define the objective. Within the input, you can access several context variables:

    • args: An array of arguments passed to the .run() method.
    • structure: The structure that the task belongs to.
    • User-defined context variables.
    • Additional context variables added by the parent Structure.
  8. Identify Assets using Asset Aliases and Asset Paths

    main

    When working with Data Lake assets, use the following identifiers:

    • Asset Alias: A unique identifier for an Asset formed by combining its Bucket ID and Name. The format is <bucket_id>/<asset_name>.
    • Asset Path: A prefix filter used to encompass multiple assets within a Bucket. For example, an Asset Path of foo/ will include both foo/bar.txt and foo/baz.txt.
  9. What are Embeddings in Griptape?

    main
    Embeddings are multidimensional representations of text or image data that carry semantic information. They are primarily used for tasks like text or image similarity search, often within a Rag Engine.
  10. Understand Griptape data abstractions

    main

    Griptape uses a modular set of abstractions to handle data throughout an AI pipeline. Key components include:

    • Artifacts: The primary mechanism for passing data (text, lists, blobs, etc.) between components.
    • Loaders: Used to ingest textual data from various sources.
    • Chunkers: Used to split long text into manageable chunks based on token length.
    • Tokenizers: Used to tokenize and detokenize text to manage LLM token limits.
    • Engines: Specialized components for specific tasks:
      • RAG Engines: For modular Retrieval-Augmented Generation pipelines.
      • Extraction Engines: For extracting structured content from unstructured data.
      • Summary Engines: For summarizing text content.
    • Drivers: Interfaces for interacting with external services:
      • Embedding Drivers: To generate vector embeddings from text.
      • Vector Store Drivers: To store and query vector databases.
      • Prompt Drivers: To interface with LLM APIs.
  11. Understand Assistant Runs

    main
    An Assistant Run is an individual execution of an Assistant. While an Assistant represents the configuration and persona, a Run represents a specific session or interaction. During a run, you can send messages to the Assistant and subsequently inspect the run details, which include the history of sent and received messages as well as the specific configurations used for that execution.