Version 1.4 of the Griptape Framework is here. The 1.4 release includes two new prompt drivers, changes to event handling when using the Framework to interact with Griptape Cloud, and an update to Tasks. Let’s launch ourselves out of the halfpipe and explore some of the new features added in this release.
New GriptapeCloudPromptDriver
With the addition of the GriptapeCloudPromptDriver
, customers can use an LLM in their Griptape-based applications with just a Griptape Cloud API key. With the GriptapeCloudPromptDriver
, there is no need to provide an additional API key from an LLM provider. Simply sign up for Griptape Cloud and you are ready to go!
As you can see in the example below, we are using OpenAI’s GPT-4 model to provide this capability.
from griptape.drivers.prompt.griptape_cloud_prompt_driver import (
GriptapeCloudPromptDriver,
)
from griptape.structures import Agent
agent = Agent(
prompt_driver=GriptapeCloudPromptDriver(
api_key=os.environ["GT_CLOUD_API_KEY"],
),
)
agent.run("What model are you?")
[02/28/25 11:11:10] INFO PromptTask 77def763764443a0ae963e7f59f0dfb8
Input: What model are you?
[02/28/25 11:11:14] INFO PromptTask 77def763764443a0ae963e7f59f0dfb8
Output: I am OpenAI GPT-4, a language model designed to
assist with a wide range of tasks and provide information
to the best of my ability. How can I help you today?
Support for xAI Grok Models
This release adds support for the Grok family of models from xAI through a new GrokPromptDriver
. As usual, this is a drop in replacement for other prompt drivers that you can specify when creating any Structure, or PromptTask.
from griptape.drivers.prompt.grok import GrokPromptDriver
from griptape.rules import Rule
from griptape.structures import Agent
agent = Agent(
prompt_driver=GrokPromptDriver(
api_key=os.environ["GROK_API_KEY"], model="grok-2-1212"
),
rules=[Rule("Be concise in your answers.")]
)
agent.run("What is Grok 2?")
[02/28/25 11:20:27] INFO PromptTask 993f1b192bf249fd8397a648a8b53d13
Input: What is Grok 2?
[02/28/25 11:20:28] INFO PromptTask 993f1b192bf249fd8397a648a8b53d13
Output: Grok 2 is an advanced AI model developed by xAI,
designed to provide helpful and truthful answers to a
wide range of questions. It builds upon the capabilities
of the original Grok model, offering improved performance
and understanding.
Server Sent Event (SSE) Support in Griptape Cloud Drivers
Server-Sent Events (SSE) is a server push technology that enables a client to receive automatic updates from a server via an HTTP connection. With the addition of SSE support in GriptapeCloudStructureRunDriver
and GriptapeCloudAssistantDriver
we have removed event polling. These drivers now listen for Server-Sent Events on an open socket connection and act immediately upon receiving an event. This simplifies the driver by removing the need to handle polling and delivers a performance improvement through reduced event processing latency. No changes are needed of your part to take advantage of this new capability.
Evolving Tasks
As part of our effort to support different use-cases and programming models, we plan to work on some enhancements to Tasks over the next few releases. Tasks are intended to be a lightweight way to make requests of LLMs with the Griptape Framework in circumstances where you may not need the decision making power or conversational memory features that are available in Griptape Agents.
With this path in mind we have updated Tasks in the 1.4 release, adding support for arguments. You can now use args in conjunction with Jinja templating to create simple tasks for LLMs.
from griptape.tasks import PromptTask
task = PromptTask(
input="User's name: {{ name }}. User said: {{ args[0] }}",
context={"name": "John"},
)
task.run("Hi there, do you know my name?")
Other changes & fixes in Griptape 1.4
For a full list of the all the fixes included in the Griptape 1.4 release, please head over to the CHANGELOG in the Griptape Framework GitHub repo. Maybe drop us a star ⭐ while you're there too?
How to get started
Griptape Framework 1.4 is available now and you can download it with uv, poetry, pip or another Python package manager of your choice. As usual, we would love any feedback on these changes, or your ideas and suggestions for future enhancements. If you want to ask any questions about the other features in this release please head over to the Griptape Discord.