<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske" -->

---
title: Build Your Own AI-Powered Slack Bot with the Laravel AI SDK
description: A step-by-step guide walks through building a custom AI-powered Slack bot using the new Laravel AI SDK, as an alternative to Anthropic's Claude Tag Slack app....
canonical: https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Build Your Own AI-Powered Slack Bot with the Laravel AI SDK | daily.dev
og:description: A step-by-step guide walks through building a custom AI-powered Slack bot using the new Laravel AI SDK, as an alternative to Anthropic's Claude Tag Slack app....
og:url: https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske
og:image: https://api.daily.dev/og/posts/75GuqdSKe.png
og:image:alt: Build Your Own AI-Powered Slack Bot with the Laravel AI SDK
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build Your Own AI-Powered Slack Bot with the Laravel AI SDK

**[Tighten](https://daily.dev/sources/tightenco)** · 16 min read · 1 upvotes · 1 comments

## Summary

A step-by-step guide walks through building a custom AI-powered Slack bot using the new Laravel AI SDK, as an alternative to Anthropic's Claude Tag Slack app. It covers installing the SDK, creating an agent with a chosen model (GPT-5.4 in the example), setting up a Slack app via manifest, handling incoming Slack events through a webhook controller, queuing responses as jobs to stay under Slack's response window, adding conversation memory with the RemembersConversations trait, and implementing cross-thread memory using RAG with pgvector for similarity search on stored messages.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tighten.com/insights/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk>

## Questions this post answers

### How do I give a Laravel AI agent long-term memory across different Slack threads?

Implement retrieval augmented generation by storing every message and its embedding in a Postgres table using the pgvector extension, then attach the Laravel AI SDK's SimilaritySearch tool to the agent pointed at that model. The agent automatically searches stored embeddings when relevant, letting it recall information from unrelated threads, such as a document discussed the previous day.

_Building agent memory with RAG is easier to get right with implementation walkthroughs surfaced on daily.dev._

### How do I keep a Slack bot from requiring an @mention on every single message in a thread?

Track which Slack threads the bot has already responded in using a database table mapping thread_ts to a conversation ID, then in the webhook handler respond if the bot is either mentioned or the message lands in an already-known thread. This lets the bot follow an ongoing conversation naturally, similar to Anthropic's Claude Tag Slack app, without needing to re-tag it on every reply.

_Developers wiring up conversational Slack bots can find these threading patterns via daily.dev._

### Why does an AI Slack bot need to process messages in a queued job instead of replying inline?

Slack expects a response within three seconds and retries the webhook request if it does not get one, but an AI model call can easily take longer than that. Dispatching the reply to a queued job (processed with php artisan queue:work, Horizon, or a Laravel Cloud queue worker) lets the webhook return immediately while the actual AI response is generated and posted afterward.

_daily.dev helps developers building Slack integrations stay ahead of timing constraints like this._

## Similar posts on daily.dev

- [Laravel AI Integration: Build a Document Search Agent](https://daily.dev/posts/laravel-ai-integration-build-a-document-search-agent-0cerhbf4d) · Laravel · 12 upvotes · 0 comments
- [Ship AI with Laravel: Building Your First Agent with Laravel 13's AI SDK](https://daily.dev/posts/ship-ai-with-laravel-building-your-first-agent-with-laravel-13-s-ai-sdk-h4q7lerdt) · Laravel News · 5 upvotes · 0 comments
- [Build Your Own AI Agent](https://daily.dev/posts/build-your-own-ai-agent-oxnecsm6o) · freeCodeCamp · 3 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel), [#rag](https://daily.dev/tags/rag), [#pgvector](https://daily.dev/tags/pgvector)

[View this post on daily.dev](https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Build Your Own AI-Powered Slack Bot with the Laravel AI SDK","url":"https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske"},"datePublished":"2026-08-26T15:49:17.725Z","dateModified":"2026-09-14T09:10:43.743Z","description":"A step-by-step guide walks through building a custom AI-powered Slack bot using the new Laravel AI SDK, as an alternative to Anthropic's Claude Tag Slack app....","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/acf65280643e4857856bc9379da9d13a?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/acf65280643e4857856bc9379da9d13a?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Tighten","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Tighten","logo":"https://media.daily.dev/image/upload/s--bWtAKZZp--/f_auto/v1723737023/logos/tightenco","url":"https://daily.dev/sources/tightenco"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"php,laravel,rag,pgvector","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Tighten","item":"https://daily.dev/sources/tightenco"},{"@type":"ListItem","position":3,"name":"Build Your Own AI-Powered Slack Bot with the Laravel AI SDK"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/build-your-own-ai-powered-slack-bot-with-the-laravel-ai-sdk-75guqdske#faq","mainEntity":[{"@type":"Question","name":"How do I give a Laravel AI agent long-term memory across different Slack threads?","acceptedAnswer":{"@type":"Answer","text":"Implement retrieval augmented generation by storing every message and its embedding in a Postgres table using the pgvector extension, then attach the Laravel AI SDK's SimilaritySearch tool to the agent pointed at that model. The agent automatically searches stored embeddings when relevant, letting it recall information from unrelated threads, such as a document discussed the previous day. Building agent memory with RAG is easier to get right with implementation walkthroughs surfaced on daily.dev."}},{"@type":"Question","name":"How do I keep a Slack bot from requiring an @mention on every single message in a thread?","acceptedAnswer":{"@type":"Answer","text":"Track which Slack threads the bot has already responded in using a database table mapping thread_ts to a conversation ID, then in the webhook handler respond if the bot is either mentioned or the message lands in an already-known thread. This lets the bot follow an ongoing conversation naturally, similar to Anthropic's Claude Tag Slack app, without needing to re-tag it on every reply. Developers wiring up conversational Slack bots can find these threading patterns via daily.dev."}},{"@type":"Question","name":"Why does an AI Slack bot need to process messages in a queued job instead of replying inline?","acceptedAnswer":{"@type":"Answer","text":"Slack expects a response within three seconds and retries the webhook request if it does not get one, but an AI model call can easily take longer than that. Dispatching the reply to a queued job (processed with php artisan queue:work, Horizon, or a Laravel Cloud queue worker) lets the webhook return immediately while the actual AI response is generated and posted afterward. daily.dev helps developers building Slack integrations stay ahead of timing constraints like this."}}]}
```

