Deployment and Verification of Agent Endpoints
Summary
This process describes the deployment and end-to-end testing workflow for new agent-related API features. It involves synchronizing the feat/agent-endpoints backend branch with the feat/agent-tab frontend branch and verifying the functionality of the /api/agents endpoint.
Details
The deployment process was initiated to resolve a discrepancy between the development environment and the running backend service. During testing, it was observed that the backend service, identified as fastapi-verdmat, was running code from the master branch. This resulted in 404 errors when attempting to access the new /api/agents endpoint and a lack of the unified layers field in the prediction logic.
To facilitate end-to-end verification using Chrome DevTools, the following workflow was established:
-
Code Synchronization: Changes were pushed to two primary repositories:
feat/agent-tabwas pushed to theRationallyPrime/Sokrates-AIrepository (frontend).feat/agent-endpointswas pushed to theRationallyPrime/residual-modelingrepository (backend).
-
Deployment Strategy: Two options were identified for updating the backend service to the new feature set:
- Merging the
feat/agent-endpointsbranch into themasterbranch. - Checking out the
feat/agent-endpointsbranch directly on the server where the service resides.
- Merging the
-
Service Management: Once the code is updated on the target environment, the backend service must be refreshed. The specific command for this action is
sudo systemctl restart fastapi-verdmat. This indicates that the backend is managed as a systemd service, consistent with the project’s NixOS-based infrastructure. -
Verification: After the service restart, Chrome DevTools is used to inspect network traffic and verify that the
/api/agentsendpoint returns the expected data and that thepredictfunctionality correctly utilizes the unifiedlayersfield.
The process concluded with the clean shutdown of the frontend-dev environment while awaiting final confirmation on the deployment method for the backend.