> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goguava.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# send_instruction()

> Send a real-time instruction to the agent without changing the task

<Tabs>
  <Tab title="Python">
    `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.
  </Tab>

  <Tab title="TypeScript">
    `call.sendInstruction(instruction)` sends a real-time instruction to the agent without changing the current task. Use it for context injection and behavioral nudges.
  </Tab>
</Tabs>

## Signature

<Tabs>
  <Tab title="Python">
    ```python signature theme={null}
    call.send_instruction(instruction: str) -> None
    ```

    | Parameter | Type | Description |
    | - | - | - |
    | `instruction` | `str` | A real-time instruction to pass to the agent. Does not change the current task. |

    **Return value:** `None`
  </Tab>

  <Tab title="TypeScript">
    ```typescript signature theme={null}
    await call.sendInstruction(instruction: string): Promise<void>
    ```

    | Parameter | Type | Description |
    | - | - | - |
    | `instruction` | `string` | A real-time instruction to pass to the agent. Does not change the current task. |

    **Return value:** `Promise<void>`
  </Tab>
</Tabs>

## Example

<Tabs>
  <Tab title="Python">
    ```python example.py theme={null}
    @agent.on_task_complete("collect_order_id")
    def on_order_id_collected(call: guava.Call):
        order = lookup_order(call.get_field("order_id"))
        call.send_instruction(
            f"Order #{order['id']} is {order['status']} "
            f"with an estimated delivery of {order['eta']}. "
            f"Share this with the caller naturally."
        )
    ```

    <Tip>
      Unlike [`call.set_task()`](/sdk-reference/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.
    </Tip>
  </Tab>

  <Tab title="TypeScript">
    ```typescript example.ts theme={null}
    agent.onTaskComplete("collect_order_id", async (call: guava.Call) => {
      const order = await lookupOrder(await call.getField("order_id") as string);
      await call.sendInstruction(
        `Order #${order.id} is ${order.status} `
        + `with an estimated delivery of ${order.eta}. `
        + `Share this with the caller naturally.`
      );
    })
    ```

    <Tip>
      Unlike [`call.setTask()`](/sdk-reference/set-task), `call.sendInstruction()` 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.
    </Tip>
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.