Skip to main content
Tasks are the simplest interaction pattern in Reminix. Send input, get output. No conversation state, no persistence — each call is completely independent.

How tasks work

  1. Client sends POST /v1/agents/{name}/invoke with input
  2. Agent processes the input and returns output
  3. No state is stored — each call is independent

Request format

{
  "input": {
    "prompt": "Summarize this article: ..."
  },
  "context": {
    "identity": "user-123"
  }
}
input
object
required
The input payload passed to the agent handler. Shape depends on the agent type.
context
object
Optional execution context passed to the agent handler.

Response format

{
  "output": "The article discusses..."
}
output
string | object
The agent’s response. Type depends on the agent type — prompt and chat agents return strings, task agents return objects.

Using the SDK

const response = await client.agents.invoke("summarizer", {
  input: { prompt: "Summarize this article: ..." },
})

console.log(response.output)

Context

The optional context object is passed through to the agent handler. Use it for identity, metadata, or any execution context your agent needs.
{
  "input": { "prompt": "Summarize this" },
  "context": {
    "identity": "user-123",
    "metadata": { "source": "web-app" }
  }
}
  • Available in the handler’s context parameter
  • Not stored or persisted — only available during execution
  • Use context.identity to scope behavior per user

Idempotency

Pass an Idempotency-Key header to prevent duplicate processing. If the same key is sent within a window, Reminix returns the cached result instead of re-executing the agent.
curl -X POST https://api.reminix.com/v1/agents/summarizer/invoke \
  -H "Authorization: Bearer reminix_sk_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: req_abc123" \
  -d '{"input": {"prompt": "Summarize this article"}}'
Idempotency keys are scoped to your project. The same key used across different agents will still be treated as separate requests.

Best for

  • Prompt agents (type: "prompt") — single prompt to response
  • Task agents (type: "task") — structured input/output operations
  • Any stateless, single-shot operation
For multi-turn conversations, use the Chat endpoint instead.