Skip to main content

Basic Usage

Send a single request to an agent and receive a response. Invoke is best for stateless, one-shot tasks like summarization, classification, or data extraction.
from reminix import Reminix

client = Reminix(api_key="your-api-key")

response = client.agents.invoke("my-agent", input={
    "prompt": "Summarize this document",
})

print(response.output)

Async

from reminix import AsyncReminix

client = AsyncReminix(api_key="your-api-key")

response = await client.agents.invoke("my-agent", input={
    "prompt": "Summarize this document",
})

Parameters

agent_name
str
required
Name of the agent to invoke.
input
dict
required
Input data matching the agent’s input schema.
context
dict
Execution context including identity, metadata, and other contextual information.
stream
bool
default:false
Enable streaming. When True, returns an iterable of server-sent events instead of a single response.

With Context

Pass execution context to provide identity or metadata to the agent.
response = client.agents.invoke("my-agent", input={
    "prompt": "Summarize this document",
}, context={
    "identity": "user-123",
})

Idempotency

Use an idempotency key to safely retry requests without duplicate processing. If a request with the same key has already been processed, the original response is returned.
response = client.agents.invoke("my-agent", input={
    "prompt": "Process this payment",
}, idempotency_key="payment-abc-123")

Response

output
Any
The agent’s response. The type depends on the agent’s output schema — a prompt agent returns a string, a task agent returns a dict, etc.

Streaming

Pass stream=True to receive incremental results as the agent generates output.
stream = client.agents.invoke("my-agent", input={
    "prompt": "Write a story",
}, stream=True)

for event in stream:
    if event.type == "text_delta":
        print(event.delta, end="")
See Streaming for all event types.

Next steps

chat()

Multi-turn conversations with persistent history.

Error Handling

Catch typed exceptions and add retries.

Tasks

The interaction pattern behind invoke().

Streaming

Event types and SSE format reference.