The current Haystack integration allows you to run chainlit apps and visualise intermediary steps. Playground capabilities will be added with the release of Haystack 2.0.

Haystack is an end-to-end NLP framework that enables you to build NLP applications powered by LLMs, Transformer models, vector search and more. Whether you want to perform question answering, answer generation, semantic document search, or build tools that are capable of complex decision making and query resolution, you can use the state-of-the-art NLP models with Haystack to build end-to-end NLP applications solving your use case. Check out their repo:

A Haystack agent run with reasoning steps


pip install farm-haystack chainlit


Create a new Python file named with the code below.

from haystack.agents.conversational import ConversationalAgent
import chainlit as cl

## Agent Code

agent = ConversationalAgent(


async def main(message: cl.Message):
    response = await cl.make_async(
    await cl.Message(author="Agent", content=response["answers"][0].answer).send()

This code adds the Chainlit callback handler to the Haystack callback manager. The callback handler is responsible for listening to the chain’s intermediate steps and sending them to the UI.

Then, you can run chainlit run in your terminal to run the app and interact with your agent.


Check out this full example from the cookbook: