Skip to main content

Vapi + Memanto

Vapi A Vapi assistant starts every call from zero. It doesn’t know your policies unless they are in the prompt, and it repeats on Friday the mistake it was corrected for on Monday. memanto-vapi is a single webhook that gives the assistant a memory it keeps between calls.

Knowledge at call start

Your organization’s knowledge and the lessons learned so far arrive in the prompt as {{memanto_context}}.

Memory tools mid-call

memanto_recall looks things up; memanto_remember saves what the agent learns.

Learns from each call

At end-of-call-report the conversation becomes typed memories — mistakes, corrections, better answers, facts.

Never delays a call

Lookup is capped at 3s inside Vapi’s 7.5s assistant-request budget, and fails open.

How It Works

Everything lives in one Memanto agent, so you can read, correct, and audit what the voice agent knows with the CLI or the web UI.

Two scopes

One memory for the whole assistant: your knowledge plus the lessons from every call. Every caller benefits from what the agent learned yesterday, and no personal caller details are stored, so nothing can leak between callers.
In caller scope the context has two parts:
Keep MEMANTO_VAPI_CALLER_SALT secret and stable. Changing it cuts every caller off from their existing memories.
The server decides whose memories a call may read and write, from the caller Vapi reports. The model never passes a caller ID, so a prompt injection cannot reach another caller’s memories, and every result is re-checked against the caller’s tag before it is returned. In caller scope, anything the agent saves mid-call is private to the caller on the line; shared lessons come only from end-of-call extraction, whose prompt excludes caller details.

Prerequisites

  • Python 3.10+
  • Memanto 0.2.21+ and a Moorcheh API key (or an on-prem Memanto backend)
  • A Vapi account, a saved assistant, and a public HTTPS URL for the webhook

Install and run

1

Install

Until memanto-vapi is on PyPI, install it from a checkout of the Memanto repo: pip install ./integrations/vapi (see GitHub source).
2

Configure

3

Serve

The webhook is at POST /vapi/webhook, with GET /health for status. For local testing, expose it with ngrok http 8080.
The Memanto agent is created on first start. Run one instance per agent — Memanto keeps one active session per agent, so instances sharing ~/.memanto would sign each other out.

Load your knowledge

Anything stored in the Memanto agent is available to the voice agent. Add it before starting the webhook — activating an agent elsewhere signs out a running webhook until its next call:
Review and correct what the agent learned in the same place:

Configure Vapi

1

Create a credential

In the Vapi dashboard, create a Bearer Token credential whose token is MEMANTO_VAPI_SECRET. Requests without it are rejected with 401; the legacy X-Vapi-Secret header is also accepted.
2

Create the tools

Create each printed definition with POST https://api.vapi.ai/tool, then add both tool IDs to the assistant’s model.toolIds.
3

Use the variable in the prompt

4

Point Vapi at the webhook

Set the URL and credential on the phone number, so inbound calls ask it which assistant to use (don’t also attach an assistant to the number), and on the assistant (server.url) with end-of-call-report in serverMessages, so calls are learned from.

Outbound, web, and chat calls

Vapi only sends assistant-request for inbound phone calls. For calls you start yourself, build the overrides at call creation:
Tools and end-of-call learning work the same for these calls. In caller scope the call must carry customer.number or customer.externalId for the caller’s private half; the shared half always works.

Mount in your own app

Unlike create_app, create_router does not activate the Memanto session at startup — call memory.ensure_ready() in your own startup hook so the first caller doesn’t wait for it.

Behavior and limits

Shared memory across integrations

All Memanto integration packages use the same Moorcheh-backed agents when they share an agent_id:

Next Steps