Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 4 min read

I built the agent in Dify, then plugged it into my team chat

For many teams, the frustration is familiar: an agent works great inside Dify's web console, but when questions come up in group chats, someone still has to manually copy and paste answers back and forth. To test puttin

I built the agent in Dify, then plugged it into my team chat

For many teams, the frustration is familiar: an agent works great inside Dify's web console, but when questions come up in group chats, someone still has to manually copy and paste answers back and forth.

To test putting a Dify agent into group chat, we set up a customer service application for a fictional brand called Northwind, and ran it inside a test group. In the test group, Mia asked whether the Northwind Desk fits a small apartment. A bot answered with the folded measurements, the height range and the assembly time, in a single message. Two follow-ups about load capacity and EU shipping came back in the same coherent thread.

The bot is a Dify Agent. The application itself was built and published in Dify, prompt and all. What put it in the group is LangBot with its DifyAgent plugin, which hands the conversation over to a Dify application instead of answering from a prompt of its own.

That split is the point of this post: Dify gives you the agent, and LangBot gives that agent a seat in the conversation where your customers already are. Below is what the wiring looks like, and what changed once it was done.

What you need before you start

  • A Dify instance with an application you actually use. A Dify 1.18 Agent application is the newest case; Chatbot, the older Agent type, Chatflow and Workflow applications also work as the conversation handler.
  • LangBot, self-hosted from the open-source release.
  • The DifyAgent plugin from the LangBot plugin marketplace. It is listed as a Certified Plugin and installs with one click.
  • A bot account on whichever chat platform you want to use.

The DifyAgent store page in the LangBot plugin marketplace, marked Certified Plugin with one-click install

That is the whole dependency list. There is no second service in the middle and nothing extra running alongside Dify.

The setup, in four steps

Install the plugin. Open the marketplace inside LangBot, find DifyAgent, install it. The Installed page then lists Dify Agent with its version and its source, From Marketplace.

The Installed list in LangBot showing Dify Agent installed from the marketplace

Take the application's API key from Dify. In Dify, the API access page of the application issues a key for that one application. That key is the only thing the plugin needs from Dify. You are not exposing the instance, and you are not registering Dify as a model provider β€” the application stays a Dify application, and LangBot just talks to it.

Create a pipeline in LangBot and choose the handler. A pipeline is LangBot's unit of "what handles an incoming message". Set its conversation handler to Dify Agent and paste the key. For a first run, everything else on the page can stay at its defaults.

The LangBot pipeline page with Dify Agent selected as the conversation handler

Connect a bot to a chat platform, then ask something in a group. We ran the real round-trip in a Matrix room, because that is what our team uses. LangBot also connects to Slack, Discord and Telegram, and the connection step has the same shape on each of them; the docs carry the per-platform specifics.

The Dify side stays unremarkable β€” a name, a prompt, a published state.

The published Dify Agent application used in the demo, showing its prompt and its published state

Field-level instructions live in the docs at https://docs.langbot.app rather than here, because the pipeline page changes more often than the idea behind it does.

What the group actually sees

The first message is where most integrations fall apart, so it is worth showing instead of describing.

A team member asking whether the desk fits a small apartment, and the bot answering in one complete message

Mia: Hi! Does the Northwind Desk fit a small apartment?

The reply arrives as one message: the folded size, the range the desktop moves through, the assembly time for one person with no tools. No half-finished sentence, no stray fragments around it.

That last part is what people ask about first: whether what lands in the room is the whole reply or a fragment of it. Here every question produced one finished answer, which is the only thing a customer should have to read.

The same conversation continuing, with a follow-up about load capacity answered in context

Two more questions follow β€” how much weight it holds, whether it ships to the EU β€” and both answers stay inside the same conversation. The bot does not re-introduce the product or ask which desk. Mia asked about a small apartment, then load, then delivery, and the replies read as one thread because they are one thread. That continuity is what makes the thing safe to leave switched on.

Old applications are not left behind

You do not have to rebuild anything to try this. Chatbot, older Agent, Chatflow and Workflow applications all work as the conversation handler, and multi-turn context holds for them as well. We pointed a Chatflow application at an order group as a check: one member asked where order NW-1042 was and got the transit status with the expected arrival date, then asked about a second order and got a direct answer without the first being repeated.

If your Dify instance has been running for a year, those existing applications are the ones you most want inside a group, and they are exactly the ones this covers.

One platform at a time, honestly

We ran the round-trip on Matrix, and every conversation screenshot here comes from that room. Slack, Discord, Telegram and others are supported through the same bot connection, but I am not going to claim a test I did not run on them. Read the docs for the platform you care about and expect the same four steps.

Where to go from here

If you already have a Dify application that answers well, the shortest path is to install the plugin, paste the key, and ask it something in a group you are already in. One message will tell you whether the answer reads like something you would let a customer see.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.