text stringlengths 0 59.1k |
|---|
/* final status */ |
}), |
}) |
.andThen({ |
/* suspend/resume step for manager approval */ |
}) |
.andThen({ |
/* final decision logging */ |
}); |
``` |
When the claimed amount exceeds $500, the workflow suspends and triggers the MCP elicitation adapter, whichβinside the exampleβauto-approves but can be wired to a human reviewer. |
### Local Verification |
#### Start the development server |
Install dependencies and start the development server: |
```bash |
pnpm install |
pnpm dev |
``` |
You should see: |
```bash |
ββββββββββββββββββββββββββββββββββββββββββββββββββ |
VOLTAGENT SERVER STARTED SUCCESSFULLY |
ββββββββββββββββββββββββββββββββββββββββββββββββββ |
β HTTP Server: http://localhost:3141 |
β Swagger UI: http://localhost:3141/ui |
... |
``` |
- Use `http://localhost:3141` as the base URL to inspect agents, tools, prompts, and resources. VoltOps Console at https://console.voltagent.dev lists the MCP endpoints once the server is online. |
- Trigger the `expense-approval` workflow; for amounts over $500, the exampleβs elicitation adapter simulates a manager granting approval. |
### Connect to ChatGPT |
#### Publish the local server |
Because ChatGPT only talks to HTTPS endpoints, tunnel your development server before you move into the Apps SDK flow. Run the VoltAgent CLI tunnel command: |
```bash |
pnpm volt tunnel 3141 |
# Forwarding: https://<slug>.tunnel.voltagent.dev -> http://127.0.0.1:3141 |
``` |
Keep the tunnel running; the VoltAgent example listens on `3141`, so the default command already forwards the correct port. (You can omit the `3141` argument to rely on the default.) See the [Local Tunnel guide](https://voltagent.dev/deployment-docs/local-tunnel/) for more options (including `npx` usage). |
#### Create the ChatGPT connector |
Open ChatGPT, head to **Settings β Apps**, and work through the following: |
1. **Turn on developer access.** Under **Connectors β Advanced**, switch on Developer Mode (your OpenAI partner contact or workspace admin needs to grant this once). |
2. **Create the connector record.** Choose **Connectors β Create**, then point the form at your tunnel: |
- _Name_: `VoltAgent Expense MCP` |
- _Description_: `Expense approval workflow, prompts, and helper tools powered by VoltAgent.` |
- _URL_: `https://<slug>.tunnel.voltagent.dev/mcp/voltagent-example/mcp` |
3. **Skip auth while testing.** Leave authentication off until the service is hosted in production. |
 |
#### Exercise the connector from ChatGPT |
Once the connector is created, open a new ChatGPT conversation and pick the `VoltAgent Expense MCP` connector from the Apps menu. Suggested smoke tests: |
- Call the `current_time` tool to confirm basic tool execution. |
- Submit an expense scenario (for example, βFile a $750 hardware reimbursement for employee-123β). |
The model should trigger the workflow, hit the elicitation adapter, and respond with the manager decision produced by the demo integration. |
 |
After verifying the connector, VoltAgent tools and workflows remain available over MCP, HTTP, SSE, and stdio. Swap the mock elicitation handler for the approval channel your team relies on, enrich the prompt and resource adapters with real documentation, and expose the service behind an authenticated HTTPS endpoint bef... |
--- |
### Credits |
This example adapts the original walkthrough authored by [Ekim Cem Γlger](https://www.linkedin.com/in/ekimcem/). You can read the initial article on: [Building a ChatGPT App with VoltAgent and the Apps SDK](https://dev.to/ekimcem/building-a-chatgpt-app-with-voltagent-and-the-apps-sdk-4j21). |
<|endoftext|> |
# source: VoltAgent__voltagent/website/recipes/voice.md type: docs |
--- |
id: voice |
title: Voice |
slug: voice |
description: Add text-to-speech and speech-to-text to your agents. |
--- |
# Voice |
Enable your agents to speak and listen using voice providers like OpenAI or ElevenLabs. |
## Quick Setup (OpenAI) |
```typescript |
import { openai } from "@ai-sdk/openai"; |
import { Agent, VoltAgent } from "@voltagent/core"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.