Repository¶
Project Structure¶
The project is structured as follows:
app/: contains the STELLA flask socketio applicationcli/: contains the STELLA CLI
STELLA Application (app/)¶
The flask application is structured as follows:
run.py: the main entry point for the applicationagents/: contains agents that are used by the applicationmodels/: base classesutils/: utility functionsviews/: contains api endpoints and socketio eventsdb/: contains database models
To run the application, run python run.py from the app/ directory.
Important files¶
__init__.pycontains the application factory
registers blueprints for socketio events and api endpoints
loads settings from .env file
.envcontains environment variables for the application
config.pycontains configuration for authentication, database, and application settings
agent_storage.pycontains the AgentStorage class
used to store and retrieve pre-made agents as they are needed
chat_queue.pycontains the ChatQueue class
when a user sends a message, it is added to the queue to be processed
the queue is processed in multiple threads and creates Tasks for each message
task_manager.pycontains the TaskManager class
used to manage the tasks that are created when a message is received
tasks are created for each message and are processed in multiple threads
tasks creation can be triggered by user messages (top-level tasks), or by Agents (subtasks)
openai_client.pycontains the OpenAIClient class
used to interact with the OpenAI API