diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..4129138 Binary files /dev/null and b/.DS_Store differ diff --git a/agentstack/.DS_Store b/agentstack/.DS_Store new file mode 100644 index 0000000..f03cb10 Binary files /dev/null and b/agentstack/.DS_Store differ diff --git a/agentstack/templates/.DS_Store b/agentstack/templates/.DS_Store new file mode 100644 index 0000000..a838d61 Binary files /dev/null and b/agentstack/templates/.DS_Store differ diff --git a/agentstack/templates/crewai/.DS_Store b/agentstack/templates/crewai/.DS_Store new file mode 100644 index 0000000..1c6434b Binary files /dev/null and b/agentstack/templates/crewai/.DS_Store differ diff --git a/agentstack/templates/crewai/tools/.DS_Store b/agentstack/templates/crewai/tools/.DS_Store new file mode 100644 index 0000000..b6a8294 Binary files /dev/null and b/agentstack/templates/crewai/tools/.DS_Store differ diff --git a/agentstack/templates/crewai/tools/exa_tool.py b/agentstack/templates/crewai/tools/exa_tool.py new file mode 100644 index 0000000..9eb2e19 --- /dev/null +++ b/agentstack/templates/crewai/tools/exa_tool.py @@ -0,0 +1,35 @@ +from crewai_tools import tool +from exa_py import Exa +from dotenv import load_dotenv +import os + +load_dotenv() + +# Check out our docs for more info! https://docs.exa.ai/ +@tool("Exa search and get contents") +def search_and_contents(question: str) -> str: + """ + Tool using Exa's Python SDK to run semantic search and return result highlights. + Args: + question: The search query or question to find information about + Returns: + Formatted string containing titles, URLs, and highlights from the search results + """ + exa = Exa(api_key=os.getenv('EXA_API_KEY')) + + response = exa.search_and_contents( + question, + type="neural", + use_autoprompt=True, + num_results=3, + highlights=True + ) + + parsedResult = ''.join([ + f'