XOne API Agent
XOne API Agent develops the APIs of your applications on the XOne platform. You describe what you need, for example “create an API to manage the products table” or “add an endpoint to register orders with validation”, and the agent handles the whole cycle: it looks up the structure of the application’s database, writes the code, builds and tests it in an isolated environment, deploys it to the platform and checks that it responds.
If the application you name already exists, the agent carries on from its current version; if it does not exist, it creates it from scratch. It remembers what was said in the conversation, so you can keep asking for changes message by message.
When to use it
- You want to publish an API on top of a database you already have without writing the code by hand.
- You need to add new endpoints to an existing XOne application.
- You want to check which applications you have on the platform and what state they are in.
- Your team wants to iterate on an API from the chat, testing each change.
Configuration
You need a credential of the XOne Platform API service with the address of your XOne platform and its management key. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The credential of the XOne Platform API service. Pick it with Choose an option or create one with Add new credential. |
| Task | What you want the agent to do, in your own words. Default: {input}, which is replaced by whatever arrives at Input. You can add other variables in curly braces; each one appears as a new field. |
| Input | The text that replaces {input} in Task, usually connected from a Chat Input. |
| Project Slug (required) | The application’s identifier on the platform, in lower case, with numbers and hyphens, for example shop-api or inventory-v2. |
| DB Connection String | The connection details of the application’s MariaDB database; they are shown hidden. Required when the application does not exist yet. For an existing application, if you leave it empty the details it already has configured are used. |
| Connection | What to connect |
|---|---|
| Model (required) | The AI model that drives the agent, for example OpenAI or Anthropic. For multi-step tasks, choose a model that handles tools well. |
Advanced options
| Field | What it does |
|---|---|
| Project Name | The application’s display name when the agent has to create it. If you leave it empty, Project Slug is used. |
| System Prompt Override | Replaces the agent’s built-in instructions. Leave it empty to use the standard ones. |
| Max Turns | How much the agent can work on each request before it stops. Raise it for APIs with many endpoints. Default: 50. |
| Context Compression Threshold (chars) | When the agent’s internal conversation goes beyond this size, the oldest part is summarised so it can carry on with long tasks. With 0 nothing is summarised. Default: 60000. |
| Stream Response | Shows in the chat, in real time, what the agent is doing. Default: on. |
| Stream Thinking | Also shows the agent’s reasoning while it works. If you turn it off, you only see the notice for each step and the final answer. Default: on. |
Batch processing
With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.
Output
- Message: the agent’s answer as a chat message, with what it has done. Connect it to a Chat Output.
- Result: the job’s data for other components: the final answer (
final_answer), the application’s identifier (slugandapp_id) and whether it was newly created (new_app). When the agent creates an application, it also includes the key to use its API (consumer_api_key): keep it somewhere safe.
You can also connect this component to another agent’s Tools input so that agent uses it as a tool.
Example
An office supplies distributor wants an API so its online shop can look up the catalogue.
- Create the XOne Platform API credential and pick it in Credential.
- Write
catalogue-apiin Project Slug and fill in DB Connection String with the details of the catalogue database. - Connect an AI model to Model, a Chat Input to Input and Message to a Chat Output.
- In the chat write:
Create an API to look up products and their stock, with search by name and by category.
The agent creates the application, deploys the API and gives you the key to use it. Afterwards you can ask in the same chat, for example, Add an endpoint to list products that are out of stock.
Good practices
- Try it first with a test database before working on the production one.
- Ask for changes one at a time and check the result of each step.
Related components
- XOne Agent: another development agent for the XOne platform.
- Agent: NappAI’s general agent.