- https://github.com/optimalagents-ai/magic-rag-chatbot
- https://github.com/optimalagents-ai/db-query-chatbot-agent
π Interface & Routes
Design your agentβs interface routes following these guidelines:-
Main Interface
- Create a single unified interface at β/β for all user interactions
- Keep the interface clean and intuitive
- Put clear instructions on how to use the agent
- Use a framework like FastAPI, Flask, or Node.js for building the interface
- Ensure the interface is responsive and user-friendly
- Need to use windows.href (javascript ) then add /your path name
-
API routes
- Define routes for API interactions
- Use RESTful principles for API design
- Example routes:
/run
- for executing agent logic/process
- for processing user input/status
- for checking agent status/uploads
- for uploading files/docs
- for API & Route documentation
- Use appropriate HTTP methods (GET, POST, PUT, DELETE) for each route
- Use JSON for data exchange
- Use appropriate HTTP status codes for responses
- Use appropriate HTTP headers for authentication and content type
- Please keep all your routes in one main file ( main.py or app.py )
- For client-side navigation, utilize window.location.href followed by your desired route path
- include User-Token in the request headers for all API calls to the agent
-
Documentation
- All routes and endpoints must be documented at β/docsβ
- Use built-in documentation tools:
- FastAPI: Built-in Swagger UI
- Flask: Flask-RESTPlus or Flask-Swagger
- Node.js: Swagger UI Express or similar
π Folder Structure
To keep things organized, structure your project like this:Zip the project folder (e.g. /my-agent ) into a .zip file
. Ensure that the Dockerfile and all necessary files are included in the root folder within the zip.- Check the size of the zip file to ensure it is within the upload limits set by OptimalAgents.ai (typically 100MB).
- Make sure to remove unnecessary files or folders (like
.git
ornode_modules
orvirtual env
folders) to keep the upload size minimal. - If your project exceeds this limit, consider optimizing or splitting it into smaller components.