From 4ca392efb140199ebd6393762e42a7d6d1a5c264 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Thu, 14 Nov 2024 18:07:03 -0800 Subject: [PATCH] stripe tool --- .../templates/crewai/tools/stripe_tool.py | 24 +++++++++++++++++++ agentstack/tools/stripe.json | 8 +++++++ agentstack/tools/tools.json | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 agentstack/templates/crewai/tools/stripe_tool.py create mode 100644 agentstack/tools/stripe.json diff --git a/agentstack/templates/crewai/tools/stripe_tool.py b/agentstack/templates/crewai/tools/stripe_tool.py new file mode 100644 index 00000000..864ea104 --- /dev/null +++ b/agentstack/templates/crewai/tools/stripe_tool.py @@ -0,0 +1,24 @@ +import os +from stripe_agent_toolkit.crewai.toolkit import StripeAgentToolkit +from dotenv import load_dotenv +load_dotenv() + +stripe_tools = StripeAgentToolkit( + secret_key=os.getenv("STRIPE_SECRET_KEY"), + configuration={ + "actions": { + "payment_links": { + "create": True, + "read": True, + "update": False + }, + "products": { + "create": True, + "update": True + }, + "prices": { + "create": True, + "update": True + }, + } + }).get_tools() diff --git a/agentstack/tools/stripe.json b/agentstack/tools/stripe.json new file mode 100644 index 00000000..4bcf7526 --- /dev/null +++ b/agentstack/tools/stripe.json @@ -0,0 +1,8 @@ +{ + "name": "stripe", + "package": "poetry add stripe-agent-toolkit stripe", + "env": "STRIPE_SECRET_KEY=sk-...", + "tools_bundled": true, + "tools": ["stripe_tools"], + "cta": "🔑 Create your Stripe API key here: https://dashboard.stripe.com/account/apikeys" +} \ No newline at end of file diff --git a/agentstack/tools/tools.json b/agentstack/tools/tools.json index 553480bb..aebc6c12 100644 --- a/agentstack/tools/tools.json +++ b/agentstack/tools/tools.json @@ -46,5 +46,9 @@ "search": [{ "name": "perplexity", "url": "https://perplexity.ai" + }], + "application-specific": [{ + "name": "stripe", + "url": "https://github.com/stripe/agent-toolkit" }] }