Skip to main content

Modular Python framework for LLM workflows, tools, memory, and data.

Project description

griptape

PyPI Version Tests Docs Griptape Discord

Griptape is a modular Python framework for building AI-powered applications that connect securely to your enterprise data and APIs. It offers developers the ability to maintain control and flexibility at every step.

Build AI Apps: Easily compose apps in Python with modular structures and ready-made tools. Use built-in drivers to connect to whichever LLMs and data stores you choose.

Control Data Access: Connect securely to data sources with granular access controls, ensuring LLMs stay focused on the information that matters.

Scale With Your Workload: Easily deploy and run apps in the cloud, where your data lives. Process data ahead of time or vectorize it on the fly.

Using Griptape, you can securely integrate with your internal data stores and APIs. You get to control what data goes into the prompt, and what the LLM is allowed to do with it.

Documentation

Please refer to Griptape Docs for:

  • Getting started guides.
  • Core concepts and design overviews.
  • Examples.
  • Contribution guidelines.

Please check out Griptape Trade School for free online courses.

Quick Start

First, install griptape:

pip install griptape -U

Second, configure an OpenAI client by getting an API key and adding it to your environment as OPENAI_API_KEY. By default, Griptape uses OpenAI Completions API to execute LLM prompts.

With Griptape, you can create structures, such as Agents, Pipelines, and Workflows, that are composed of different types of tasks. Let's build a simple creative agent that dynamically uses two tools with shared short-term memory.

from griptape.structures import Agent
from griptape.tools import WebScraper

agent = Agent(
    tools=[WebScraper()]
)

agent.run(
    "based on https://www.griptape.ai/, tell me what Griptape is"
)

And here is the output:

Q: based on https://www.griptape.ai/, tell me what Griptape is
A: Griptape is an opinionated Python framework that enables developers to fully harness the potential of LLMs while enforcing strict trust boundaries, schema validation, and activity-level permissions. It offers developers the ability to build AI systems that operate across two dimensions: predictability and creativity. Griptape can be used to create conversational and autonomous agents.

During the run, the Griptape agent loaded a webpage with a tool, stored its full content in the short-term memory, and finally queried it to answer the original question. The important thing to note here is that no matter how big the webpage is it can never blow up the prompt token limit because the full content never goes back to the main prompt.

Check out our docs to learn more about how to use Griptape with other LLM providers like Anthropic, Claude, Hugging Face, and Azure.

Versioning

Griptape is in constant development and its APIs and documentation are subject to change. Until we stabilize the API and release version 1.0.0, we will use minor versions (i.e., x.Y.z) to introduce features and breaking features, and patch versions (i.e., x.y.Z) for bug fixes.

Contributing

Contributions in the form of bug reports, feature ideas, or pull requests are super welcome! Take a look at the current issues and if you'd like to help please submit a pull request with some tests.

License

Griptape is available under the Apache 2.0 License.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

griptape-0.17.0.tar.gz (77.6 kB view details)

Uploaded Source

Built Distribution

griptape-0.17.0-py3-none-any.whl (148.1 kB view details)

Uploaded Python 3

File details

Details for the file griptape-0.17.0.tar.gz.

File metadata

  • Download URL: griptape-0.17.0.tar.gz
  • Upload date:
  • Size: 77.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

File hashes

Hashes for griptape-0.17.0.tar.gz
Algorithm Hash digest
SHA256 0d5048f90b8ebb95781462054b4a9f18e7d2e47ca175e3409058f12ba4820a90
MD5 eb2179b4546d8f87d864cfc034ff4939
BLAKE2b-256 bfe6530acfa73d58710c7295e12d7374169d52608846708041afebf556c08b6b

See more details on using hashes here.

File details

Details for the file griptape-0.17.0-py3-none-any.whl.

File metadata

  • Download URL: griptape-0.17.0-py3-none-any.whl
  • Upload date:
  • Size: 148.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

File hashes

Hashes for griptape-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c5491bc1cdbf49b625531f89f202a70da788f6f1274771e1a58b488b0dee960
MD5 937d5d20486426393287223d47bfe1b5
BLAKE2b-256 342480d042bdcea71fb42ea49972540f7bac4d2b6973d8f713a849a6b193c7b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page