Slide 1
Acudesk AI
Stateless agents
for clean, self-contained AI calls
Fully self-contained AI requests with no retained state

Stateless agents for on-demand execution

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.

Lightweight execution without persistence

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 vs workflow agents

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.

A streamlined process that interprets, validates, and executes with precision.

From request to response

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.

Designed for operations that need clear structure, reliable decisions, and seamless orchestration.

When stateless agents make sense

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.

Best suited for simple, repeatable execution
Stateless agents are most effective when tasks are clearly defined and do not require continuity between executions.
Automated workflows
Use stateless agents for lightweight automation where each request can be fully specified, such as validation, classification, or transformation tasks.
Data transformation
Process documents, images, or structured inputs and return normalized or structured outputs without maintaining state.
System-to-system communication
Integrate stateless agents into microservices or backend pipelines where AI is invoked as part of a larger process.
Operational tasks
Execute predictable, repeatable operations where deterministic behavior is required and no long-term context is needed.
Simple integration with minimal operational overhead

How stateless agents fit in your architecture

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.

Serverless functions and background jobs
Stateless agents are a natural fit for serverless environments and scheduled background jobs. Each invocation provides the full execution context, allowing AI logic to run without persistent storage, warm state, or coordination between executions.
Microservices and internal APIs
Integrate stateless agents directly into microservices or internal APIs where AI is invoked as part of a larger request flow. Stateless execution ensures each call remains isolated and predictable, without shared state between services.
Event-driven pipelines
Use stateless agents in event-driven systems where incoming events trigger one-off AI processing. Because no context is retained, agents can scale horizontally and process events independently as they arrive.
Batch processing systems
Stateless agents work well in batch pipelines where large volumes of inputs must be processed consistently. Each item is evaluated independently, making parallel execution straightforward and eliminating coordination overhead.
External integrations requiring isolated execution
For third-party integrations or externally triggered workflows, stateless agents provide a safe execution model. Each request runs in isolation, ensuring no cross-request leakage of context, configuration, or data.

Because stateless agents do not retain state, they scale easily and require no lifecycle or configuration management.

Slide 1
Acudesk AI
Real-time intelligence from your own data.

Link your internal systems to Acudesk and empower your team with accurate, context-aware responses.

A fully self-contained request with no saved configuration or memory

Practical example of using stateless agents

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());
  
Practical scenarios that highlight the power of intelligent, system-driven automation.

Examples of workflow agents in action

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.

Equipment maintenance assessment

Equipment maintenance assessment

A stateless agent evaluates photos of machinery or equipment to identify visible wear, corrosion, leaks, or damage. Each request includes the images and instructions, and the agent returns a structured maintenance assessment with severity indicators and recommended follow-up actions.

Stateless agents are well suited to this scenario because each inspection is a discrete event that can be evaluated independently, without relying on prior maintenance history.

Site safety and compliance review

Site safety and compliance review

A stateless agent reviews photos from construction site walkthroughs to identify potential safety or compliance issues, such as missing PPE, unsafe scaffolding, or poor housekeeping. Each request includes the site images and evaluation rules, and the agent returns a structured list of findings with categories, severity levels, and brief descriptions.

Stateless agents are well suited to this scenario because each site visit is evaluated independently, without requiring retained memory or context.

Vehicle condition and safety inspection

Vehicle condition and safety inspection

A stateless agent assesses photos from vehicle inspections to identify visible damage, wear, or safety issues. Each request includes the inspection images and instructions, and the agent returns a structured JSON assessment with condition, severity, and recommended actions.

Stateless execution is ideal here because each inspection is independent and evaluated once, with no prior context retained.

Support ticket classification

Support ticket classification

A stateless agent processes incoming support tickets or form submissions to classify them by category, priority, and routing destination.

Each request includes the ticket content and classification rules. The agent returns structured metadata used by downstream systems for routing or escalation.

Stateless agents fit well because each ticket is evaluated independently and does not require memory of previous interactions.