Skip to main content
POST
Sequence Agent

Runtime Context & Instructions

The API uses runtimeContext and runtimeInstructions to pass dynamic per-contact data to your agent at execution time. These are not the same fields as the MCP tool schema (which uses allEmailsContext / allEmailsInstructions).
If you’re migrating from the MCP tool to the direct API, note the schema difference:

How keys work

Both runtimeContext and runtimeInstructions accept an object where keys control which email steps receive the content: Step-specific values are merged with "all" — they don’t replace it. Use "all" when you have one block of context for the whole sequence (which is the most common case).

Context vs Instructions

  • runtimeContext — Factual information the agent should draw from: account research, LinkedIn data, recent activity, deal context. Think of this as “what the agent knows about this person.”
  • runtimeInstructions — Behavioral directives that steer how the agent writes: tone, length, what to emphasize, what to avoid. Think of this as “how the agent should write.”

Example: Event follow-up with rich context

Example: Simple context (all steps)

If you only need one block of context for the whole sequence, use the "all" key:

Authorizations

api_key
string
header
required

Body

application/json

Generate emails input

email
string | null

Email of the person to generate emails for

Example:

"john.doe@example.com"

firstName
string | null

First name of the person to generate emails for

lastName
string | null
jobTitle
string | null

Job title of the person to generate emails for

companyDomain
string | null

Company domain of the person to generate emails for

Example:

"example.com"

companyName
string | null

Company name of the person to generate emails for

linkedInProfile
string | null

LinkedIn profile of the person to generate emails for

crmContactId
string | null
crmLeadId
string | null
crmAccountId
string | null
lang
string | null

Language of the person to generate emails for

requestId
string | null
outputFormat
enum<string> | null
default:text

Output format of the emails to generate

Available options:
text,
html,
markdown,
null
runtimeContext
object

Additional context (facts, research, account data) injected at runtime to personalize the generated sequence. Keys control which email steps receive the context: "all" applies to every email, "1"-"4" apply to a specific step (1-based index). Step-specific context is merged with the "all" context.

Example:
runtimeInstructions
object

Behavioral directives that control how the agent writes the sequence — tone, structure, emphasis, constraints. Keys work the same way as runtimeContext: "all" applies to every email, "1"-"4" apply to a specific step (1-based index). Use runtimeInstructions for writing style directives. Use runtimeContext for factual data.

Example:
playbookSelectionContext
string | null

Playbook selection context of the person to generate emails for

customContext
object | null

Pins specific library entities for this run, overriding the agent's configured selection. Each field takes the oId of an entity in your workspace, and that exact entity is used with no re-matching. On motion agents, playbook.oId must be an active motion playbook; if the agent is configured with a specific motion, the playbook must belong to that motion or the request fails with a 400. product/service pin the offering unless the resolved motion playbook supplies its own (reported as a run warning).

Example:
fullSequenceMode
boolean
agentOId
string

AgentOId is required when creating an agent in the application. You can find it in the Agents section of your dashboard.

Example:

"agent_123"

experimentOId
string

ExperimentOId is required when running an experiment

Example:

"experiment_123"

includeFullAnnotation
boolean

If true, returns full annotation data including metadata. If false or omitted (default), returns minimal annotations to reduce response size.

Response

Generate emails successful

_metadata
object
required
found
boolean
required

Whether the operation was successful

Example:

true

message
string | null

Message

Example:

"Additional information"

data
object | null