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.

Every instance exposes three surfaces you can show your end user directly:
SurfaceWhat it is
terminalA live shell on the instance.
desktopA graphical desktop over noVNC, including a headed browser.
filesA file browser for the instance’s filesystem.
POST /v1/instances/{id}/embeds mints a short-lived signed URL for any of them. The URL is minted on demand, never stored, and you typically drop it into an iframe so the surface renders inside your own app.
Treat the URL like a password. It carries its own token (not your API key) and anyone holding it has access to that surface until it expires. Don’t log it, and don’t put it on untrusted pages.

Mint embed URLs

Pass the surfaces you want and an expires_in. The response returns one *_url per requested surface, plus the expires_at they all share.
surfaces
string[]
required
The surfaces to mint. Any of terminal, desktop, files.
expires_in
integer
Seconds until the URLs expire. Maximum 86400 (24 hours).
curl -X POST https://api.agent37.com/v1/instances/inst_x7/embeds \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "surfaces": ["terminal", "files"],
    "expires_in": 3600
  }'

Response

{
  "terminal_url": "https://...#token=...",
  "files_url": "https://...#token=...",
  "expires_at": 1748403600
}
terminal_url
string
Signed URL for the terminal. Present only when terminal was requested.
desktop_url
string
Signed URL for the noVNC desktop. Present only when desktop was requested.
files_url
string
Signed URL for the file browser. Present only when files was requested.
expires_at
integer
Unix seconds when all returned URLs expire.

Embed in an iframe

Render any returned URL inside an iframe in your app:
html
<iframe
  src="https://...#token=..."
  title="Agent terminal"
  width="100%"
  height="600"
  allow="clipboard-read; clipboard-write"
></iframe>
Mint fresh URLs per user session rather than reusing one long-lived link. A short expires_in limits the blast radius if a URL leaks. Re-call the endpoint when the URL expires.

Next steps

Instances

Create, size, and manage the computer behind every surface.

Files

Upload and read files the agent works with.

Integrations

Connect Gmail, Slack, Notion, and more to an instance.

Core concepts

Instances, sessions, and responses.