Skip to main content

griptape

PyPI Version Tests Docs Griptape Discord

Griptape offers developers the ability to build AI systems that operate across two dimensions: predictability and creativity.

For predictability, software structures like sequential pipelines and directed acyclic graphs (DAGs) are enforced. Creativity, on the other hand, is facilitated by safely prompting LLMs with tools that connect to external APIs and data sources. Developers can move between these two dimensions according to their use case.

Documentation

Please refer to Griptape Docs for:

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

Quick Start

First, install griptape and griptape-tools:

pip install griptape griptape-tools -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 memory.

from griptape.memory.tool import TextToolMemory
from griptape.structures import Agent
from griptape.tools import WebScraper


"""
Define memory to be shared between tools.
"""
memory = TextToolMemory()

"""
WebScraper enables LLMs to load web pages.
"""
web_scraper = WebScraper(
    output_memory={"get_content": [memory]}
)

"""
Agents can use multiple tools to creatively solve problems
"""
agent = Agent(
    tools=[web_scraper]
)

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, stored its full content in temporary memory, and finally queried it to answer the original question.

Versioning

Griptape is in early 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.

Metadata

Release files for griptape 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for griptape 0.12.0
File Size Uploaded Provenance Actions
griptape-0.12.0.tar.gz 44.9 kB Without provenance Details for griptape-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for griptape 0.12.0
File Interpreter ABI Platform Actions
griptape-0.12.0-py3-none-any.whl Python 3 none any Details for griptape-0.12.0-py3-none-any.whl

Total release size: 127.0 kB

Release files / griptape-0.12.0.tar.gz

Download URL griptape-0.12.0.tar.gz
Size 44.9 kB
Tags Source
SHA-256 checksum
How to use checksums
363c00c07603b6a9ff827c847d3ccfee2d4cf92275dcd6397e17a35c6b94fb20
BLAKE2b-256 checksum
How to use checksums
d94d1b261cdf7549a07bc76a84d0680c05f2152ab4408dd79efebb735f1350e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.9.16 Darwin/21.6.0

Release files / griptape-0.12.0-py3-none-any.whl

Download URL griptape-0.12.0-py3-none-any.whl
Size 82.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30518e6d520ebe3a68c6cc2f50c5fe014e62cc2594079250a78630760d294920
BLAKE2b-256 checksum
How to use checksums
a55d3eaeea07848cb43aa8af5d2bdcacea210e6343594cc5c22ad3df1bf6bd98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.9.16 Darwin/21.6.0

Security for griptape 0.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page