Integration

Twin integration

Twin is a platform for AI agents that automate work across your tools and the web. Through this API an agent can list, create and delete Twin agents, start a run (build mode to set an agent up, run mode to execute it) and follow its events, cancel or delete runs, read and replace an agent's instructions and their version history, manage an agent's cron schedule (set, pause, resume, delete), register webhooks that report run state changes, organise agents into workspaces, and read the organization's credit balance. API key management routes are not exposed (creating one returns a new secret, listing and revoking keys is account administration). Authentication is an API key, created in the Twin app under Settings > API Keys, sent in the x-api-key header.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in Twin.Built from the 31 Twin tools below, on the connection you add once.

What you can do with Twin

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Schedule, 6 operations

  • delete_agent_scheduleDelete agent scheduleDELETERemoves the schedule from an agent, so it no longer runs automatically.
  • get_agent_scheduleGet agent scheduleGETReturns the cron schedule of an agent (expression, timezone, next run, paused state), or schedule null when none is set. An agent has at most one schedule.
  • list_schedulesList schedulesGETLists the schedules of all the user's agents, with each one's cron expression, next run and paused state.
  • pause_agent_schedulePause agent schedulePOSTPauses the schedule of an agent. The schedule is kept but triggers no run until resume_agent_schedule is called.
  • resume_agent_scheduleResume agent schedulePOSTResumes a paused agent schedule.
  • set_agent_scheduleSet agent schedulePUTCreates or replaces the cron schedule of an agent, which must be deployed. Twin uses 7-field cron expressions: second, minute, hour, day of month, month, day of week, year.

Agent, 5 operations

  • create_agentCreate agentPOSTCreates a new Twin agent, optionally inside a given workspace, and returns the full agent object. A new agent has no instructions yet: start a run in build mode with start_run to set it up.
  • delete_agentDelete agentDELETEPermanently deletes an agent and its run data. This cannot be undone.
  • get_agentGet agentGETReturns the full details of one agent: its name, workspace, latest run and its status, latest build run, unread flag and last activity time.
  • list_agentsList agentsGETLists the Twin agents of the authenticated user, optionally filtered to one workspace, with each agent's latest run, deployment state and last activity. Results are paginated with a cursor: pass next_cursor from the previous page as cursor.
  • move_agent_to_workspaceMove agent to workspacePOSTMoves an agent into another workspace (as returned by list_workspaces).

Webhook, 5 operations

  • create_webhookCreate webhookPOSTRegisters a URL that receives an HTTP POST each time a run of this agent changes state (run.started, run.completed, run.failed, run.stopped, run.paused). The signing_secret is not passed back here.
  • delete_webhookDelete webhookDELETEPermanently deletes a webhook; no further events are delivered to it.
  • get_webhookGet webhookGETReturns one webhook of an agent: its URL, subscribed events, status and timestamps.
  • list_webhooksList webhooksGETLists the webhooks registered for an agent, with their URL, subscribed events and status.
  • update_webhookUpdate webhookPATCHUpdates a webhook's URL, subscribed events or status (active or disabled). Only the fields sent are changed.

Workspace, 5 operations

  • create_workspaceCreate workspacePOSTCreates a new workspace to organise agents.
  • delete_workspaceDelete workspaceDELETEPermanently deletes a workspace and every agent inside it. This cannot be undone; move agents you want to keep elsewhere first with move_agent_to_workspace.
  • list_workspacesList workspacesGETLists the workspaces (folders of agents) of the authenticated user, with each one's name, position and number of agents.
  • reorder_workspacesReorder workspacesPOSTSets the display order of the user's workspaces from an ordered list of workspace ids.
  • update_workspaceUpdate workspacePUTRenames a workspace and optionally changes its icon.

Run, 4 operations

  • cancel_runCancel runPOSTCancels a running run, with an optional reason. Idempotent: cancelling a run that already finished succeeds too.
  • delete_runDelete runDELETEDeletes one run of an agent.
  • list_runsList runsGETReturns the run history of an agent, page by page, with optional filters on status, run id, start date range and policy type or group. Each run carries its status, start time, step and event counts.
  • start_runStart runPOSTStarts a run of an existing agent and returns run_id, status and run_number once started. run_mode build sets up or changes the agent, run executes it; user_message is optional. Then follow list_run_events or list_runs, or a webhook (create_webhook).

Instruction, 3 operations

  • get_instructionsGet instructionsGETReturns the current instructions of an agent (the auto-generated, editable description of what the agent does), with its plan steps and when it was last updated. instructions is null when the agent has none yet.
  • get_instructions_historyGet instructions historyGETReturns the previous versions of an agent's instructions, each with its content, source and creation time.
  • update_instructionsUpdate instructionsPUTReplaces the instructions of an agent with new text. Each update creates a new version, readable with get_instructions_history.

Credit, 1 operation

  • get_creditsGet creditsGETReturns the API key owner's organization credits (purchased, used, remaining, current billing period end) and the caller's monthly member allowance. A null member cap or remaining allowance means unlimited. Works with any valid key on any plan.

Event, 1 operation

  • list_run_eventsList run eventsGETReturns the events recorded during a run, in order, each with its index and recording time. Pass the last index you read as after_index to fetch only newer events.

User, 1 operation

  • get_current_userGet current userGETReturns the identifier of the user the API key belongs to. Useful to check that a key works.

Use Twin from Claude Code, Cursor or Codex

Connect Twin in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Twin operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect Twin

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect Twin once

    Add your Twin connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

Twin integration FAQ

What can you do with the Twin integration?

LiveContext exposes 31 operations on Twin, covering schedule, agent, webhook and workspace.

Popular integrations

Browse the whole catalog