I am working on creating a game ai player that will move around and fight with other ai.

I am currently wondering how the best way to allow the ai to check the area around itself for objects to collide with and enemies without the use of Pygame and rects. (I could use pyglet though, if that has a similar rect functionality). All I care about understanding is how I should go about getting what is in the area around the ai.

If you are intereseted in pathfinding in general you should probably start by researching a* (a star) and perhaps Djikstra's algorithm. Basically you need to look into graph traversal. Whether or not you use Pygame or Pyglet when implementing these things is irrelevant. You could even use NetworkX which has some builtin shortest path methods.

Here is an a star example project I worked on a while back (it hasn't been refined very recently):https://github.com/Mekire/find-a-way-astar-pathfindingThe interface uses pygame, but the actual implementation of the algorithm does not rely on pygame (interface seperated from implementation).