Skip to main content
Checkfu does not operate messaging adapters. You connect a messaging app by running a small gateway in your own service. The gateway receives messages from the provider, sends them to a Checkfu Session through the ordinary API, and delivers the Agent’s replies back through the provider.
The Checkfu CLI and TypeScript SDK are private-alpha artifacts with no self-service public installation channel. Part of this flow is behind a rollout fence; a deployment that has not enabled it refuses the request rather than running it. Confirm capability status before making availability part of your application’s contract.

What the gateway does

Checkfu does not store the mapping from a provider conversation to a Session. Keep that mapping in your own database, keyed by your tenant and the provider’s conversation ID.

1. Create a Session for a new conversation

Create one Session the first time you see a conversation. Use a stable Idempotency-Key derived from your tenant and the provider’s conversation ID, so a retried webhook returns the same Session. Store the returned sess_… ID next to the conversation. You need an existing Agent and Environment. The Quickstart creates both. Link CLI access before using the CLI tab.
An API-key request for an Agent with governed Connection bindings also needs acted_as. See Session identity.

2. Send each message as Session input

For every verified incoming message, post a user.message event. Use the provider’s message ID in the Idempotency-Key and in caused_by.request_id (1 to 512 characters). If the provider redelivers the message, the same key returns the same stored event.
The response means Checkfu stored the input. It does not mean the Agent has answered. Keep the returned seq.

3. Read the reply

Follow the event stream from just after your stored message, or page through the event log. agent.message events carry the reply text in payload.content. A session.status_idle whose stop_reason is not requires_action marks the end of the turn. See Events for the full catalog and Resume a stream for cursor handling.
Save the highest seq you have delivered for each conversation. After a restart, resume from that cursor so you do not resend earlier replies.

4. Deliver the reply through the provider

Your gateway calls the provider’s send API with the reply text. Choose what to deliver. You can skip agent.thinking, tool events, and other internal events, and you can post a single message per turn. If the Agent asks for an approval, the Session stops at a requires_action boundary. Show the request in your app, then decide it with the approval API. A button press in the provider is not a decision until your service calls actionApprovals.decide. See Handle an approval.

Your responsibilities

Delivery is not exactly-once

An idempotent API call and a stored event do not tell you whether the provider received your reply. If a send times out, you do not know whether the message arrived. Record the attempt and reconcile with the provider before you send again. Do not replay an uncertain send automatically. A successful create or input request also does not mean a model answered. Support depends on the Harness, Environment, model, and resource combination you select. Check capability status before relying on one.

Next steps

Resume a stream

Keep a cursor so a restart does not resend or skip events.

Handle an approval

Decide an ActionApproval from your own interface.

Events

Look up the event types a gateway reads.

Add an agent to your app

Use the same Session API from any backend.