Notes for Codex agents
This repository implements a Flask-based automation platform. The two most
important pieces are the Driver and the APIServer classes located in
AFL/automation/APIServer/.
Driver
- Found in
AFL/automation/APIServer/Driver.py. - Base class for device-specific drivers. Subclasses expose methods that can be called via the API.
- Uses decorators
Driver.queuedandDriver.unqueuedto mark methods for asynchronous queue execution or immediate execution. - Manages a
PersistentConfigobject for storing configuration options. - Provides helper methods like
execute,set_sample,deposit_obj, andretrieve_objthat are used by the server.
APIServer
- Found in
AFL/automation/APIServer/APIServer.py. - Wraps a Flask app that exposes driver functionality via HTTP endpoints.
- Maintains a task queue processed by
QueueDaemonto run queued driver methods. - Routes include
/enqueuefor queued tasks and/query_driverfor unqueued operations, among many others. - The server optionally advertises itself via zeroconf and can run using waitress or Flask's built-in server.
Useful pointers
- The
Clientclass (AFL/automation/APIServer/Client.py) provides a Python interface to interact with the server. - Test helpers live in
test/and may rely on optional dependencies listed inrequirements-basic.txt. - Documentation for getting started can be found in
docs/source/tutorials/quick-start.rstanddocs/source/explanation/architecture.rst.