diff --git a/js/examples/market_research_agent/readme..md b/js/examples/market_research_agent/readme.md similarity index 55% rename from js/examples/market_research_agent/readme..md rename to js/examples/market_research_agent/readme.md index e39a50b65dc..df80ea93472 100644 --- a/js/examples/market_research_agent/readme..md +++ b/js/examples/market_research_agent/readme.md @@ -12,9 +12,14 @@ cd composio/js/examples/market_research_agent 2. Install dependencies: ```bash -pnpm install @langchain @langchain/openai composio-core express +pnpm install ``` +Required dependencies: +- `@langchain/openai`: For OpenAI model integration +- `composio-core`: For Composio toolset functionality +- `express`: For web server functionality (if running as a service) + ## Usage 1. Navigate to the project directory: @@ -23,7 +28,11 @@ pnpm install @langchain @langchain/openai composio-core express cd path/to/your/project ``` -2. Add your environment variables in a `.env` file. Make sure to include the necessary API keys, such as `COMPOSIO_API_KEY` and `OPENAI_API_KEY`. +2. Set up environment variables: + - Copy `.env.example` to `.env` + - Fill in the required API keys: + - `COMPOSIO_API_KEY`: Your Composio API key for tool access + - `OPENAI_API_KEY`: Your OpenAI API key for GPT-4 model access 3. Execute the application: @@ -33,4 +42,4 @@ pnpm install @langchain @langchain/openai composio-core express ## Customization -You can customize the domain of market research agent by modifying the `domain` variable in the `demo.mjs` file. \ No newline at end of file +You can customize the domain of market research agent by modifying the `domain` variable in the `demo.mjs` file. diff --git a/js/examples/portfolio-generator/README.md b/js/examples/portfolio-generator/README.md new file mode 100644 index 00000000000..7b88ab67f15 --- /dev/null +++ b/js/examples/portfolio-generator/README.md @@ -0,0 +1,61 @@ +# Portfolio Generator Demo + +This demo shows how to create a portfolio website using Composio and Vercel AI. The agent generates ReactJS code for a portfolio website based on your professional information and saves it to a Google Doc. + +## Features +- Generates ReactJS code for a portfolio website +- Creates folder structure and setup instructions +- Saves output to Google Docs +- Uses Code Interpreter for code generation +- Integrates with Google Docs for documentation + +## Setup + +1. Clone the repository and navigate to this folder: +```bash +git clone https://github.com/composioHQ/composio.git +cd composio/js/examples/portfolio-generator +``` + +2. Install dependencies: +```bash +pnpm install +``` + +Required dependencies: +- `@ai-sdk/openai`: For OpenAI model integration and GPT-4 access +- `ai`: For text generation functionality +- `composio-core`: For Composio toolset and entity management +- `dotenv`: For environment variable management +- `zod`: For data validation and type safety + +3. Set up environment variables: + - Copy `.env.example` to `.env` + - Fill in the required API keys: + - `COMPOSIO_API_KEY`: Your Composio API key for tool access + - `OPENAI_API_KEY`: Your OpenAI API key for GPT-4 model access + - `GROQ_API_KEY` (Optional): Your Groq API key if using Groq models instead of OpenAI + +```bash +# Copy the example environment file +cp .env.example .env + +# Edit .env and add your API keys +nano .env +``` + +4. Run the demo: +```bash +node demo.mjs +``` + +## How it works + +The demo: +1. Sets up a Composio toolset with Code Interpreter and Google Docs integration +2. Takes your professional information as input +3. Uses AI to generate ReactJS code for a portfolio website +4. Creates a detailed folder structure and setup instructions +5. Saves all generated content to a Google Doc + +The agent will automatically process your information and generate a complete portfolio website setup. diff --git a/js/examples/scheduling-agent/readme.md b/js/examples/scheduling-agent/readme.md index 6d58b13dbff..f096302e359 100644 --- a/js/examples/scheduling-agent/readme.md +++ b/js/examples/scheduling-agent/readme.md @@ -15,10 +15,26 @@ cd composio/js/examples/scheduling-agent pnpm install ``` -3. Create a `.env` file in this directory and add your Composio API key: +Required dependencies: +- `@ai-sdk/openai`: For OpenAI model integration +- `ai`: For text generation functionality +- `composio-core`: For Composio toolset and entity management +- `dotenv`: For environment variable management +- `zod`: For data validation + +3. Set up environment variables: + - Copy `.env.example` to `.env` + - Fill in the required API keys: + - `COMPOSIO_API_KEY`: Your Composio API key for tool access + - `OPENAI_API_KEY`: Your OpenAI API key for GPT-4 model access + - `GROQ_API_KEY` (Optional): Your Groq API key if using Groq models instead of OpenAI + ```bash -COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY -OPENAI_API_KEY=YOUR_OPENAI_API_KEY +# Copy the example environment file +cp .env.example .env + +# Edit .env and add your API keys +nano .env ``` 4. Run the demo: @@ -35,4 +51,4 @@ The demo sets up a trigger listener that: 3. Creates calendar events via Google Calendar 4. Sends confirmation emails via Gmail -The agent will automatically process incoming messages and handle the scheduling workflow. \ No newline at end of file +The agent will automatically process incoming messages and handle the scheduling workflow.