Skip to content
KEIKI

X agents

Setup guide

How to connect an AI agent to X DMs

Create the agent in Keiki, then connect your X account from the Channels page with Log in with X and authorise it. The grant is completed server-side and stored for you, so direct messages start routing to the agent without you pasting keys or standing up a listener.

Takes about 10 minutesUpdated

Before you start

What you need before you start.

  • A Keiki account, which is free to create
  • The X account whose DMs you want answered, and the right to authorise apps on it
  • A few of your own posts or replies, so the agent learns how you actually write
  • Optionally your own app credentials, if you would rather paste a token than use the login flow

Step by step

Six steps from a full DM inbox to an agent answering it.

  1. Step 1

    Create a Keiki account

    Sign up at onkeiki.com. Connecting X costs nothing on Keiki’s side: no number to buy, no per-message fee for the channel itself.

  2. Step 2

    Start from a template instead of a blank agent

    Open the Office Hours template. It arrives knowing how to answer the questions that land in DMs after a post — pricing, availability, "does this work for me" — without sounding like a support macro.

  3. Step 3

    Connect the account with Log in with X

    On the Channels page, add an X account and press Log in with X. You authorise on X, the callback returns to Keiki, and the grant is completed and stored server-side. If you run your own X app, paste an access token instead and open Advanced for the consumer secret and bearer token.

  4. Step 4

    Attach the agent and check routing

    Attach the agent to the connected account. Keiki shows the account it resolved and its routing status, so you can see whether direct messages are actually reaching the agent before you rely on it.

  5. Step 5

    Teach it your voice, then DM yourself

    Paste a few of your own threads into the agent profile — it copies your rhythm, not a brand-voice document. Then DM the account from another handle and read the reply as a follower would, at the length people actually read.

  6. Step 6

    Post, and watch it keep up

    The next post that moves brings a burst of DMs; the agent answers them while the post is still live instead of tomorrow. Take over any conversation yourself, and reconnect from the same row if X ever asks for the grant again.

More on what your X agent does

Questions

Questions people ask while connecting an agent to X.

Do I need my own X developer app?
No. Log in with X authorises the connection and Keiki completes the grant server-side, so the usual key-and-secret shuffle is optional. If you do run your own app, pasting an access token works too.
Does the agent answer DMs or replies?
Direct messages are the job: that is where the real questions land after a post. It answers in your voice, at DM length, rather than posting publicly on your behalf.
How does it learn how I write?
You paste a handful of your own posts and replies into the agent profile. It copies the rhythm and the vocabulary from those, which is why it does not read like a support macro.
What happens if the connection expires?
Keiki reports the account’s status on the Channels page and offers a reconnect on the same row, so a revoked or expired grant is visible rather than silently swallowing messages.
Can I take over a conversation?
Yes, any DM thread can be handed to you, with the full history and everything the agent already said, so you are not reconstructing the conversation before you reply.
How long does the whole setup take?
About ten minutes: create the agent from a template, authorise the account, paste in a few of your posts. The connection itself is one button and one authorisation screen.

The DMs from your last post are still waiting.

Create the agent, authorise the account, paste in a few of your posts. The next burst gets answered while the post is still moving.