Skip to content

Remember earlier calls

By default the voice agent remembers earlier calls with the same contact: their consultations share one OpenClaw session, the agent summarizes each answered call there, and you can give the next call a short recap. Calls and your WeChat chat with the caller also share context both ways: the agent’s first consultation in a call gets the latest chat messages, and the call summary is left as a note in the chat. All paths below are relative to channels.agent-wechat.calls.voice, and all of this needs consultation to be enabled.

Turn on recent context

  1. Add recentContext to the realtime settings:

    {
    "realtime": {
    "recentContext": { "enabled": true, "maxMessages": 10 }
    }
    }
  2. Restart the Gateway, then call the bot. The speech model starts the call with a recap like this in its instructions:

    Recent context with this caller, for continuity. Use it when it helps; don't read it out, and it may be out of date.
    Earlier calls, newest first:
    - yesterday, they called (4 min 10 s): They asked to move Friday's dinner to 7 pm; you confirmed.
    Latest WeChat messages with them, oldest first:
    - (2 h ago) Caller: Did you book the table?
    - (2 h ago) You: Yes, 7 pm at the usual place.

What each setting does

SettingDefaultBehavior
sessionScopeper-contactper-contact keeps one session for each contact, so consultations remember earlier calls. per-call starts every call in a new session.
consultation.summarytrueAfter an answered call, the agent gets the call transcript in the call’s session and writes a two-to-four-sentence summary. It has no tools for this turn. The summary is also left as a note in your chat with the caller, which the chat’s agent sees with the next message there.
consultation.recentMessages10How many of the latest chat messages the agent’s first consultation in a call gets as context, 0–50. 0 turns this off.
realtime.recentContext.enabledfalseSends the speech model the last three call summaries with the caller and the latest messages of your WeChat chat with them.
realtime.recentContext.maxMessages10How many chat messages to include, 1–50. The recap is cut to about 3,000 characters, keeping the newest messages.

Calls you place with the wechat_call tool also report their summary to the session that placed them, so the agent there can tell you how the call went.