AgenticAI Framework includes 35+ production-ready tools that extend agent capabilities. From web search to code execution, database operations to AI services.
Enterprise Integrations
The framework also includes 18 enterprise integration connectors for ServiceNow, GitHub, Slack, Salesforce, AWS, Azure, GCP, and more.
importlogginglogger=logging.getLogger(__name__)fromagenticaiframework.toolsimportWikipediaToolwiki=WikipediaTool(language="en",max_chars=5000)# Search Wikipediacontent=wiki.run("Quantum computing")logger.info(content)# Get specific sectionscontent=wiki.run("Quantum computing",sections=["Applications","History"])
importlogginglogger=logging.getLogger(__name__)fromagenticaiframework.toolsimportTranslationTooltranslator=TranslationTool(provider="google")translated=translator.run(text="Hello, how are you?",source_lang="en",target_lang="es")logger.info(translated)# "Hola, ΒΏcΓ³mo estΓ‘s?"
fromagenticaiframework.toolsimportGitToolgit=GitTool(repo_path="/path/to/repo")# Get statusstatus=git.run("status")# Get diffdiff=git.run("diff",args=["HEAD~1"])# Get loglog=git.run("log",args=["--oneline","-10"])
importlogginglogger=logging.getLogger(__name__)fromagenticaiframework.toolsimportFileReadToolreader=FileReadTool(allowed_extensions=[".txt",".py",".json",".md",".csv"],max_file_size=10_000_000# 10MB)content=reader.run("/path/to/file.txt")logger.info(content)# Read specific linescontent=reader.run("/path/to/file.txt",start_line=10,end_line=50)
fromagenticaiframework.toolsimportFileWriteToolwriter=FileWriteTool(allowed_extensions=[".txt",".json",".md"],allowed_directories=["/tmp","/data"])writer.run(path="/tmp/output.txt",content="Hello, World!",mode="write"# or "append")
importlogginglogger=logging.getLogger(__name__)fromagenticaiframework.toolsimportSQLToolsql=SQLTool(connection_string="postgresql://user:pass@localhost/db")# Queryresults=sql.run("SELECT * FROM users WHERE active = true LIMIT 10")forrowinresults:logger.info(row)# With parameters (safe from SQL injection)results=sql.run("SELECT * FROM users WHERE email = :email",params={"email":"alice@example.com"})
fromagenticaiframework.toolsimportRedisToolredis=RedisTool(host="localhost",port=6379)# Get/Setredis.run("set",key="user:123",value={"name":"Alice"},ttl=3600)value=redis.run("get",key="user:123")# List operationsredis.run("push",key="queue",value="task1")item=redis.run("pop",key="queue")
fromagenticaiframework.toolsimportS3Tools3=S3Tool(bucket="my-bucket")# List filesfiles=s3.run("list",prefix="data/")# Downloadcontent=s3.run("download",key="data/file.json")# Uploads3.run("upload",key="data/output.json",content=json.dumps(data))
fromagenticaiframework.toolsimportImageGenerationToolimage_gen=ImageGenerationTool(provider="openai",model="dall-e-3")# Generate imageresult=image_gen.run(prompt="A futuristic city with flying cars",size="1024x1024",quality="hd")# Save imagewithopen("city.png","wb")asf:f.write(result["image_data"])
importlogginglogger=logging.getLogger(__name__)fromagenticaiframework.toolsimportVisionToolvision=VisionTool(provider="openai",model="gpt-4-vision-preview")# Analyze imageanalysis=vision.run(image_path="/path/to/image.jpg",prompt="Describe this image in detail")logger.info(analysis)# From URLanalysis=vision.run(image_url="https://example.com/image.jpg",prompt="What objects are in this image?")
fromagenticaiframework.toolsimportTextToSpeechTooltts=TextToSpeechTool(provider="openai",voice="nova")# Generate speechaudio=tts.run("Hello, how can I help you today?")# Save audiowithopen("output.mp3","wb")asf:f.write(audio)
fromagenticaiframework.toolsimportEmailToolemail=EmailTool(smtp_host="smtp.gmail.com",smtp_port=587,username="user@gmail.com",password="app_password")# Send emailemail.run(to="recipient@example.com",subject="Hello from AgenticAI",body="This is a test email.",attachments=["/path/to/file.pdf"])
fromagenticaiframework.toolsimportClipboardToolclipboard=ClipboardTool()# Copy to clipboardclipboard.run("copy",text="Hello, World!")# Paste from clipboardcontent=clipboard.run("paste")
fromagenticaiframework.toolsimporttool@tooldefget_stock_price(ticker:str)->dict:"""Get current stock price for a ticker symbol. Args: ticker: Stock ticker symbol (e.g., AAPL, GOOGL) Returns: Dictionary with price information """# Your implementationprice=fetch_stock_price(ticker)return{"ticker":ticker,"price":price,"currency":"USD"}
fromagenticaiframework.toolsimportToolclassWeatherTool(Tool):name="weather"description="Get current weather for a location"def__init__(self,api_key:str):self.api_key=api_keydef_run(self,location:str,units:str="celsius")->dict:""" Args: location: City name or coordinates units: Temperature units (celsius or fahrenheit) """# Synchronous implementationresponse=requests.get(f"https://api.weather.com/current",params={"location":location,"units":units},headers={"Authorization":f"Bearer {self.api_key}"})returnresponse.json()asyncdef_arun(self,location:str,units:str="celsius")->dict:"""Async implementation."""asyncwithaiohttp.ClientSession()assession:asyncwithsession.get(f"https://api.weather.com/current",params={"location":location,"units":units},headers={"Authorization":f"Bearer {self.api_key}"})asresponse:returnawaitresponse.json()
fromagenticaiframework.toolsimportToolfrompydanticimportBaseModel,FieldclassStockInput(BaseModel):ticker:str=Field(...,description="Stock ticker symbol")include_history:bool=Field(False,description="Include price history")days:int=Field(7,description="Days of history to include")classStockTool(Tool):name="stock_price"description="Get stock price and optional history"args_schema=StockInputdef_run(self,ticker:str,include_history:bool=False,days:int=7):# Implementationpass