@voltagent/core 0.1.58 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,12 +25,12 @@ Escape the limitations of no-code builders and the complexity of starting from s
25
25
  </div>
26
26
 
27
27
  <div align="center">
28
-
28
+
29
29
  [![npm version](https://img.shields.io/npm/v/@voltagent/core.svg)](https://www.npmjs.com/package/@voltagent/core)
30
30
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md)
31
31
  [![Discord](https://img.shields.io/discord/1361559153780195478.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://s.voltagent.dev/discord)
32
32
  [![Twitter Follow](https://img.shields.io/twitter/follow/voltagent_dev?style=social)](https://twitter.com/voltagent_dev)
33
-
33
+
34
34
  </div>
35
35
 
36
36
  <br/>
@@ -52,6 +52,7 @@ Instead of building everything from scratch, VoltAgent provides ready-made, modu
52
52
 
53
53
  - **Core Engine (`@voltagent/core`)**: The heart of VoltAgent, providing fundamental capabilities for your AI agents Define individual agents with specific roles, tools, and memory.
54
54
  - **Multi-Agent Systems**: Architect complex applications by coordinating multiple specialized agents using Supervisors.
55
+ - **Workflow Engine**: Go beyond simple request-response. Orchestrate multi-step automations that can process data, call APIs, run tasks in parallel, and execute conditional logic.
55
56
  - **Extensible Packages**: Enhance functionality with packages like `@voltagent/voice` for voice interactions.
56
57
  - **Tooling & Integrations**: Equip agents with tools to connect to external APIs, databases, and services, enabling them to perform real-world tasks. **Supports the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) for standardized tool interactions.**
57
58
  - **Data Retrieval & RAG**: Implement specialized retriever agents for efficient information fetching and **Retrieval-Augmented Generation (RAG)**.
@@ -73,6 +74,7 @@ VoltAgent provides a middle ground, offering structure and components without sa
73
74
  - **Build Faster:** Accelerate development with pre-built components compared to starting from scratch.
74
75
  - **Maintainable Code:** Encourages organization for easier updates and debugging.
75
76
  - **Scalability:** Start simple and easily scale to complex, multi-agent systems handling intricate workflows.
77
+ - **Build Sophisticated Automations:** It's not just for chat. The workflow engine lets you build complex, multi-step processes for tasks like data analysis pipelines, automated content generation, or intelligent decision-making systems.
76
78
  - **Flexibility:** Full control over agent behavior, LLM choice, tool integrations, and UI connections.
77
79
  - **Avoid Lock-in:** Freedom to switch AI providers and models as needed.
78
80
  - **Cost Efficiency:** Features designed to optimize AI service usage and reduce redundant calls.
@@ -90,27 +92,31 @@ npm create voltagent-app@latest
90
92
 
91
93
  This command guides you through setup.
92
94
 
93
- You'll see the starter code in `src/index.ts` to get you started with the VoltAgent framework.
95
+ You'll see the starter code in `src/index.ts`, which now registers both an agent and a comprehensive workflow example found in `src/workflows/index.ts`.
94
96
 
95
97
  ```typescript
96
98
  import { VoltAgent, Agent } from "@voltagent/core";
97
- import { VercelAIProvider } from "@voltagent/vercel-ai"; // Example provider
98
- import { openai } from "@ai-sdk/openai"; // Example model
99
+ import { VercelAIProvider } from "@voltagent/vercel-ai";
100
+ import { openai } from "@ai-sdk/openai";
101
+ import { comprehensiveWorkflow } from "./workflows";
99
102
 
100
- // Define a simple agent
103
+ // A simple, general-purpose agent for the project.
101
104
  const agent = new Agent({
102
105
  name: "my-agent",
103
106
  instructions: "A helpful assistant that answers questions without using tools",
104
- // Note: You can swap VercelAIProvider and openai with other supported providers/models
105
107
  llm: new VercelAIProvider(),
106
108
  model: openai("gpt-4o-mini"),
109
+ tools: [],
107
110
  });
108
111
 
109
- // Initialize VoltAgent with your agent(s)
112
+ // Initialize VoltAgent with your agent(s) and workflow(s)
110
113
  new VoltAgent({
111
114
  agents: {
112
115
  agent,
113
116
  },
117
+ workflows: {
118
+ comprehensiveWorkflow,
119
+ },
114
120
  });
115
121
  ```
116
122
 
@@ -140,16 +146,33 @@ Your agent is now running! To interact with it:
140
146
  4. Start Chatting: On the agent detail page, click the chat icon in the bottom right corner to open the chat window.
141
147
  5. Send a Message: Type a message like "Hello" and press Enter.
142
148
 
143
- ![VoltAgent VoltOps Platform Demo](https://github.com/user-attachments/assets/0adbec33-1373-4cf4-b67d-825f7baf1cb4)
149
+ [![VoltAgent VoltOps Platform Demo](https://github.com/user-attachments/assets/0adbec33-1373-4cf4-b67d-825f7baf1cb4)](https://console.voltagent.dev/)
150
+
151
+ ### Running Your First Workflow
152
+
153
+ Your new project also includes a powerful workflow engine. You can test the pre-built `comprehensiveWorkflow` directly from the VoltOps console:
154
+
155
+ ![VoltOps Workflow Observability](https://cdn.voltagent.dev/docs/workflow-observability-demo.gif)
156
+
157
+ 1. **Go to the Workflows Page:** After starting your server, go directly to the [Workflows page](https://console.voltagent.dev/workflows).
158
+ 2. **Select Your Project:** Use the project selector to choose your project (e.g., "my-agent-app").
159
+ 3. **Find and Run:** You will see **"Comprehensive Workflow Example"** listed. Click it, then click the **"Run"** button.
160
+ 4. **Provide Input:** The workflow expects a JSON object with a `text` key. Try it with a negative sentiment to see the conditional logic in action:
161
+ ```json
162
+ { "text": "I am very disappointed with this product, it is terrible." }
163
+ ```
164
+ 5. **View the Results:** After execution, you can inspect the detailed logs for each step and see the final output directly in the console.
144
165
 
145
166
  ## Key Features
146
167
 
147
168
  - **Agent Core:** Define agents with descriptions, LLM providers, tools, and memory management.
169
+ - **Workflow Engine:** Orchestrate complex, multi-step automations with a powerful and declarative API (`andThen`, `andAgent`, `andAll`, `andRace`, `andWhen`).
148
170
  - **Multi-Agent Systems:** Build complex workflows using Supervisor Agents coordinating multiple specialized Sub-Agents.
149
171
  - **Tool Usage & Lifecycle:** Equip agents with custom or pre-built tools (functions) with type-safety (Zod), lifecycle hooks, and cancellation support to interact with external systems.
150
172
  - **Flexible LLM Support:** Integrate seamlessly with various LLM providers (OpenAI, Anthropic, Google, etc.) and easily switch between models.
151
173
  - **Memory Management:** Enable agents to retain context across interactions using different configurable memory providers.
152
174
  - **Observability & Debugging:** Visually monitor agent states, interactions, logs, and performance via the [VoltOps LLM Observability Platform](https://console.voltagent.dev).
175
+ - **Custom API Endpoints:** Extend the VoltAgent API server with your own custom endpoints to build specialized functionality on top of the core framework.
153
176
  - **Voice Interaction:** Build voice-enabled agents capable of speech recognition and synthesis using the `@voltagent/voice` package.
154
177
  - **Data Retrieval & RAG:** Integrate specialized retriever agents for efficient information fetching and **Retrieval-Augmented Generation (RAG)** from various sources.
155
178
  - **Model Context Protocol (MCP) Support:** Connect to external tool servers (HTTP/stdio) adhering to the [MCP standard](https://modelcontextprotocol.io/) for extended capabilities.
@@ -181,7 +204,13 @@ VoltAgent is versatile and can power a wide range of AI-driven applications:
181
204
 
182
205
  We welcome contributions! Please refer to the contribution guidelines (link needed if available). Join our [Discord](https://s.voltagent.dev/discord) server for questions and discussions.
183
206
 
184
- ## Community ♥️ Thanks
207
+ ## Contributor ♥️ Thanks
208
+
209
+ Big thanks to everyone who's been part of the VoltAgent journey, whether you've built a plugin, opened an issue, dropped a pull request, or just helped someone out on Discord or GitHub Discussions.
210
+
211
+ VoltAgent is a community effort, and it keeps getting better because of people like you.
212
+
213
+ ![Contributors](https://contrib.rocks/image?repo=voltagent/voltagent)
185
214
 
186
215
  Your stars help us reach more developers! If you find VoltAgent useful, please consider giving us a star on GitHub to support the project and help others discover it.
187
216