Integrate Salesforce as a custom tool in an AI Agents
Do you want a simple way to integrate Salesforce into your smolagents agents? There is an simple way to achieve this. First, let’s add smolagents, python-dotenv and simple-salesforce cli, in requirements.txt file: smolagents[gradio] python-dotenv simple-salesforce Next, let’s code a simple AI Agent: import os import yaml from dotenv import load_dotenv from simple_salesforce import Salesforce from smolagents import (CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool) from Gradio_UI import GradioUI load_dotenv('.env') @tool def get_insurance_policies_by_status(status: str) -> str: """A tool that fetches the number of insurance policies from Salesforce based on their status....