From e623db61d3653d060cf419ed9458e96b32919a51 Mon Sep 17 00:00:00 2001 From: Soham Date: Wed, 31 Jul 2024 12:55:41 +0530 Subject: [PATCH] fix docs (#409) --- docs/guides/examples/Example.mdx | 2 - docs/guides/javascript/investment-analyst.mdx | 2 +- docs/guides/javascript/rag_agent.mdx | 2 +- docs/guides/python/calendar-agent.mdx | 2 +- docs/guides/python/competitor-researcher.mdx | 2 +- docs/guides/python/investment-analyst.mdx | 2 +- docs/guides/python/news-summary.mdx | 2 +- docs/guides/python/research-assistant.mdx | 2 +- docs/guides/python/sql-agent.mdx | 2 +- docs/introduction/intro/quickstart.mdx | 134 +++++++++++------- docs/mint.json | 26 ++-- docs/patterns/functions/multiple-users.mdx | 46 ++++-- docs/patterns/howtos/listing-connections.mdx | 73 ++++++---- docs/patterns/howtos/listing-integrations.mdx | 69 +++++++++ docs/patterns/howtos/tool-finding.mdx | 91 ++++++++++-- docs/patterns/howtos/usecase.mdx | 54 +++++-- docs/patterns/production-guide/prod.mdx | 23 ++- docs/sdk/cli/account.mdx | 42 ------ docs/sdk/cli/actions.mdx | 31 ---- 19 files changed, 381 insertions(+), 226 deletions(-) create mode 100644 docs/patterns/howtos/listing-integrations.mdx delete mode 100644 docs/sdk/cli/account.mdx delete mode 100644 docs/sdk/cli/actions.mdx diff --git a/docs/guides/examples/Example.mdx b/docs/guides/examples/Example.mdx index b50ef1a123a..0fe2911f01a 100644 --- a/docs/guides/examples/Example.mdx +++ b/docs/guides/examples/Example.mdx @@ -12,7 +12,5 @@ These examples can be used as reference to better understand the core principles - - diff --git a/docs/guides/javascript/investment-analyst.mdx b/docs/guides/javascript/investment-analyst.mdx index 6bac60b6351..82524e6b935 100644 --- a/docs/guides/javascript/investment-analyst.mdx +++ b/docs/guides/javascript/investment-analyst.mdx @@ -19,7 +19,7 @@ This project involves setting up and running an agent to conduct investment rese > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/javascript/investment_analyst` + `cd js/docs-example/investment_analyst` Install the required dependencies: diff --git a/docs/guides/javascript/rag_agent.mdx b/docs/guides/javascript/rag_agent.mdx index 8af3dc26518..3facd839307 100644 --- a/docs/guides/javascript/rag_agent.mdx +++ b/docs/guides/javascript/rag_agent.mdx @@ -19,7 +19,7 @@ This project involves setting up and running an agent to add content to a RAG (R > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/javascript/investment_analyst` + `cd js/examples/docs-example/rag_tool_agent` Install the required dependencies: diff --git a/docs/guides/python/calendar-agent.mdx b/docs/guides/python/calendar-agent.mdx index 6f76e0bb493..f684597e042 100644 --- a/docs/guides/python/calendar-agent.mdx +++ b/docs/guides/python/calendar-agent.mdx @@ -20,7 +20,7 @@ This project is an example which uses Composio to seamlessly convert your to-do > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/python/calendar_agent` + `cd python/examples/calendar_agent` Make the setup.sh Script Executable (if necessary): On Linux or macOS, you might need to make the setup.sh script executable: diff --git a/docs/guides/python/competitor-researcher.mdx b/docs/guides/python/competitor-researcher.mdx index b8870722a36..2bec7100888 100644 --- a/docs/guides/python/competitor-researcher.mdx +++ b/docs/guides/python/competitor-researcher.mdx @@ -20,7 +20,7 @@ This project uses Composio to automate the creation and management of competitor > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/python/competitor_researcher` + `cd python/examples/competitor_researcher` Make the setup.sh Script Executable (if necessary): On Linux or macOS, you might need to make the setup.sh script executable: diff --git a/docs/guides/python/investment-analyst.mdx b/docs/guides/python/investment-analyst.mdx index 009ffb16223..a29191e78c4 100644 --- a/docs/guides/python/investment-analyst.mdx +++ b/docs/guides/python/investment-analyst.mdx @@ -20,7 +20,7 @@ This project involves setting up and running a system of agents to conduct inves > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/python/investment_analyst` + `cd python/examples/investment_analyst` Make the setup.sh Script Executable (if necessary): On Linux or macOS, you might need to make the setup.sh script executable: diff --git a/docs/guides/python/news-summary.mdx b/docs/guides/python/news-summary.mdx index 8a2eaa24edb..c7e6c028576 100644 --- a/docs/guides/python/news-summary.mdx +++ b/docs/guides/python/news-summary.mdx @@ -18,7 +18,7 @@ retrieves the latest news articles and generates summaries using Langchain and C > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/python/news_summary` + `cd python/examples/news_summary` Make the setup.sh Script Executable (if necessary): On Linux or macOS, you might need to make the setup.sh script executable: diff --git a/docs/guides/python/research-assistant.mdx b/docs/guides/python/research-assistant.mdx index b23936ba0c2..79903377df0 100644 --- a/docs/guides/python/research-assistant.mdx +++ b/docs/guides/python/research-assistant.mdx @@ -17,7 +17,7 @@ description: "This guide provides detailed steps to create a research assistant > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/python/research_assistant` + `cd python/examples/research_assistant` Make the setup.sh Script Executable (if necessary): On Linux or macOS, you might need to make the setup.sh script executable: diff --git a/docs/guides/python/sql-agent.mdx b/docs/guides/python/sql-agent.mdx index 9632eb640f9..ddfb39f9176 100644 --- a/docs/guides/python/sql-agent.mdx +++ b/docs/guides/python/sql-agent.mdx @@ -23,7 +23,7 @@ This project involves setting up and running a system of agents to conduct SQL q > Fork and Clone this [repository](https://git.new/composio), Navigate to the Project Directory - `cd cookbook/examples/python/sql_agent` + `cd python/examples/sql_agent` Make the setup.sh Script Executable (if necessary): On Linux or macOS, you might need to make the setup.sh script executable: diff --git a/docs/introduction/intro/quickstart.mdx b/docs/introduction/intro/quickstart.mdx index 2789b65d66a..c28c010dbd0 100644 --- a/docs/introduction/intro/quickstart.mdx +++ b/docs/introduction/intro/quickstart.mdx @@ -10,20 +10,28 @@ description: "Use Composio to connect OpenAI Assistant to GitHub (via OAUTH2) to + + -```bash python +```bash Install Composio Package pip install composio_core pip install composio_openai ``` + + -```javascript javascript + + +```javascript Install Composio Package npm install composio-core npm install openai pip install composio_core // for installing CLI via python. -// We will soon release a binary package for CLI. 😅 -// This step can be skipped if you don't intend to use the CLI. ``` + CLI binary package coming soon. Skip if not using CLI. + + + @@ -31,22 +39,29 @@ pip install composio_core // for installing CLI via python. composio add github ``` + - -Modify `OPENAIKEY` and `COMPOSIO_API_KEY` before executing it. + +Modify `OPENAIKEY` and `COMPOSIO_API_KEY` before executing it. + + -```python python +```python Initialise the Composio Tool Set from openai import OpenAI from composio_openai import ComposioToolSet, App, Action openai_client = OpenAI(api_key="**\*\***OPENAIKEY**\*\***") -# Initialise the Composio Tool Set - -composio_toolset = ComposioToolSet(api_key="**\*\***COMPOSIO_API_KEY**\*\***") +composio_toolset = ComposioToolSet() +# composio_toolset = ComposioToolSet(api_key=COMPOSIO_API_KEY) +# Only need to pass API key if you are not using CLI ``` -```javascript javascript + + + + +```javascript Initialise the Composio Tool Set import dotenv from 'dotenv'; dotenv.config(); @@ -63,30 +78,39 @@ const composio_toolset = new OpenAIToolSet({ apiKey: process.env.COMPOSIO_API_KEY }); ``` - + + + - - ```python python -# Get GitHub tools that are pre-configured + + + +```python Get GitHub action for starring a repo actions = composio_toolset.get_actions(actions=[Action.GITHUB_ACTIVITY_STAR_REPO_FOR_AUTHENTICATED_USER]) - ``` - - ```javascript javascript - // Get GitHub tools that are pre-configured - const tools = await composio_toolset.getActions({ - actions: ["github_start_repo"] - }); - ``` - - +``` + + + + +```javascript Get GitHub action for starring a repo +const tools = await composio_toolset.getActions({ +actions: ["github_start_repo"] +}); +``` + + + - + + + + -```python python +```python Star a repository using LLM my_task = "Star a repo composiohq/composio on GitHub" # Setup openai assistant @@ -108,8 +132,11 @@ message = openai_client.beta.threads.messages.create(thread_id=thread.id,role="u run = openai_client.beta.threads.runs.create(thread_id=thread.id,assistant_id=assistant.id) ``` - -```javascript javascript + + + + +```javascript Star a repository using LLM const instruction = "Star a repo composiohq/composio on GitHub"; // Initialise the Composio Tool Set @@ -122,14 +149,16 @@ const response = await openai_client.chat.completions.create({ ``` + + + - + -```python python -# Execute Function calls +```python Execute Function calls response_after_tool_calls = composio_toolset.wait_and_handle_assistant_tool_calls( client=openai_client, run=run, @@ -138,8 +167,11 @@ response_after_tool_calls = composio_toolset.wait_and_handle_assistant_tool_call print(response_after_tool_calls) ``` - -```javascript javascript + + + + +```javascript Execute Function calls var resp = response.choices[0].message.tool_calls console.log(resp); @@ -148,24 +180,10 @@ await composio_toolset.handle_tool_call(response); ``` - -You can checkout adding connections for your user [here](/introduction/foundations/components/integrations/connected-account) - -```python Executing Selected Actions! -# Execute Function calls -response_after_tool_calls = composio_toolset.wait_and_handle_assistant_tool_calls( - client=openai_client, - run=run, - thread=thread, -) - -url = f"https://platform.openai.com/playground/assistants?assistant={assistant.id}&thread={thread.id}" -print(f"Open this URL to see the assistant in action: {url}") -print(response_after_tool_calls) -``` - - + +You can checkout docs on adding connections or executing actions for a specific user [here](/introduction/foundations/components/entity/entity-guide) + @@ -173,9 +191,10 @@ print(response_after_tool_calls) ### Putting it all together Replace `OPENAIKEY`. - + + -```python python +```python Complete Code ## Step 1 #!pip install composio_core #!pip install composio_openai @@ -223,8 +242,11 @@ url = f"https://platform.openai.com/playground/assistants?assistant={assistant.i print(f"Open this URL to see the assistant in action: {url}") print(response_after_tool_calls) ``` - -```javascript javascript + + + + +```javascript Complete Code // Importing necessary modules from the openai and composio-core packages import dotenv from 'dotenv'; dotenv.config(); @@ -268,3 +290,5 @@ await composio_toolset.handle_tool_call(response); ``` + + \ No newline at end of file diff --git a/docs/mint.json b/docs/mint.json index eb0d8592b47..c4c814665b9 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -28,7 +28,7 @@ "isHidden": false }, "feedback": { - "suggestEdit": false, + "suggestEdit": true, "raiseIssue": true, "thumbsRating": true }, @@ -99,6 +99,7 @@ { "group": "Python", "pages": [ + "python/introduction", { "group": "With Frameworks", "icon": "code", @@ -116,8 +117,7 @@ "framework/praisonai", "framework/langgraph" ] - }, - "python/introduction" + } ] }, { @@ -136,6 +136,13 @@ } ] }, + { + "group": "CLI", + "pages": [ + "sdk/cli/install", + "sdk/cli/trigger" + ] + }, { "group": "SweKit", "pages": [ @@ -152,15 +159,7 @@ "swekit-js/workspace-env" ] }, - { - "group": "CLI", - "pages": [ - "sdk/cli/install", - "sdk/cli/account", - "sdk/cli/trigger", - "sdk/cli/actions" - ] - }, + { "group": "Guides", "pages": [ @@ -176,7 +175,8 @@ "pages": [ "patterns/howtos/usecase", "patterns/howtos/tool-finding", - "patterns/howtos/listing-connections" + "patterns/howtos/listing-connections", + "patterns/howtos/listing-integrations" ] }, { diff --git a/docs/patterns/functions/multiple-users.mdx b/docs/patterns/functions/multiple-users.mdx index 93d591ab77a..b02e5a9b575 100644 --- a/docs/patterns/functions/multiple-users.mdx +++ b/docs/patterns/functions/multiple-users.mdx @@ -12,15 +12,20 @@ In Composio, an entity encapsulates all associated accounts for either a user or ### Creating and Managing Entities To create or retrieve an entity for a user, you can use their unique identifier. Here’s an example in Python: - + + -```python python +```python Python Code Snippet to get an entity (user) from composio import Composio composio_client = Composio(api_key="COMPOSIO_API_KEY") entity = composio_client.get_entity(id='user_email_id') ``` -```javascript javascript + + + + +```javascript JS Code Snippet to get an entity (user) import { OpenAIToolSet } from "composio-core"; const openai_client = new OpenAI({ @@ -29,38 +34,59 @@ const openai_client = new OpenAI({ const entity = toolset.client.getEntity(id='user_email_id'); ``` + + Once you have the entity, you can manage the connected accounts. If an account is not connected, you can prompt the user to connect their account. ### Getting Connected Accounts To get the connected accounts for an entity, you can use the following code: + + -```python python +```python Python Code Snippet to get a connected account try: connected_account = entity.get_connection(app="slack") except Exception as e: print("No connected account found") ``` -```javascript javascript + + + + +```javascript JS Code Snippet to get a connected account const connected_account = await entity.getConnection("slack"); ``` + + + This code attempts to retrieve the connected account for Slack. If no connected account is found, it catches the exception and prints a message. ### Performing Actions on Behalf of Users Composio allows you to perform actions on behalf of users. For example, you can fetch all available actions that can be performed on GitHub: + + ```python python actions = entity.get_actions(app_name=App.GITHUB) ``` + + + + ```javascript javascript const actions = entity.getActions(app_name=App.GITHUB); ``` + + With the actions fetched, you can configure an agent to perform tasks on GitHub on behalf of the user. Here’s an example: + + ```python python @@ -83,6 +109,10 @@ response = openai_client.chat.completions.create( ) tool_set.handle_tool_calls(response=response, entity_id="melissa") ``` + + + + ```javascript javascript import { OpenAI } from "openai"; import { OpenAIToolSet } from "composio-core"; @@ -107,9 +137,7 @@ const response = await toolset.client.chat.completions.create({ await toolset.handle_tool_call(response, entity.id="melissa"); ``` + + In this example, an agent is configured to star a repository on GitHub on behalf of the user. The OpenAI API is used to process the request and perform the action. - -### Conclusion - -Managing multiple users and their authentication can be streamlined with Composio’s entity-based approach. By encapsulating users and organizations under a single management umbrella, Composio simplifies the administration of connected accounts and actions. With this approach, you can efficiently manage multiple users and perform tasks on their behalf, enhancing productivity and security. diff --git a/docs/patterns/howtos/listing-connections.mdx b/docs/patterns/howtos/listing-connections.mdx index 914cc68bd20..e916cd65113 100644 --- a/docs/patterns/howtos/listing-connections.mdx +++ b/docs/patterns/howtos/listing-connections.mdx @@ -2,51 +2,70 @@ title: "Listing Connected Accounts in Composio" sidebarTitle: "Listing Connected Accounts" icon: "user" -description: "In Composio, managing and monitoring your connections is essential for maintaining an organized and efficient workflow. This page will help you list and manage the connections associated with your account, allowing you to keep track of the active Connections and their details." +description: "Managing and monitoring your connections is essential to show your users what integrations they have connected." --- ### Listing All Connections To view all the connections associated with your Composio account, use the following command: + + -```bash bash -composio connections -``` - +```python List all connections via Python +from composio import Composio + +client = Composio() -This command will display a comprehensive list of all connections, providing an overview of the various users linked to your account. +entity = composio_client.get_entity(id=USER_ID) +print(composio_client.) -### Listing Active Connections -If you only want to see the connections that are currently active, you can use the --active option: +print(composio_client.connected_accounts.get()) +``` + + + -```bash bash -composio connections --active +```bash List all connections via CLI +composio connections ``` -This command filters the list to show only the active connections, making it easier to identify which users are currently active. + + +Coming Soon! + + +Coming Soon! + + + ### Getting Connection Details To get detailed information about a specific connection, use the get command followed by the connection ID. For example, to get details of a connection with the ID 123, you would use: + + + -```bash bash -composio connections get 123 +```python Get connection details via Python +from composio import Composio + +client = Composio() + +print(composio_client.connected_accounts.get(id=123)) ``` + + -This command provides detailed information about the specified connection, including its status, configuration, and other relevant details. - -### Deleting a Connection -If you need to remove a connection from your account, use the delete command followed by the connection ID. For example, to delete a connection with the ID 456, you would use: -```bash bash -composio connections delete 456 +```bash Get connection details via CLI +composio connections get 123 ``` -This command deletes the specified connection, removing it from your list of integrations. - - -### Conclusion -Managing connections in Composio is straightforward with the provided commands. -By listing all connections, filtering for active ones, -retrieving detailed information, and deleting unnecessary connections, -you can efficiently manage your users and ensure that your account remains organized and up-to-date. \ No newline at end of file + + +Coming Soon! + + +Coming Soon! + + \ No newline at end of file diff --git a/docs/patterns/howtos/listing-integrations.mdx b/docs/patterns/howtos/listing-integrations.mdx new file mode 100644 index 00000000000..ea5ed570914 --- /dev/null +++ b/docs/patterns/howtos/listing-integrations.mdx @@ -0,0 +1,69 @@ +--- +title: "Listing Integrations in Composio" +sidebarTitle: "Listing Integrations" +icon: "user" +description: "This page will help you manage integrations in Composio" +--- + +### Listing All Integrations +To retrieve a complete list of your integrations, you can use the following code snippets. + + + + +```python List all integrations via Python +from composio import Composio + +composio_client = Composio() + +print(composio_client.integrations.get()) +``` + + + + +```bash List all integrations via CLI +composio integrations +``` + + + +Coming Soon! + + +Coming Soon! + + + +This command will display a comprehensive list of all connections, providing an overview of the various users linked to your account. + +### Getting Integration Details +To get detailed information about a specific integration, use the get command followed by the integration ID. For example, to get details of a connection with the ID 123, you would use: + + + + +```python Get integration details via Python +from composio import Composio + +client = Composio() + +print(composio_client.integrations.get(id=123)) +``` + + + + + +```bash bash +composio integrations get 123 +``` + + + +Coming Soon! + + +Coming Soon! + + \ No newline at end of file diff --git a/docs/patterns/howtos/tool-finding.mdx b/docs/patterns/howtos/tool-finding.mdx index 6e82e7b821a..3ec7fc4f74d 100644 --- a/docs/patterns/howtos/tool-finding.mdx +++ b/docs/patterns/howtos/tool-finding.mdx @@ -1,34 +1,97 @@ --- -title: "Tool finding" -sidebarTitle: "Tool Finding" +title: "Listing all tools, actions, and more" +sidebarTitle: "Listing Tools & Actions" icon: "magnifying-glass" -description: "This section will walk you through discovering and managing the tools" +description: "This section will walk you through discovering and managing the tools, integrations, actions, and more." --- ### Listing All Tools -To list all the applications available in Composio, use the following command: +You can list all available applications in Composio along with their logos, descriptions, and more. + + + + +```python python +from composio import Composio + +client = Composio() +print(client.apps.get()) +# print all apps supported +``` + + + ```bash bash composio apps ``` + + +Coming soon! + + -This command will display a comprehensive list of all the apps you have access to, providing a quick overview of the tools at your disposal. +### Listing All Connected Tools for a User -### Listing Enabled tools +You can list all connected tools for a user, which includes information about the applications they have integrated with Composio. -If you only want to see the apps that are currently enabled, you can use the `--enabled` option: + + -```bash bash -composio apps --enabled +```python Get all connections for a user +from composio import Composio + +composio_client = Composio() + +USER_ID = "default" + +entity = composio_client.get_entity(id=USER_ID) + +print(entity.get_connections()) + ``` + + + +```bash +composio connections +# no user level filtering +``` + + + +Coming soon! + + + +### Listing all Actions -This command filters the list to show only the apps that are enabled, allowing you to focus on the tools that are ready for immediate use. +All actions supported by the Composio along with function signatures and parameter descriptions. -### Conclusion + + + +```python python +from composio import Composio + +client = Composio() +print(client.actions.get(limit=10)) +# print all actions supported +``` + + + + +```bash bash +composio actions --limit 10 +``` + + + +Coming soon! + -Managing and discovering tools and applications in Composio is straightforward with the provided commands. -By listing all available apps, filtering to show only enabled apps, -you can efficiently manage the tools you have access to and ensure you are always working with the most current information. + \ No newline at end of file diff --git a/docs/patterns/howtos/usecase.mdx b/docs/patterns/howtos/usecase.mdx index bc36b38a79e..95387200516 100644 --- a/docs/patterns/howtos/usecase.mdx +++ b/docs/patterns/howtos/usecase.mdx @@ -1,22 +1,50 @@ --- -title: "Use Case based Action finding" -sidebarTitle: "Use Case based Action" +title: "Finding Actions by Use Case" +sidebarTitle: "Actions by Use Case" icon: "magnifying-glass" description: "This documentation will guide you through the process of use case-based action finding in Composio." --- +Use case-based action finding in Composio enhances task efficiency by providing targeted action lists. This approach is crucial because AI agents typically perform best with a limited set of actions. By dynamically selecting actions based on the current task, you can: -### Listing Actions by Use Case -To list actions tailored to a specific use case, you can use the composio actions command with the `--use-case` option. -This allows you to filter actions based on the particular use case you are interested in. - -```bash bash -composio actions --use-case ' +- Optimize agent performance +- Increase task relevance +- Streamline workflow +This method ensures your AI agents have the most appropriate tools for each specific scenario, improving overall effectiveness. -This command will display all actions available in Composio that are relevant to the particular use case. + + + + ```Python Fetching Actions using natural language use-case -### Conclusion -Use case-based action finding in Composio enhances your ability to manage and execute tasks efficiently by providing targeted action lists tailored to your specific needs. By using the `--use-case` option, you can quickly access the actions relevant to your use case, saving time and improving productivity. \ No newline at end of file + use_case="Star a repo on github" + + action_enums=toolset.find_actions_by_use_case(app=App.GITHUB, use_case=use_case) + tools = toolset.get_actions(actions=action_enums) + + # use tools as per your framework + ``` + + + + + + ```Javascript Fetching Actions using natural language use-case + //coming soon + ``` + + + + + + ```bash Fetching Actions using natural language use-case + composio actions --use-case 'get channel messages' --app 'slack' + ``` + + + + +Find all different ways to fetch actions [here](/introduction/foundations/components/actions/action-guide) + +By using the `--use-case` option, you can quickly access the actions relevant to your use case, saving time and improving productivity. \ No newline at end of file diff --git a/docs/patterns/production-guide/prod.mdx b/docs/patterns/production-guide/prod.mdx index 6ba9121dc08..3b7be31f481 100644 --- a/docs/patterns/production-guide/prod.mdx +++ b/docs/patterns/production-guide/prod.mdx @@ -15,6 +15,8 @@ This can be done through the platform's UI or via your deployment scripts. ### Step 2: Initialize the Composio Client In your application code, initialize the Composio client using the environment variable for the API key. Here is an example in Python: + + ```python python import os @@ -22,6 +24,10 @@ from composio import Composio composio_client = Composio(api_key=os.getenv("COMPOSIO_API_KEY")) ``` + + + + ```javascript javascript import { OpenAIToolSet } from "composio-core"; @@ -30,15 +36,8 @@ const composio_toolset = new OpenAIToolSet({ }); ``` - -### Step 3: Provide an Entity ID for User-Specific Actions -Whenever you perform actions using the Composio SDK, make sure to provide the entity ID of the user. -Here is an example of enabling a GitHub commit hook for a user: - -```python python -entity = composio_client.get_entity(user_id="user_123") -``` -```javascript javascript -entity = composio_client.client.get_entity("user_123"); -``` - \ No newline at end of file + + +Coming Soon! + + \ No newline at end of file diff --git a/docs/sdk/cli/account.mdx b/docs/sdk/cli/account.mdx deleted file mode 100644 index 76ad2198124..00000000000 --- a/docs/sdk/cli/account.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "🧑🏻‍💻 Manage Connections using CLI" -sidebarTitle: "Connections" -icon: "globe" -description: "Learn how to add, check, and manage connections using the CLI." ---- - -Using the CLI, you can establish new connections to applications such as GitHub, Linear, Notion, Gmail, and more. -These connections enable your agents to perform various actions on your behalf. - -### Managing Connections - - - -**View all supported tools/apps** with Composio. - - ```bash Show all Apps - composio apps - ``` - - - - -**Authorise your app account** to enable agent to interact using your account. - - ```bash Authorise Slack - composio add slack # Replace 'slack' with any supported app - - #composio add github || composio add linear || composio add notion - ``` - - After completing the authorisation, a new `connected_account` will be created and visible in your dashboard. - - -**View all active connections**. - - ```bash Show currently active connections - composio connections - ``` - - - \ No newline at end of file diff --git a/docs/sdk/cli/actions.mdx b/docs/sdk/cli/actions.mdx deleted file mode 100644 index 4373028e37d..00000000000 --- a/docs/sdk/cli/actions.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "🧑🏻‍💻 Managing Apps/Actions using CLI" -sidebarTitle: "Apps/Actions" -icon: "globe" -description: "Learn how to get/update enums for apps/actions using the CLI." ---- - -### Get actions for a use case -Get all the actions for a specific use case. You can just copy/paste the actions to your codebase. - - ```bash Show all actions for a use case - composio actions --use-case "Do all things related to tasks, spaces, folders etc. in asana" --app asana --limit=10 - ``` - - ```bash - > Actions for asana and use case all actions related to tasks, spaces, folders etc. in asana: - - Action.ASANA_TASKS_GET_MULTIPLE, Action.ASANA_TASKS_GET_TASK_RECORD, Action.ASANA_TASKS_DELETE_TASK, Action.ASANA_TASKS_GET_TASKS_BY_PROJECT, Action.ASANA_TASKS_GET_USER_TASK_LIST_TASKS, - Action.ASANA_TASKS_SET_PARENT_TASK, Action.ASANA_TASKS_SET_DEPENDENCIES_FOR_TASK, Action.ASANA_TASKS_ADD_PROJECT_TO_TASK, Action.ASANA_TASKS_ADD_TAG_TO_TASK, Action.ASANA_TASKS_ADD_FOLLOWERS_TO_TASK - - Do you want to copy these enums to the clipboard? (yes/no): - ``` - -### Update the enums for apps -We keep updating the enums for apps in our SDK. But, You can also update the enums for the apps you don't find in the SDK. - - ```bash Update Apps/Actions Enums - composio apps update - ``` - -Now you can use the updated enums for the apps in your codebase. \ No newline at end of file