import { CodeTabs } from '../views/docs/CodeTabs';
import { Callout, NextLink, PropTable } from '../views/docs/prose';
import {
  SEND_INSTRUCTION_SIG_PY, SEND_INSTRUCTION_SIG_TS,
  SEND_INSTRUCTION_EX_PY, SEND_INSTRUCTION_EX_TS,
} from './sdk-reference-constants';

## send\_instruction()

`call.send_instruction(instruction)` sends a real-time instruction to the agent without changing the current task. Use it for context injection and behavioral nudges.

### Signature

<CodeTabs
  python={{ code: SEND_INSTRUCTION_SIG_PY, filename: "signature" }}
  typescript={{ code: SEND_INSTRUCTION_SIG_TS, filename: "signature" }}
/>

<PropTable rows={[
  {
    name: "instruction",
    type: "str",
    desc: "A real-time instruction to pass to the agent. Does not change the current task.",
  },
]} />

**Return value:** `None` / `Promise<void>`

### Example

<CodeTabs
  python={{ code: SEND_INSTRUCTION_EX_PY, filename: "example.py" }}
  typescript={{ code: SEND_INSTRUCTION_EX_TS, filename: "example.ts" }}
/>

<Callout>
  <span className="text-primary font-semibold">Tip:</span> Unlike `call.set_task()`, `call.send_instruction()` doesn't replace the agent's current objective. Use it to inject context or steer behavior mid-conversation — for example, after a database lookup reveals something the agent should know.
</Callout>

<NextLink section="field" label="Field" />
