Skip to content

Commit

Permalink
Doc changes suggested by claude (#892)
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Improved documentation grammar, clarity, and consistency across
multiple files, enhancing readability and professionalism.
> 
>   - **Grammar and Clarity Improvements**:
> - Corrected punctuation and grammar in `basic.mdx`,
`custom-action-for-existing-tool.mdx`, and
`custom-action-for-new-tool.mdx`.
> - Improved sentence structure and clarity in
`action-guide-with-agents.mdx`, `action-guide-without-agents.mdx`, and
`configure-tools.mdx`.
>   - **Consistency Enhancements**:
> - Standardized terminology and capitalization, such as "GitHub" and
"JavaScript", across `custom-integration.mdx`,
`use-specific-actions.mdx`, and `what-are-tools.mdx`.
> - Ensured consistent use of terms like "App" and "Tool" in
`use-tools.mdx` and `processing-actions.mdx`.
>   - **Miscellaneous**:
> - Fixed typos and minor errors in `get-action-inputs.mdx` and
`use-tools.mdx`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=ComposioHQ%2Fcomposio&utm_source=github&utm_medium=referral)<sup>
for 591fa72. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
abhishekpatil4 authored Nov 22, 2024
1 parent faa547b commit 64a02b0
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
14 changes: 7 additions & 7 deletions docs/introduction/foundations/basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ description: "Core Platform Modules"

<CardGroup cols={2}>
<Card color="#7bee0c" title="User & Auth Guide" icon="users" href="/patterns/Auth/">
Learn how to manage users and authentication, integrations!
Learn how to manage users and authentication integrations.
</Card>

<Card color="#7bee0c" title="Tools Guide" icon="arrow-right" href="../../patterns/tools/what-are-tools/">
Learn how to use, execute, process and even create tools!
Learn how to use, execute, process, and even create tools.
</Card>


Expand All @@ -20,9 +20,9 @@ Learn how to use, execute, process and even create tools!

| Component | Description |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Entity | **Entity represents your user (Jessica or John)** and all accounts that belong to a specific user will have same entity id.
| Accounts | Connections represent **link formed when your user connects their accounts (Github, Shopify, etc) to your app**.
| Tools | **Tools refer to the applications** that can be **connected by your user**.
| Actions | **Actions are tasks** on top of tools that you can perform using connections. (Send a mail using gmail tool)
| Triggers | **Triggers are predefined conditions** that, when met, initiate webhooks to your agents. (When a mail is received in a gmail account send a webhook)
| Entity | **Entity represents your user (Jessica or John)** and all accounts that belong to a specific user will have the same entity ID.
| Accounts | **Accounts represent the link formed when your users connect their accounts (GitHub, Shopify, etc.) to your app**.
| Apps | **Apps refer to the applications** that can be **connected by your users**.
| Actions | **Actions are tasks** on top of tools that you can perform using accounts. (Send a mail using Gmail tool)
| Triggers | **Triggers are predefined conditions** that, when met, initiate webhooks to your agents. (When a mail is received in a Gmail account, send a webhook)
| Integrations | **Configuration objects that define how your application connects to external services**, including OAuth credentials, permission scopes, and API specifications. They serve as reusable templates for standardizing authentication flows.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Create custom actions that leverage existing tool authentication t
---

<Tip>
Custom Actions are powerful building blocks that enable you to create custom functionality while leveraging existing tool authentication. They can handle everything from simple data processing to complex third-party integrations, either using pre-configured tool authentication or running independently.
Custom Actions are powerful building blocks that enable you to create custom functionality while leveraging existing tool authentication. They can handle everything from simple data processing to complex third-party integrations, either using a pre-configured tool authentication or running independently.
</Tip>

## Creating a Custom Action with Authentication
Expand Down Expand Up @@ -38,7 +38,7 @@ Since `gmail` is a registered tool in Composio, the `auth` credentials are autom
<CodeGroup>
```python Python
@action(toolname="gmail", requires=["example-pypi-package"]) # supports any package
def my_custom_action(auth: dict, account_id: str) -> str: # Uses existing gmail auth
def my_custom_action(auth: dict, account_id: str) -> str: # Uses existing Gmail auth
"""
Fetch emails from Gmail account for last 24 hours
Expand Down
16 changes: 8 additions & 8 deletions docs/patterns/tools/build-tools/custom-action-for-new-tool.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Build Tools without Auth"
sidebarTitle: "Build Tools without Auth"
title: "Build Tools Without Auth"
sidebarTitle: "Build Tools Without Auth"
icon: "plus"
description: "Create standalone custom tools and actions for any functionality you need (e.g., data processing, calculations, or integrations with other services)"
---
Expand All @@ -20,7 +20,7 @@ from composio import ComposioToolSet, App, action

toolset = ComposioToolSet()
```
```javascript Javascript
```javascript JavaScript
import { OpenAIToolSet } from "composio-core"
import { z } from "zod"

Expand Down Expand Up @@ -63,7 +63,7 @@ await toolset.createAction({
Executing the custom action without Agents (it can be used with agents too)
<CodeGroup>
```python Python
toolset.execute_action(
result = toolset.execute_action(
action=my_custom_action,
params={"message": "AI is the future"}
)
Expand Down Expand Up @@ -95,7 +95,7 @@ Output from executing Custom Action
||----w |
|| ||
```
```shell Output (Javascript)
```shell Output (JavaScript)
Cow says: AI is the future
```
</CodeGroup>
Expand All @@ -107,6 +107,6 @@ Cow says: AI is the future

Custom Tools or Actions provide several advantages:

- **Data privacy:** Execution happens on the user’s machine, ensuring sensitive data doesn’t leave the local environment.
- **Flexibility:** Users can create and customize as many tools and actions as needed.
- **Compatibility:** Custom actions can be integrated seamlessly across various Composio-supported platforms.
- **Data privacy:** Execution happens on the user’s machine, ensuring sensitive data doesn’t leave the local environment
- **Flexibility:** Users can create and customize as many tools and actions as needed
- **Compatibility:** Custom actions can be integrated seamlessly across various Composio-supported platforms
2 changes: 1 addition & 1 deletion docs/patterns/tools/custom-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Here's a tutorial showing how to add Notion as an App on Composio
width="560"
height="315"
src="https://www.youtube.com/embed/xU9jY7NsfOA?si=fIrJo6Ya38Mms819"
title="Openapi spec import"
title="OpenAPI spec import"
frameborder="0"
allow="accelerometer;
autoplay;
Expand Down
6 changes: 3 additions & 3 deletions docs/patterns/tools/use-tools/action-guide-with-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description: "Guide to using Tools with LLMs"

### Using Tools with LLMs

Composio enables you to integrate various tools (like Gmail, GitHub, Salesforce) and perform actions (such as sending emails or creating GitHub issues). Browse our complete list of supported [Tools](https://app.composio.dev/apps).
Composio enables you to integrate various tools (such as Gmail, GitHub, and Salesforce) and perform actions (such as sending emails or creating GitHub issues). Browse our complete list of supported [Tools](https://app.composio.dev/apps).

Here's how you can use Apps with LLMs:
Here's how to use Tools with LLMs:
<CodeGroup>
```python Python
# Import required libraries
Expand Down Expand Up @@ -70,6 +70,6 @@ console.log(result);
```
</CodeGroup>

This code demonstrates how to use LLMs with Composio Tools to execute actions. The example shows how to connect OpenAI's LLM with Composio's tools - in this case, using GitHub tool. The LLM understands the natural language task ("Star the repo") and determines which action to use from Github tool, then executes the action.
This code demonstrates how to use LLMs with Composio Tools to execute actions. The example shows how to connect OpenAI's LLM with Composio's tools, in this case using the GitHub tool. The LLM understands the natural language task ("Star the repo") and determines which action to use from the GitHub tool, then executes the action.

Composio supports multiple agent frameworks including LlamaIndex, CrewAI, Letta, and LangChain. See the [**Supported Frameworks**](../../../framework) section for details.
4 changes: 2 additions & 2 deletions docs/patterns/tools/use-tools/action-guide-without-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
title: "🛠️ How can I use Tools directly?"
sidebarTitle: "Use Tools Directly"
icon: "fax"
description: "Guide to using Tools directly like calling a function"
description: "Guide to use Tools directly as function calls"
---

### Using Tools Directly

Composio lets you use tools directly like calling a function. When calling a tool directly, you'll need to provide the input parameters. Checkout [Get Action Schema](/patterns/tools/use-tools/get-action-inputs) to learn how to get the input parameters for an action.
Composio allows you to execute tools directly as function calls. When calling a tool directly, you'll need to provide the input parameters. Checkout [Get Action Schema](/patterns/tools/use-tools/get-action-inputs) to learn how to get the input parameters for an action.

<CodeGroup>
```python Python Star a repo
Expand Down
4 changes: 2 additions & 2 deletions docs/patterns/tools/use-tools/configure-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "Learn how to configure tools"

## Initialization Parameters

When setting up Composio tools, you'll might need to provide various configuration parameters like API keys, session IDs, or custom settings. These parameters can be specified at two levels:
When setting up Composio tools, you might need to provide various configuration parameters like API keys, session IDs, or custom settings. These parameters can be specified at two levels:

1. **App-level**: Parameters that apply to all actions within a specific tool/app
2. **Action-level**: Specific parameters needed for individual actions
Expand Down Expand Up @@ -78,7 +78,7 @@ Coming Soon
</Steps>

### How to add metadata at App-level?
Above we saw how to add metadata at the Action-level, below is an example of how to add them at the App-level.
Above we saw how to add metadata at the Action-level. Here's an example of how to add metadata at the App-level:
<CodeGroup>
```python Python
toolset = ComposioToolSet(
Expand Down
2 changes: 1 addition & 1 deletion docs/patterns/tools/use-tools/get-action-inputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ console.log(JSON.stringify(schema[0].parameters.properties, null, 2));
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive. . Please provide a value of type string. This parameter is required.",
"description": "The name of the repository without the `.git` extension. The name is not case sensitive. Please provide a value of type string. This parameter is required.",
"title": "Repo",
"type": "string"
}
Expand Down
8 changes: 4 additions & 4 deletions docs/patterns/tools/use-tools/processing-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Coming Soon
```
</CodeGroup>
</Step><Step title="Define a Custom Function to Modify Input">
This function will be used to modify the input data for the `LINEAR_CREATE_LINEAR_ISSUE` action. here we have added the values for `project_id` and `team_id` parameters to the input data, by doing this can can avoid specifying these values in the prompt and be sure that agent uses the correct values. The technical term for this is **Action-level Pre-Processing**.
This function will be used to modify the input data for the `LINEAR_CREATE_LINEAR_ISSUE` action. Here we have added the values for `project_id` and `team_id` parameters to the input data. By doing this, we can avoid specifying these values in the prompt and be sure that the agent uses the correct values. The technical term for this is **Action-level Pre-Processing**.
<CodeGroup>
```python Python
def linear_pre_processor(input_data: dict) -> dict:
Expand All @@ -77,12 +77,12 @@ Coming Soon
</CodeGroup>
</Step>
<Step title="Define a Custom Function to Modify Output">
This function will be used to modify the output data for the `LINEAR_CREATE_LINEAR_ISSUE` action. here we are modifying the output to just return the action execution status `successful` & the `issue_id`, by doing this can keep the LLM context clean. The technical term for this is **Action-level Post-Processing**.
This function will be used to modify the output data for the `LINEAR_CREATE_LINEAR_ISSUE` action. Here we are modifying the output to just return the action execution status `successful` & the `issue_id`, by doing this can keep the LLM context clean. The technical term for this is **Action-level Post-Processing**.
<CodeGroup>
```python Python
def linear_post_processor(output_data: dict) -> dict:
output_data = {
'success': output_data['successfull'],
'success': output_data['successful'],
'issue_id': output_data['data']['id']
}
return output_data
Expand Down Expand Up @@ -120,7 +120,7 @@ Coming Soon
<Step title="Invoke the agent">
<CodeGroup>
```python Python
task = "Create a Linear Issue with to update the frontend"
task = "Create a Linear Issue to update the frontend"

agent = create_openai_functions_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
Expand Down
2 changes: 1 addition & 1 deletion docs/patterns/tools/use-tools/use-specific-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: "Each Tool (like GitHub, Slack, etc.) comes with many Actions. You
</Tip>

### Specifying Actions
`GITHUB_CREATE_AN_ISSUE` and `GITHUB_COMMIT_EVENT` are action IDs for actions in the Github Tool
`GITHUB_CREATE_AN_ISSUE` and `GITHUB_COMMIT_EVENT` are action IDs for actions in the GitHub Tool
<CodeGroup>
```python Python
from composio import ComposioToolSet, App, action
Expand Down
2 changes: 1 addition & 1 deletion docs/patterns/tools/what-are-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Learn about tools in Composio"
---
### What are tools?

Large Language Models (LLMs) are like a highly intelligent person who can understand and reason about almost anything but is sitting in an empty room with no ability to interact with the outside world. They can think and talk about sending emails, creating a ticket on Jira, or cloning a repository from github, but can't actually DO these things.
Large Language Models (LLMs) are like a highly intelligent person who can understand and reason about almost anything but is sitting in an empty room with no ability to interact with the outside world. They can think and talk about sending emails, creating a ticket on Jira, or cloning a repository from GitHub, but can't actually DO these things.

This is where tools come in. Tools give this intelligent being specific abilities to interact with the real world. Many AI models support tool calling (also called function calling).

Expand Down

0 comments on commit 64a02b0

Please sign in to comment.