Kai

How to connect an AI agent to a custom (in-house) CRM via its API — without rewriting the system

Updated 1 November 2026 · Kai team · 8 min read

Many companies run their own CRM: written for their process, hosted on their own server, and no off-the-shelf “AI assistant for amoCRM” fits it. You don't need to rewrite the system for that. If the CRM has a REST API that answers in JSON, an AI agent connects to it the same way it connects to a boxed one: you describe where the API lives, how to authorize and which request does what, and then you set up pipelines, create tasks and automations in plain words in a chat. This guide covers what you need, how it works in Kai and where the limits are.

In short / TL;DR

  • Three things are needed: an https API address on a public host, an auth method (OAuth 2.0, API key, bearer or basic) and a pipelines-list endpoint. Everything else is optional.
  • You connect with a connector spec: a JSON that Kai drafts from your docs or builds step by step in the chat. No code to write.
  • After that the agent works with your CRM like with amoCRM: pipelines and stages, deals, contacts, companies, tasks, notes, fields, analytics; events from your CRM feed “event → action” rules.
  • Try it first on Kai Sandbox CRM — a test CRM on Kai's side that connects exactly like a real one.
  • Security: https only, requests only to your API's host, encrypted secrets, templates without code, size and rate limits.
  • Connecting your own CRM is on the Max plan (€119/mo). Discussing the system and drafting the spec is free.

What “your own CRM” means to an AI agent

“Your own” here is any CRM that isn't on the list of ready-made integrations: an in-house system on Laravel or Django, a custom build on top of an open-source CRM such as EspoCRM or SuiteCRM, an internal portal with a sales module, or a CRM like HubSpot or Pipedrive. The agent doesn't care what it's written in. It needs three things: where to send requests, how to prove it's you, and which request does what. In Kai all of this is a connector spec — a JSON of a few dozen lines. Ready-made specs for HubSpot, Pipedrive and EspoCRM are already in the docs: paste, put your token in, send.

What you need before connecting

Three ways to connect

  1. Sandbox. In the Kai chat — Telegram or browser — tap “🔗 Connect CRM” → “🔧 My own CRM via API” → “🧪 Try Kai Sandbox CRM”. Kai spins up a small test CRM on its side with pipelines, deals, tasks and signed events and connects it exactly like a real custom CRM. Everything below works there too — the fastest way to see what the agent will do with your system before writing a line of the spec.
  2. From the docs. Paste a few paragraphs describing your API into the chat or attach a file — Kai drafts the spec, you check the field names and send it back.
  3. Step by step. The “🧩 Build the spec step by step” button: Kai asks for the API address, the auth method and two paths — pipelines and deals — calls them itself and reads the field names from live responses. No JSON to write; with OAuth 2.0 the fields are read right after you authorize.

A ready JSON can be sent as text or as a .json file. Before saving, Kai validates the spec — https, public host, placeholders, secrets — and tells you exactly what to fix. For OAuth 2.0 an “Authorize” button then appears for your CRM's side; for the other methods Kai calls the pipelines list right away and shows what it sees. Switch between several CRMs with /accounts.

A minimal spec is a name, the base URL, the auth block and one pipelines.list operation with the paths to the response fields. That's enough to connect and see your pipelines; the rest can be added later. The template and examples are in the Kai docs.

What the agent can do once connected

OperationWhat Kai doesWhat to describe in the spec
Pipelines and stagesLists, creates, renames, adds stages; tells “won” and “lost” stages apartpipelines.list — mandatory; create, update, add_stage — optional
DealsSearches, creates, updates, moves between stages, links contacts and companiesleads.list, leads.search, leads.create, leads.update
Contacts and companiesCreates and updates from a text or voice messagecontacts.*, companies.*
TasksCreates with a due date on a deal, completes; reads the list for deal health and meeting briefstasks.create, tasks.complete, tasks.list
Notes and tagsAdds notes, applies tagsnotes.create, notes.list, tags.*
FieldsCreates deal, contact and company fields: text, number, list, date; sets valuesfields.*
Pipeline analyticsHow many deals sit on each stage and where they get stuckData from leads.list
Automations“Event → action” rules: your CRM sends an event to Kai's webhook, Kai creates a task, writes a note, notifies the chatThe events block in the spec + a webhook from your CRM, HMAC signature optional

Placeholders like {{name}} in paths and request bodies are filled from the action's parameters, {{secret.token}} from this connector's secrets. Response paths are dotted: data.items, result.0.id. The agent builds requests only from what you described: no code, no access to anything else.

Security: what the agent cannot do to your system

You can revoke access at any moment — delete the token or key on your CRM's side, and the agent's next request simply won't go through.

Limits: what you won't get

When you need a developer

In every other case no developer is needed: Kai drafts the spec, the person who knows the system checks it.

With Kai it's one message

Once connected, talking about your CRM is no different from talking about amoCRM: you describe what you need, Kai asks follow-ups, shows a plan, does it and sends a report. Examples:

Show the pipelines in my CRM and how many deals sit on each stage.
Create the deal “Peters, kitchen” for 3,500 in the “Sales” pipeline, contact Peters, phone +1 555 000-0000, and a task “call back” for tomorrow.
When a deal moves to the “Contract” stage — create the task “issue the invoice” for the owner and message me in the chat.

Connecting your own CRM is on the Max plan: €119/mo, up to 10 CRM accounts, priority support. Discussing the system, asking for a draft spec and asking questions is free — during the trial and on any plan. Kai speaks English and Russian.

FAQ

My CRM is in-house, it has an API but no docs. Will it work?

Yes. Send examples of requests and responses or a piece of the controller code — Kai drafts the spec. Or build it step by step: give the address, the auth method and the paths to pipelines and deals; Kai calls them and reads the field names from the responses itself.

Is it safe to give an AI agent access to my own CRM?

Access is limited to what the spec describes: requests only to your host and only over https, templates without code, encrypted secrets, size and rate limits. To revoke access, delete the token or key on your side.

How much does connecting my own CRM cost?

It's the Max plan — €119/mo, up to 10 CRM accounts, priority support. Discussion and a draft spec are free. Building the CRM itself or its API is not part of the plan.

Do HubSpot, Pipedrive or EspoCRM count?

Yes. To the agent they are the same “own CRMs” via API: ready-made specs for them are in the Kai docs, you only need a token or an API key.

What's next

Open the Kai chat, tap “Connect CRM” → “My own CRM via API” and start with the sandbox or send your docs. If the system has a REST API, in one evening it becomes a CRM you can run with words.

Author: Kai team · Updated · Capabilities as of the publication date; the current status and the spec template are in the chat and the docs.