text stringlengths 0 59.1k |
|---|
</TabItem> |
<TabItem value="yarn" label="yarn"> |
```bash |
yarn dev |
``` |
</TabItem> |
<TabItem value="pnpm" label="pnpm"> |
```bash |
pnpm dev |
``` |
</TabItem> |
</Tabs> |
You should see the VoltAgent server startup message: |
```bash |
βββββββββββββββββββββββββββββββββββββββββββββββββββ |
VOLTAGENT SERVER STARTED SUCCESSFULLY |
βββββββββββββββββββββββββββββββββββββββββββββββββββ |
β HTTP Server: http://localhost:3141 |
βͺ Share it: pnpm volt tunnel 3141 (secure HTTPS tunnel for teammates) |
Docs: https://voltagent.dev/deployment-docs/local-tunnel/ |
β Swagger UI: http://localhost:3141/ui |
Test your agents with VoltOps Console: https://console.voltagent.dev |
βββββββββββββββββββββββββββββββββββββββββββββββββββ |
``` |
</StepSection> |
<StepSection stepNumber={3} title="Set Up the Slack Trigger in Console"> |
<video controls loop muted playsInline style={{width: '100%', height: 'auto'}}> |
<source src="https://cdn.voltagent.dev/voltagent-recipes-guides/slack-1.mp4" type="video/mp4" /> |
Your browser does not support the video tag. |
</video> |
<br/> |
<br/> |
Open [VoltAgent Console](https://console.voltagent.dev/triggers) and go to **Triggers** β **Create Trigger**. |
1. Select **Slack β Message posted to channel** |
2. Use the managed Slack app when prompted |
3. Create a Slack credential and save the `credentialId` |
</StepSection> |
<StepSection stepNumber={4} title="Expose Your Local Agent with Volt Tunnel"> |
<video controls loop muted playsInline style={{width: '100%', height: 'auto'}}> |
<source src="https://cdn.voltagent.dev/voltagent-recipes-guides/slack-2.mp4" type="video/mp4" /> |
Your browser does not support the video tag. |
</video> |
<br/> |
<br/> |
[Volt Tunnel](/deployment-docs/local-tunnel/) exposes your local server to the internet so triggers can reach it. |
Run the tunnel command: |
```bash |
pnpm volt tunnel 3141 |
``` |
Copy the tunnel URL (e.g., `https://your-tunnel.tunnel.voltagent.dev`) and set it as the **Endpoint URL** in the trigger configuration. |
</StepSection> |
<SectionDivider> |
The project is set up and the Slack trigger is configured. The following steps cover wiring the trigger to your agent and adding the reply action. |
</SectionDivider> |
<StepSection stepNumber={5} title="Wire the Slack Trigger to Your Agent"> |
<video controls loop muted playsInline style={{width: '100%', height: 'auto'}}> |
<source src="https://cdn.voltagent.dev/voltagent-recipes-guides/slack-3.mp4" type="video/mp4" /> |
Your browser does not support the video tag. |
</video> |
<br/> |
<br/> |
This code sets up a trigger handler that receives Slack messages and can call a weather tool. The reply tool is added in the next step. |
<ExpandableCode title="src/index.ts" previewLines={15}> |
```ts |
import { openai } from "@ai-sdk/openai"; |
import { Agent, VoltAgent, createTriggers } from "@voltagent/core"; |
import { createPinoLogger } from "@voltagent/logger"; |
import { honoServer } from "@voltagent/server-hono"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.