Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agent37.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

The simplest thing to build on the Agents API is a chat app where every user has their own always-on agent. It holds their files, memory, and connected accounts for as long as it lives, and it is where most teams start.

The shape of it

1

One instance per user, on signup

When a user signs up, create one instance for them on the default hermes template, tagged with your own user id. That instance is their agent from then on.
node
const inst = await api.post("/v1/instances", { user: "u_882" });
2

A session per chat thread

Each thread is a session. Send the first message with the instance_id, then reuse the returned session_id for every later turn, so you never resend history. Stream the reply to render tokens as they arrive.
node
// new thread: first message, streamed
const { session_id } = await api.post("/v1/responses", {
  instance_id: inst.id,
  input: "Help me plan my week.",
  stream: true,
});

// later turns: continue the same thread
await api.post("/v1/responses", {
  session_id,
  input: "Add a gym session Tuesday.",
});
3

List threads for the sidebar

List the instance’s sessions to render every thread the user has open.
node
const { data } = await api.get(`/v1/instances/${inst.id}/sessions`);
Stream every reply so the UI fills in as the agent works. See Streaming events for the event list and a client parser.

Where to go next

Send a message

The core call, continuing a thread, and managing conversations.

Streaming events

Render text, reasoning, and tool activity live.

Integrations

Let users connect Gmail, Slack, Notion, and more to their agent.