discordbot/AGENTS.md

3.1 KiB

Info For AI Agents

  • All cogs from the cogs directory are automatically loaded by default. (in the main bot, at least. neru and gurt have hardcoded lists. but these bots are irrelevant unless specifically mentioned.)
  • If you need to exclude a cog from being loaded, check commands.py.
  • Hybrid commands are preferred to only legacy prefix commands unless specifcally requested.
  • Pytest (pytest -q) won't work in this environment, so don't run it.
  • For testing you can use pylint and python -m py_compile.
  • You are using python 3.11.
  • All pip dependencies are installed in the environment. (Except packages related to locally running AI, due to their large size.)
  • You have the ability to directly push to the git repo over https (url already set). And you should when you finish your task and have tested it.
  • If you encounter any hard to fix errors when pushing just leave it to the user to fix them. Try fixing merge conflicts/not having work from the remote by yourself.
  • You have a python script "tavilytool.py" in the project root, that you can use to search the web.

Tavily API Script Usage Instructions

Basic Usage

Search for information using simple queries:

python tavilytool.py "your search query"

Examples

python tavilytool.py "latest AI developments 2024"
python tavilytool.py "how to make chocolate chip cookies"
python tavilytool.py "current weather in New York"
python tavilytool.py "best programming practices Python"

Advanced Options

Search Depth

  • Basic search: python tavilytool.py "query" (default)
  • Advanced search: python tavilytool.py "query" --depth advanced

Control Results

  • Limit results: python tavilytool.py "query" --max-results 3
  • Include images: python tavilytool.py "query" --include-images
  • Skip AI answer: python tavilytool.py "query" --no-answer

Domain Filtering

  • Include specific domains: python tavilytool.py "query" --include-domains reddit.com stackoverflow.com
  • Exclude domains: python tavilytool.py "query" --exclude-domains wikipedia.org

Output Format

  • Formatted output: python tavilytool.py "query" (default - human readable)
  • Raw JSON: python tavilytool.py "query" --raw (for programmatic processing)

Output Structure

The default formatted output includes:

  • 🤖 AI Answer: Direct answer to your query
  • 🔍 Search Results: Titles, URLs, and content snippets
  • 🖼️ Images: Relevant images (when --include-images is used)

Command Combinations

# Advanced search with images, limited results
python tavilytool.py "machine learning tutorials" --depth advanced --include-images --max-results 3

# Search specific sites only, raw output
python tavilytool.py "Python best practices" --include-domains github.com stackoverflow.com --raw

# Quick search without AI answer
python tavilytool.py "today's news" --no-answer --max-results 5

Tips

  • Always quote your search queries to handle spaces and special characters
  • Use --max-results to control response length and API usage
  • Use --raw when you need to parse results programmatically
  • Combine options as needed for specific use cases