feat: update docs with new approach to consume Platform Actions (#3675)

This commit is contained in:
Lucas Gomide
2025-10-09 09:17:09 -03:00
committed by GitHub
parent 458f56fb33
commit 28a8a7e6fa
82 changed files with 7709 additions and 2690 deletions

View File

@@ -22,7 +22,7 @@ Before using the Stripe integration, ensure you have:
### **Customer Management**
<AccordionGroup>
<Accordion title="STRIPE_CREATE_CUSTOMER">
<Accordion title="stripe/create_customer">
**Description:** Create a new customer in your Stripe account.
**Parameters:**
@@ -32,14 +32,14 @@ Before using the Stripe integration, ensure you have:
- `metadataCreateCustomer` (object, optional): Additional metadata as key-value pairs (e.g., `{"field1": 1, "field2": 2}`)
</Accordion>
<Accordion title="STRIPE_GET_CUSTOMER_BY_ID">
<Accordion title="stripe/get_customer_by_id">
**Description:** Retrieve a specific customer by their Stripe customer ID.
**Parameters:**
- `idGetCustomer` (string, required): The Stripe customer ID to retrieve
</Accordion>
<Accordion title="STRIPE_GET_CUSTOMERS">
<Accordion title="stripe/get_customers">
**Description:** Retrieve a list of customers with optional filtering.
**Parameters:**
@@ -49,7 +49,7 @@ Before using the Stripe integration, ensure you have:
- `limitGetCustomers` (string, optional): Maximum number of customers to return (defaults to 10)
</Accordion>
<Accordion title="STRIPE_UPDATE_CUSTOMER">
<Accordion title="stripe/update_customer">
**Description:** Update an existing customer's information.
**Parameters:**
@@ -64,7 +64,7 @@ Before using the Stripe integration, ensure you have:
### **Subscription Management**
<AccordionGroup>
<Accordion title="STRIPE_CREATE_SUBSCRIPTION">
<Accordion title="stripe/create_subscription">
**Description:** Create a new subscription for a customer.
**Parameters:**
@@ -73,7 +73,7 @@ Before using the Stripe integration, ensure you have:
- `metadataCreateSubscription` (object, optional): Additional metadata for the subscription
</Accordion>
<Accordion title="STRIPE_GET_SUBSCRIPTIONS">
<Accordion title="stripe/get_subscriptions">
**Description:** Retrieve subscriptions with optional filtering.
**Parameters:**
@@ -86,7 +86,7 @@ Before using the Stripe integration, ensure you have:
### **Product Management**
<AccordionGroup>
<Accordion title="STRIPE_CREATE_PRODUCT">
<Accordion title="stripe/create_product">
**Description:** Create a new product in your Stripe catalog.
**Parameters:**
@@ -95,14 +95,14 @@ Before using the Stripe integration, ensure you have:
- `metadataProduct` (object, optional): Additional product metadata as key-value pairs
</Accordion>
<Accordion title="STRIPE_GET_PRODUCT_BY_ID">
<Accordion title="stripe/get_product_by_id">
**Description:** Retrieve a specific product by its Stripe product ID.
**Parameters:**
- `productId` (string, required): The Stripe product ID to retrieve
</Accordion>
<Accordion title="STRIPE_GET_PRODUCTS">
<Accordion title="stripe/get_products">
**Description:** Retrieve a list of products with optional filtering.
**Parameters:**
@@ -115,7 +115,7 @@ Before using the Stripe integration, ensure you have:
### **Financial Operations**
<AccordionGroup>
<Accordion title="STRIPE_GET_BALANCE_TRANSACTIONS">
<Accordion title="stripe/get_balance_transactions">
**Description:** Retrieve balance transactions from your Stripe account.
**Parameters:**
@@ -124,7 +124,7 @@ Before using the Stripe integration, ensure you have:
- `pageCursor` (string, optional): Page cursor for pagination
</Accordion>
<Accordion title="STRIPE_GET_PLANS">
<Accordion title="stripe/get_plans">
**Description:** Retrieve subscription plans from your Stripe account.
**Parameters:**
@@ -140,19 +140,14 @@ Before using the Stripe integration, ensure you have:
```python
from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools
# Get enterprise tools (Stripe tools will be included)
enterprise_tools = CrewaiEnterpriseTools(
enterprise_token="your_enterprise_token"
)
from crewai import Agent, Task, Crew
# Create an agent with Stripe capabilities
stripe_agent = Agent(
role="Payment Manager",
goal="Manage customer payments, subscriptions, and billing operations efficiently",
backstory="An AI assistant specialized in payment processing and subscription management.",
tools=[enterprise_tools]
apps=['stripe'] # All Stripe actions will be available
)
# Task to create a new customer
@@ -174,19 +169,12 @@ crew.kickoff()
### Filtering Specific Stripe Tools
```python
from crewai_tools import CrewaiEnterpriseTools
# Get only specific Stripe tools
enterprise_tools = CrewaiEnterpriseTools(
enterprise_token="your_enterprise_token",
actions_list=["stripe_create_customer", "stripe_create_subscription", "stripe_get_balance_transactions"]
)
billing_manager = Agent(
role="Billing Manager",
goal="Handle customer billing, subscriptions, and payment processing",
backstory="An experienced billing manager who handles subscription lifecycle and payment operations.",
tools=enterprise_tools
apps=['stripe']
)
# Task to manage billing operations
@@ -208,17 +196,12 @@ crew.kickoff()
```python
from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools
enterprise_tools = CrewaiEnterpriseTools(
enterprise_token="your_enterprise_token"
)
subscription_manager = Agent(
role="Subscription Manager",
goal="Manage customer subscriptions and optimize recurring revenue",
backstory="An AI assistant that specializes in subscription lifecycle management and customer retention.",
tools=[enterprise_tools]
apps=['stripe']
)
# Task to manage subscription operations
@@ -245,17 +228,12 @@ crew.kickoff()
```python
from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools
enterprise_tools = CrewaiEnterpriseTools(
enterprise_token="your_enterprise_token"
)
financial_analyst = Agent(
role="Financial Analyst",
goal="Analyze payment data and generate financial insights",
backstory="An analytical AI that excels at extracting insights from payment and subscription data.",
tools=[enterprise_tools]
apps=['stripe']
)
# Complex task involving financial analysis