Skip to main content

Overview

Reminix agents are stateless functions that process requests and return responses. When you call an agent through the Reminix API, here’s what happens:

Agent Lifecycle

1. Request Received

When your app calls invoke(), Reminix receives the request and routes it to the appropriate agent based on the agent name.

2. Agent Execution

The agent processes the request:
  • For task agents: Receives the input (e.g., prompt), performs the task, returns output
  • For chat agents: Receives the message history, generates a response

3. Response Delivered

The response is returned to your app. If streaming is enabled, chunks are delivered in real-time via Server-Sent Events.

Stateless by Design

Agents don’t maintain state between requests. Each request is independent:
# Request 1
response = client.agents.invoke("my-agent", prompt="Analyze this")

# Request 2 - agent has no memory of Request 1
response = client.agents.invoke("my-agent", prompt="Summarize that")
For conversational context, use a chat agent and pass the full message history:
messages = [
    {"role": "user", "content": "Hello"},
    {"role": "assistant", "content": "Hi there!"},
    {"role": "user", "content": "What did I just say?"}  # Agent sees full history
]
response = client.agents.invoke("chat-assistant", messages=messages)
print(response["message"]["content"])

Context and Configuration

You can pass additional context to agents:
response = client.agents.invoke(
    "my-agent",
    prompt="Analyze this data",
    context={
        "user_id": "user_123",
        "preferences": {"language": "en"}
    }
)
Context is available to the agent but doesn’t persist between requests.

Timeouts

Agents have a default timeout. For long-running tasks, consider:
  1. Streaming: Get partial results as they’re generated
  2. Breaking up work: Split large tasks into smaller chunks
  3. Async patterns: Use webhooks for very long operations

Next Steps