Introduction
AI Agents in Xano allow you to define intelligent, autonomous workflows powered by models like Gemini, OpenAI, or Claude, directly in XanoScript.Anatomy
Every XanoScript Agent follows a predictable structure. Here’s a quick visual overview of its main building blocks — from declaration at the top to tools at the bottom.It’s a little different from other primitives, because the settings are defined in the
llm block, instead of a separate settings block.You can find more detail about each section by continuing below.
Section 1: Declaration
Every Agent starts with a declarative header that specifies its type, name, and description.XanoScript
Section 2: LLM
Thellm block defines how your Agent interacts with its underlying AI model. All standard model configuration options available in the UI are represented here.
These are a little different from other primitives, because the settings available can change based on the model chosen.
XanoScript
Xano Free Model (Gemini)
These settings are specific to the Xano Free Model (Gemini).XanoScript
Anthropic (Claude)
XanoScript
Google Generative AI (Gemini)
XanoScript
OpenAI
OpenAI settings are similar to the other models, but also includes some additional advanced settings.OpenAI Settings
XanoScript
OpenAI Advanced Settings
XanoScript
Section 3: Tools
Thetools block defines the tools that an Agent can use. Tools are functions that an Agent can call as part of its steps to resolve the task at hand.
XanoScript
Full Example
Below is a more complete Agent definition that combines multiple settings:XanoScript
What’s Next
Now that you understand how to define Agents in XanoScript, here are a few great next steps:Explore the function reference
Learn about the built-in functions available in the stack to start writing more complex logic.
Try it out in VS Code
Use the XanoScript VS Code extension with Copilot to write XanoScript in your favorite IDE.
Learn about AI Tools
AI Tools are used to define the actions that an Agent can take.