Tools and Portal Configuration
Tools and Portal Configuration
Envoy is composed of three distinct services: the Agent (Python), Tools (Node/Playwright), and Portal (React). This section outlines the primary configuration options for the Tools service and the Portal frontend to ensure they correctly integrate with the Agent and the external job platforms.
Tools Service Configuration
The tools/ service is responsible for browser automation and HTML parsing. It interacts directly with job platforms like SEEK and LinkedIn.
-
Default Port: The Tools service listens for incoming requests from the Agent on port
4320by default. You can override this by setting thePORTenvironment variable.# Run the Tools service on port 8002 PORT=8002 npm start -
Internal Authentication Secret: For secure communication between the Agent and Tools services, an internal authentication secret is used. Both services must be configured with the same secret. Set the
INTERNAL_AUTH_SECRETenvironment variable for the Tools service when running it.INTERNAL_AUTH_SECRET="your-unique-and-secret-key" npm start -
Browser Mode (Headless/Headful): The Tools service uses Playwright to automate a Chromium browser. By default, Playwright runs in
headlessmode, meaning no visible browser window is displayed. For debugging or when manual interaction with the browser is required (e.g., initial login to a job portal), you can run Playwright inheadfulmode by setting thePLAYWRIGHT_HEADLESSenvironment variable tofalse.PLAYWRIGHT_HEADLESS=false npm start -
Browser Login Sessions: It's important to note that browser sessions managed by the Tools service are held in memory and are lost on restart. This means if the Tools service restarts, you will likely need to re-authenticate manually on job portals (such as SEEK or LinkedIn) the next time an application workflow requires it. The Envoy Portal UI will prompt you for these manual login steps when necessary.
Portal Frontend Configuration
The portal/ service is the React-based user interface that allows you to review jobs and manage applications. It communicates directly with the Agent service.
-
Agent API Endpoint: The Portal needs to know the URL of the running Agent service to make its API calls. This is configured via the
VITE_AGENT_API_URLenvironment variable. By default, the Portal assumes the Agent is running athttp://localhost:8000.If your Agent service is running on a different host or port, you must set this environment variable when building or running the Portal.
For development:
# Example: If Agent is on port 8001 VITE_AGENT_API_URL=http://localhost:8001 npm run devFor production builds:
# Example: If Agent is on a remote server VITE_AGENT_API_URL=https://your-agent.example.com npm run build -
Building and Serving the Portal: To deploy the Portal for production, you will typically build the static assets and serve them using a web server.
First, install dependencies:
npm installThen, build the production assets (ensuring
VITE_AGENT_API_URLis set if needed):npm run buildThe generated static files will be located in the
dist/directory. These files can then be served by any standard static file server, such as Nginx, Apache, or a simple HTTP server.