Stateless agents are designed for situations where every request is independent. Each execution includes all instructions, examples, inputs, and files required to complete the task, and no configuration or memory is retained afterward.
They are ideal for simple, repeatable API calls where predictability, isolation, and low operational overhead are more important than long-running context or orchestration.
Stateless agents operate without saved configuration, identity, or memory. They evaluate a request, produce a response, and immediately discard all context.
This execution model makes stateless agents easy to integrate into existing systems while avoiding the complexity of managing agent lifecycles, stored state, or cross-request dependencies.
Stateless agents and workflow agents serve different purposes and are designed for different system requirements.
Stateless agents are optimized for isolated execution, where every request is fully defined and processed independently. Workflow agents are designed for persistent automation, where agents retain configuration, use datasets, invoke actions, and operate across multiple steps or events.
If your task requires continuity, memory, or orchestration, workflow agents are the better choice. If each request stands alone, stateless agents provide a simpler and more predictable solution.
1. Define instructions at runtime
Each request explicitly defines the task to be performed, including instructions and constraints. Nothing is assumed or reused from previous executions.
2. Provide inputs and examples
All inputs required for reasoning — including text, files, and example outputs in structured JSON — are supplied with the request.
3. Execute reasoning
The selected model evaluates the request using only the provided inputs, without access to memory or external context.
4. Return structured output
The agent returns a structured JSON response. No state is retained after completion.
Stateless agents are best used when tasks are fully defined upfront and do not require continuity between executions. They are designed for isolated, repeatable operations where inputs, rules, and expected outputs are known in advance, and no state needs to be retained after execution.
Stateless agents are designed to integrate cleanly into modern systems that prioritize simplicity, isolation, and horizontal scalability. Because each request is self-contained and no state is retained, stateless agents can be embedded anywhere AI execution is needed without introducing lifecycle management or configuration complexity.
They behave like execution utilities rather than long-running services, making them easy to adopt across a wide range of architectures.
This example demonstrates how a stateless agent is defined entirely at runtime. All instructions, inputs, and expected outputs are included in a single request, and no configuration or context is retained after execution.
The agent processes the provided inputs and returns a structured JSON response, making it suitable for simple, repeatable API calls and backend automation.
import fs from "fs";
import FormData from "form-data";
import fetch from "node-fetch";
// Create a FormData object and append a 'model', 'reasoning' and 'instructions' field.
const form = new FormData();
form.append("model", "standard"); // Acudesk model to use, 'standard' or 'plus'
form.append("reasoning", "true"); // Whether you want the model to return reasoning steps or not.
form.append("instructions", "Assess the equipment in the photo and respond strictly in JSON.");
// Append any files you want the model to reason over.
form.append("files", fs.createReadStream("C:/photos/equipment1.jpg"));
form.append("files", fs.createReadStream("C:/photos/equipment2.jpg"));
form.append("files", fs.createReadStream("C:/photos/equipment3.jpg"));
// Append one or more examples of the expected output in JSON format.
form.append(
"examples",
JSON.stringify([
{
overall_status: "serviceable | needs_repair | remove_from_service",
overall_severity: 0,
summary: {
headline: "string",
key_findings: ["string"]
}
}
])
);
// Send your request
const res = await fetch("https://api.acudesk.com/stateless", {
method: "POST",
headers: {
Authorization: "YOUR_ACUDESK_ACCOUNT_API_KEY"
},
body: form
});
console.log(await res.json());
These examples demonstrate how workflow agents use datasets, grounding, and actions to process information and perform tasks reliably. From orchestrating workflows to making rule-based decisions, each agent follows a predictable, configurable sequence that aligns with your internal logic.





