Skip to main content
An agent is a function with a type, input/output schema, and metadata. You define agents using @reminix/runtime (TypeScript) or reminix-runtime (Python), call serve(), and deploy. Reminix automatically discovers your agents and exposes them as API endpoints.

Agent types

Every agent has a type that determines its input/output contract. Choose the type that matches your use case.
TypeInputOutputBest For
prompt{ prompt: string }stringSingle prompt to response
chat{ messages: Message[] }stringMulti-turn conversations
task{ task: string, ...extra }{ object }Structured data tasks
thread{ messages: Message[] }Message[]Full message history management
workflow{ task: string, state?, resume? }{ status, steps, result, pendingAction }Multi-step pause/resume flows

Defining agents

import { agent, serve } from "@reminix/runtime"

const analyzer = agent("analyzer", {
  type: "task",
  description: "Analyze text sentiment",
  handler: async (input) => {
    return { sentiment: "positive", confidence: 0.95 }
  },
})

serve({ agents: [analyzer] })

Agent metadata

Each agent has the following metadata fields:
FieldRequiredDescription
nameYesUnique identifier used in API paths (/agents/{name}/invoke)
typeYesOne of the agent types listed above
descriptionNoHuman-readable description. Defaults to the function docstring in Python.
tagsNoArray of strings for filtering and organization
metadataNoArbitrary key-value pairs for custom metadata
In Python, the agent’s description defaults to the function docstring if not explicitly provided. In TypeScript, you must pass it as a property.

Serving multiple agents

You can serve any number of agents from a single process. Each agent gets its own endpoint at POST /agents/{name}/invoke.
serve({ agents: [bot, analyzer, summarizer] })
Each agent gets its own API endpoint. You invoke them by name:
# Invoke the analyzer agent
curl -X POST https://api.reminix.com/v1/agents/analyzer/invoke \
  -H "Authorization: Bearer reminix_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"input": {"task": "Analyze this text"}}'

# Chat with the bot agent
curl -X POST https://api.reminix.com/v1/agents/bot/chat \
  -H "Authorization: Bearer reminix_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"input": {"messages": [{"role": "user", "content": "Hello"}]}}'

Streaming

Agents can stream responses by using async generators in their handler. This enables real-time token-by-token output over Server-Sent Events.
const streamer = agent("streamer", {
  type: "prompt",
  description: "Streams a response",
  stream: true,
  handler: async function* (input) {
    yield "Hello, "
    yield "world!"
  },
})
See Streaming for full details on streaming behavior, event types, and client-side consumption.

Next steps

TypeScript: Creating Agents

Define, type, and deploy agents with @reminix/runtime.

Python: Creating Agents

Define, type, and deploy agents with reminix-runtime.

Tools

Expose functions to LLMs and AI clients via MCP.

Tasks, Conversations, Workflows

The three interaction patterns agents support.