- Create or Edit Tables:
tables/directory (see Table Guideline and Table Examples). It’s recommended to create tables without cross reference because Xano would reject the creation of table if the table it references does not exist yet. You can then add the relationships after all tables have been created. You can push all your changes invoking thepush_all_changes_to_xanotool. - Create or Edit Functions:
functions/directory (see Function Guideline and Function Examples). When defining inputs for functions, refer to the Input Guideline for proper syntax and best practices. - Create or Edit API Endpoints:
apis/directory (see API Query Guideline and API Query Examples). When defining inputs for API endpoints, refer to the Input Guideline for proper syntax and best practices. - Create or Edit Scheduled Tasks:
tasks/directory (see Task Guideline and Task Examples) - Ensure Xano backend is in sync with VSCode by pushing changes
- When writing queries for database operations, refer to the Database Query Guideline for proper syntax and best practices.
AI Agent Development
When developing AI agents, follow these steps:- Define Tools: Specify any tools the agent can use, ensuring they are defined in the
tools/directory (see Tool Guideline and Tool Examples). - Define the Agent: Create a new agent in the
agents/directory using the XanoScript syntax (see Agent Guideline and Agent Examples).
AI MCP Server Development
When developing an MCP server (Model Context Protocol) to expose your tools to external clients and AI models, follow these steps:- Define Tools: Ensure the tools you want to expose are defined in the
tools/directory (see Tool Guideline and Tool Examples). - Define the MCP Server: Create a new MCP server in the
mcp_servers/directory using the XanoScript syntax (see MCP Server Guideline and MCP Server Examples).
Frontend Building
Prior to building the frontend, ensure that all the changes have been pushed to the Xano backend (you should ask the user to confirm this). You should first proceed by retrieving the latest API specifications by invoking theget_xano_api_specifications tool. This will ensure that your frontend is aligned with the most recent backend configurations. You can then proceed to create or edit static assets in the static/ directory, see Frontend Guide.
Additional Guidelines
- Xanoscript Syntax: Adhere strictly to XanoScript syntax rules. You can use comments with the
//symbol, a comment needs to be on it’s own line and outside a statement. Refer to the Xano Tips and Tricks for details. - Expression: Xano offers a rich set of expressions for data manipulation. Refer to the Expression Lexicon for details. Avoid chaining too many expressions in a single line for readability, instead break them into intermediate variables.
- Xano Statements: Familiarize yourself with the available statements in XanoScript by consulting the Function Lexicon. Use control flow statements like
if,foreach, andtry_catchto manage logic effectively. - User Management: Most Xano workspaces come with a built-in user auth and user table, avoid recreating these, the user table can be extended with the necessary columns and the the built-in auth functions can be customized accordingly.
- Building from Loveable: If the project is being built from a Loveable-generated website, follow the specific strategy outlined in the Building from Loveable Guide.