{"id":28271240,"url":"https://github.com/alexandramartinez/mac-project","last_synced_at":"2026-02-03T05:02:29.285Z","repository":{"id":292027690,"uuid":"979576255","full_name":"alexandramartinez/mac-project","owner":"alexandramartinez","description":"This project demonstrates how to integrate the MAC project's modules and connectors for your Mule projects.","archived":false,"fork":false,"pushed_at":"2025-05-08T19:28:36.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T23:04:17.171Z","etag":null,"topics":["ai","mule","mule-app","mule4","mulesoft"],"latest_commit_sha":null,"homepage":"https://mac-project.ai/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexandramartinez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-07T18:20:15.000Z","updated_at":"2025-05-08T19:28:39.000Z","dependencies_parsed_at":"2025-05-07T19:39:50.008Z","dependency_job_id":"71687c95-0ef2-4bd3-850f-395c01dd6164","html_url":"https://github.com/alexandramartinez/mac-project","commit_stats":null,"previous_names":["alexandramartinez/mac-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexandramartinez/mac-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandramartinez%2Fmac-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandramartinez%2Fmac-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandramartinez%2Fmac-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandramartinez%2Fmac-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandramartinez","download_url":"https://codeload.github.com/alexandramartinez/mac-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandramartinez%2Fmac-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29033716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T02:28:16.591Z","status":"ssl_error","status_checked_at":"2026-02-03T02:27:48.904Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","mule","mule-app","mule4","mulesoft"],"created_at":"2025-05-20T18:20:21.633Z","updated_at":"2026-02-03T05:02:29.251Z","avatar_url":"https://github.com/alexandramartinez.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MuleSoft AI Chain (MAC) Project testing\n\nThis project demonstrates how to integrate the [MAC project](https://mac-project.ai/)'s modules and connectors for your Mule projects.\n\n## In this Project\n\n### Agentforce\n\nConnect to your Agentforce Agent via API.\n\n- [**Conversation**](https://mac-project.ai/docs/agentforce/supported-operations/conversation)\n  - Start\n  - Continue\n  - End\n\n### Einstein AI\n\nUse the Einstein AI trust layer to make use of different models from Einstein.\n\n- [**Agent**](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-agent-operations)\n  - Define Prompt Template\n- [**Chat**](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-chat-operations)\n  - Answer Prompt\n  - Generate From Messages\n- [**Embeddings**](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-embeddings-operations)\n  - Adhoc File Query\n  - Generate From File\n  - Generate From Text\n- [**RAG**](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-rag-operations)\n  - Adhoc Load Document\n\n\u003e [!TIP]\n\u003e **Agent**, **Chat** and **RAG** make use of LLMs to give an answer in natural language, whereas **Embeddings** will give numeric responses since no LLM is being used.\n\u003e\n\u003e **Tools - Use AI Service** operation is not included in this project.\n\n## Prerequisites\n\n- **Salesforce org** - Create a new dev account [here](https://www.salesforce.com/form/developer-signup/?d=pb)\n- **MuleSoft IDE** - Anypoint Studio or Anypoint Code Builder\n\n## Salesforce Configuration\n\n### 1. Salesforce Connected App\n\n\u003e [!NOTE]\n\u003e Based on [these instructions](https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html).\n\n1. Open your Salesforce org and to go **Setup**.\n2. From setup, use **Quick Find** to search for **App Manager**.\n3. Click **New Connected App** and then select **Create a Connected App**.\n4. Specify a Connected App Name like `mac_project`.\n5. Add your contact email. Make sure it's a real email, you'll need it later.\n6. Check **Enable OAuth Settings** ✅\n7. Callback URL: `https://login.salesforce.com`\n8. Selected OAuth Scopes. **Do NOT select more scopes or you'll get a scope error**:\n   - Access chatbot services (chatbot_api)\n   - Access the Salesforce API Platform (sfap_api)\n   - Manage user data via APIs (api)\n   - Perform requests at any time (refresh_token, offline_access)\n9. Deselect/select the following settings:\n   - Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows ◻️\n   - Require Secret for Web Server Flow ◻️\n   - Require Secret for Refresh Token Flow ◻️\n   - Enable Client Credentials Flow ✅\n   - Enable Authorization Code and Credentials Flow ◻️\n   - Enable Token Exchange Flow ◻️\n   - Enable Refresh Token Rotation ◻️\n   - Issue JSON Web Token (JWT)-based access tokens for named users ✅\n   - Introspect All Tokens ◻️\n10. Save the app and click **Continue**.\n11. Once you're in the **Manage Connected Apps** page, click **Manage**.\n12. Click **Edit Policies**.\n    - Permitted Users: **All users may self-authorize**\n    - Enable Single Logout ◻️\n    - Run As `\u003cselect your user, in my case, Alex Martinez\u003e`\n    - Issue JSON Web Token (JWT)-based access tokens ✅\n    - Token Timeout: **30 Minutes**\n13. Go back to the connected app and click **Manage Consumer Details**.\n14. Add your verification code from your email.\n15. Click **generate** and then **apply**.\n16. Copy the consumer key/secret from the top. You will use these in MuleSoft.\n\n### 2. Agentforce Setup\n\n1. In Setup, go to **Einstein Setup** and turn on Einstein.\n2. Wait a few seconds and **refresh the site**. You might not see the following options if you don't refresh.\n3. Look for **Agentforce Agents** and turn on Agentforce.\n4. Enable the Agentforce default Agent.\n5. In **Agentforce Agents**, click on **New Agent**.\n6. Create from a Template \u003e **Agentforce Service Agent**\n7. Remove all the topics to start from scratch\n   - (optional) Add the Off Topic topic with the information from [off-topic.md](/topics/off-topic.md)\n8. Add the following details:\n    - Name: `Agentforce MuleSoft Agent`\n    - API Name: `Agentforce_MuleSoft_Agent`\n    - Description: `Use custom topics and actions to connect to your MuleSoft APIs.`\n    - Role: `An AI customer service agent who connects to MuleSoft APIs for custom functionality.`\n    - Company: `This company is used for demo purposes.`\n9.  Don't add Data Cloud resources for this example.\n10. Once the agent is created and you have it open, click **Connections**.\n11. Click on **Add** to add a new connection.\n12. Select **API**, add an integration name like `MAC Project Integration` and select the connected app you previously created (`mac_project`).\n13. Once you add the connection, make sure to click on **Activate** at the top-right of the screen.\n\n\u003e [!IMPORTANT]\n\u003e The Mule API cannot call Agents that are deactivated. Make sure that it's **Active** in Salesforce. BUT anytime that you need to modify the agent, you have to deactivate it first.\n\n## Mule Configuration\n\nCopy the [dev-properties.yaml](src/main/resources/dev-properties.yaml) file and create a `local-properties.yaml` file.\n\nConfigure your environment and Salesforce credentials:\n\n```yaml\n  domain: YOUR_SALESFORCE_ORG_DOMAIN\n  clientId: YOUR_CONNECTED_APP_CLIENT_ID\n  clientSecret: YOUR_CONNECTED_APP_CLIENT_SECRET\n```\n\nYour Client ID / Secret is the same from your Connected App's Consumer Key / Secret. \n\nYou can obtain your Salesforce Org's domain from Salesforce Setup \u003e **My Domain** \u003e **Current My Domain URL**. For example: `orgfarm-6acf46e05z-dev-ed.develop.my.salesforce.com`\n\n## Running the Project\n\n1. Import the project into Anypoint Studio or Anypoint Code Builder.\n2. Ensure your `local-properties.yaml` is correctly configured.\n3. Run the Mule application.\n\nYou can find the HTTP requests in [requests/](/requests/). I am using the [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension in VS Code to run these from the text editor, but you can use Postman, cURL, or any other REST Client you prefer.\n\n## Troubleshooting\n\n- **Authentication errors:** Double-check your Client ID, Client Secret, and Connected App settings.\n- **Scope errors:** Make sure the scopes in your Connected App are set up correctly. If you add more/less scopes than the mentioned in the settings here, you might get scope errors.\n- **Network issues:** Ensure your Mule server can reach Salesforce.\n\n## References\n\n- [Salesforce OAuth Scopes Documentation](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_scopes.htm)\n- [Salesforce Agent API - Get Started](https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html)\n- [Agentforce Supported Operations - Conversation](https://mac-project.ai/docs/agentforce/supported-operations/conversation)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandramartinez%2Fmac-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandramartinez%2Fmac-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandramartinez%2Fmac-project/lists"}