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

# Wakeup Call

> Automatically nudge users back into the conversation after a period of inactivity

A Wakeup Call automatically triggers an action when the user has been inactive for a specified period of time. Instead of leaving a silent gap when the caller goes quiet, the agent can gently check in, re-prompt, or offer help, keeping the conversation alive and maintaining engagement.

## How it works

Set `wake_up` on your `Agent` to the number of seconds of caller silence to allow before nudging. When the caller stays quiet for that long, the runtime calls your agent's `on_wake_up` method, where you decide what happens next.

<CodeGroup>
  ```python Python theme={null}
  pipeline = Pipeline(
      stt=CartesiaSTT(model="ink-2"),
      llm=OpenAILLM(model="gpt-5.4-nano-2026-03-17", streaming=True),
      tts=SarvamAITTS(streaming=True),
      vad=SileroVAD(),
      turn_detector=TurnDetector(model="echo-large"),
  )

  class PatientAgent(Agent):
      def __init__(self) -> None:
          super().__init__(
              name="PatientAgent",
              agent_id=AGENT_ID,
              instructions=(
                  "You are a patient assistant. Answer questions and help the caller. If they go "
                  "quiet, you'll gently check in on them."
              ),
              pipeline=pipeline,
              wake_up=10,   # nudge after 10s of caller silence
          )
          self._nudges = 0

      async def on_enter(self) -> None:
          await self.session.say("Hi! Take your time — I'm here whenever you're ready.")

      async def on_exit(self) -> None:
          await self.session.say("Goodbye!")

      async def on_wake_up(self) -> None:
          # Called by the runtime when the caller has been silent for `wake_up` seconds.
          self._nudges += 1
          await self.session.say("Are you still there? I'm happy to keep helping.")
  ```

  ```typescript Node JS theme={null}
  const pipeline = Pipeline({
    stt: CartesiaSTT({ model: 'ink-2' }),
    llm: OpenAILLM({ model: 'gpt-5.4-nano-2026-03-17', streaming: true }),
    tts: SarvamAITTS({ streaming: true }),
    vad: SileroVAD(),
    turn_detector: TurnDetector({ model: 'echo-large' }),
  });

  class PatientAgent extends Agent {
    _nudges: number;

    constructor() {
      super({
        name: 'PatientAgent',
        agent_id: AGENT_ID,
        instructions:
          'You are a patient assistant. Answer questions and help the caller. If they go ' +
          "quiet, you'll gently check in on them.",
        pipeline,
        wake_up: 10,  // nudge after 10s of caller silence
      });
      this._nudges = 0;
    }

    async on_enter() {
      await this.session!.say("Hi! Take your time — I'm here whenever you're ready.");
    }

    async on_exit() {
      await this.session!.say('Goodbye!');
    }

    async on_wake_up() {
      // Called by the runtime when the caller has been silent for `wake_up` seconds.
      this._nudges += 1;
      await this.session!.say("Are you still there? I'm happy to keep helping.");
    }
  }
  ```
</CodeGroup>

<Tip>Track state across nudges (like the `_nudges` counter above) to escalate your response — for example, offer more help on the first nudge and end the call after several unanswered check-ins.</Tip>

### Configuration Options

<ParamField path="wake_up" type="int" default="0">
  Set on the `Agent`. Seconds of caller silence to allow before triggering `on_wake_up`. `0` disables wake-up calls; a negative value is rejected.
</ParamField>

### Callback

<ParamField path="on_wake_up" type="async method">
  Override this method on your `Agent` to define the wake-up action. The runtime calls it each time the caller stays silent for `wake_up` seconds.
</ParamField>

## References

<Tabs>
  <Tab title="Python">
    #### Examples

    <CardGroup cols={2}>
      <Card title="Wakeup Call" icon="github" href="https://github.com/ZeroRuntimeAI/zeroruntime-python-examples/blob/main/speech/wakeup_call.py">
        Checkout the full implementation on GitHub
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Node JS">
    #### Examples

    <CardGroup cols={2}>
      <Card title="Wakeup Call" icon="github" href="https://github.com/ZeroRuntimeAI/zeroruntime-js-examples/blob/main/speech/wakeup_call.ts">
        Checkout the full implementation on GitHub
      </Card>
    </CardGroup>
  </Tab>
</Tabs>
