XOne Agent
The XOne Agent is an intelligent assistant designed to help you develop mobile applications using the XOne platform. Think of it as a knowledgeable developer partner who understands the specific rules, tools, and best practices of the XOne ecosystem. You can use it to generate code, analyze existing projects, troubleshoot errors, or get recommendations for improving your mobile apps.
How it Works
This component acts as a bridge between your workflow and the XOne platform’s development tools. When you send a request to the agent, it uses advanced AI reasoning to understand your intent. It then connects to the XOne environment (via CloudStudio and IDE services) to perform tasks such as generating code snippets, checking for syntax errors, or suggesting architectural improvements.
Internally, the agent operates as a “Deep Agent,” meaning it can break down complex development tasks into smaller steps, use specific tools for linting or compilation, and reference documentation to ensure the advice it gives is accurate for the XOne mobile platform.
Connection & Credentials
To function correctly, this component must communicate with the XOne cloud services. This requires a valid XOne WebStudio credential.
Before you can use the XOne Agent in your workflows, you must first set up this credential in your Nappai panel:
- Go to the Credentials section in your Nappai panel.
- Create a new credential of the type XOne WebStudio.
- Fill in the required fields with your XOne account details:
- MCP URL (CloudStudio): The endpoint for cloud studio services (e.g.,
https://mcp.xonewebstudio.com/mcp). - MCP URL (IDE): The endpoint for IDE services (e.g.,
https://mcpide.xonewebstudio.com/mcp). - Studio URL: The main studio URL (e.g.,
https://studio.xonewebstudio.com). - Authority URL (IDS): The identity server URL (e.g.,
https://ids.xonewebstudio.com). - Client ID: Your client identifier (e.g.,
xstudio-mcp). - Client Secret: Your secure client secret key.
- MCP URL (CloudStudio): The endpoint for cloud studio services (e.g.,
- Save the credential.
- In your workflow, select this saved credential in the Credential input field of the XOne Agent component.
Note: You do not need to enter API keys or tokens directly into the component’s input fields. You only select the pre-configured credential you created in the steps above.
Operations
This component does not have separate selectable operations. It automatically adapts to the type of question or request you provide (e.g., code generation vs. error analysis) based on its internal “Deep Agent” logic.
Inputs
The following fields are available to configure this component.
- Credential: The XOne WebStudio credential created in the previous step. This authenticates the agent with the XOne platform to ensure it can access your development environment securely.
- Query (or User Query): The text of your request. This is where you describe the task you want the agent to perform, such as “Generate a login screen component for XOne” or “Debug this error message.”
- Context (or Context Variable): Optional context data that provides background information to the agent. This can help the agent understand previous parts of your conversation or related project data.
- Chat History (or History): The previous messages in your current conversation. This allows the agent to remember what was discussed earlier, ensuring coherent responses in multi-turn interactions.
Outputs
The component produces the following outputs, which can be used in subsequent steps of your workflow:
- Agent: The internal agent object reference (typically used for internal system processing).
- Response: The text output generated by the AI. This contains the code snippets, explanations, or advice you requested. You can map this output to other components to display it in a chat interface, save it to a database, or use it in further automated tasks.
Output Data Example (JSON)
json
{
“status”: “success”,
“response”: “Here is the XOne code for a simple button component:\n\njavascript\nconst Button = () => {\n return (\n <View style={styles.container}>\n <Text>Click Me</Text>\n </View>\n );\n};\n\n\nThis component uses the standard XOne View and Text elements. Let me know if you need styling adjustments.”,
“execution_status”: “completed”
}
Connectivity
This component is typically placed after a Trigger (such as a User Message or Webhook) and before an Output node (such as Send Email, Chat Message, or Database Save).
- From: It receives natural language instructions from users or other automation steps.
- To: It sends back text responses, code blocks, or logical conclusions. These outputs are often fed into a Chat UI component for display or a Code Interpreter node for validation.
Usage Example
Scenario: Automating code generation for a mobile app feature.
- Trigger: A user submits a request via a form: “Create a profile settings screen for my XOne app.”
- XOne Agent Component:
- Credential: Selects the “XOne WebStudio” credential.
- Query: Receives the text “Create a profile settings screen…”.
- Context: May include previous app structure details if mapped from a previous node.
- Result: The component generates the necessary XOne code for the profile screen.
- Next Step: The Response output is mapped to a “Save to Git” or “Send to Email” node to deliver the code to the development team.
Tips and Best Practices
- Be Specific: Provide clear details in the “Query” field. Instead of “Fix the code,” try “Fix the syntax error in the
UserProfilecomponent related to the missinguserIdvariable.” - Use Context: If you are working on a complex multi-step project, map the Context or Chat History fields to ensure the agent remembers your app’s structure and previous decisions.
- Credential Management: Ensure your XOne WebStudio credential is kept secure and updated. If your XOne password or client secret changes, update the credential in the Nappai panel immediately to avoid connection errors.
- Iterative Development: Use the Response in a loop. You can send the agent’s output back into the input for further refinement, allowing you to ask for code adjustments step-by-step.
Security Considerations
- Credential Security: The XOne WebStudio credential contains sensitive information like Client Secrets. Ensure that your Nappai account is protected with strong authentication and that credential access is restricted to authorized users only.
- Code Safety: The agent generates code based on AI predictions. Always review the generated XOne code before deploying it to production to ensure it meets your security and business logic standards.
- Data Privacy: Be cautious about sending sensitive user data (like personal identifiable information) in the Query or Context fields to the agent, as this data is processed by the external XOne service.
Related Components
- XOne Deep Agent Base Component: This is the underlying class that provides the core AI reasoning and tool-use capabilities. The XOne Agent is a specialized version of this base.
- Chat/UI Components: Often used in conjunction with chat interface components to display the AI’s responses in a user-friendly conversation format.
- Code Interpreter/Formatter: Useful for post-processing the code generated by the XOne Agent to format it or validate it further.