@mastra/parallel 0.1.1-alpha.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +14 -39
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,63 +1,38 @@
1
1
  # @mastra/parallel
2
2
 
3
- Parallel web search and content extraction tools for [Mastra](https://mastra.ai) agents.
4
-
3
+ Add Parallel Search and Extract tools to Mastra agents with typed Zod inputs and outputs, configurable processors, and structured web research results.
5
4
  ## Installation
6
5
 
7
6
  ```bash
8
- npm install @mastra/parallel parallel-web zod
7
+ npm install @mastra/parallel
9
8
  ```
10
9
 
11
- ## Quick start
10
+ ## Usage
11
+
12
12
 
13
- Use `createParallelTools()` to create Search and Extract tools with shared client configuration:
13
+ Set `PARALLEL_API_KEY` before creating the tools.
14
14
 
15
15
  ```typescript
16
16
  import { Agent } from '@mastra/core/agent';
17
17
  import { createParallelTools } from '@mastra/parallel';
18
18
 
19
- const agent = new Agent({
19
+ export const researchAgent = new Agent({
20
20
  id: 'research-agent',
21
21
  name: 'Research Agent',
22
- model: 'anthropic/claude-sonnet-4-6',
23
- instructions: 'Search the web for current sources, then extract relevant content from the best pages.',
22
+ model: 'openai/gpt-5.6-sol',
23
+ instructions: 'Search the web, then extract relevant content from the best sources.',
24
24
  tools: createParallelTools(),
25
25
  });
26
26
  ```
27
27
 
28
- The tools read `PARALLEL_API_KEY` from the environment when you don't pass a key explicitly.
29
-
30
- ## Individual tools
31
-
32
- Create either tool independently when an agent doesn't need both:
33
-
34
- ```typescript
35
- import { createParallelExtractTool, createParallelSearchTool } from '@mastra/parallel';
36
-
37
- const search = createParallelSearchTool({ apiKey: 'parallel-api-key' });
38
- const extract = createParallelExtractTool();
39
- ```
40
-
41
- ### Search
42
-
43
- `createParallelSearchTool()` creates the `parallel-search` tool. It accepts one or more keyword queries and optional objective, mode, model, result, domain, location, freshness, character, and session controls. Results include ranked URLs and focused excerpts.
44
-
45
- ### Extract
46
-
47
- `createParallelExtractTool()` creates the `parallel-extract` tool. It accepts 1-20 URLs and optional objective, query, model, excerpt, full-content, freshness, character, and session controls. The result separates successful pages from per-URL errors.
28
+ ## Documentation
48
29
 
49
- ## Configuration
30
+ - [Parallel](https://mastra.ai/integrations/tools/parallel)
50
31
 
51
- All factories accept `ParallelClientOptions`, an alias of the official `ClientOptions` type from `parallel-web`. This includes `apiKey`, `baseURL`, `timeout`, `fetch`, `maxRetries`, request headers, and logging options. The API key defaults to `PARALLEL_API_KEY`.
32
+ ## Changelog
52
33
 
53
- The package also exports `getParallelClient()` when an application needs the configured official client directly:
54
-
55
- ```typescript
56
- import { getParallelClient } from '@mastra/parallel';
57
-
58
- const client = getParallelClient({ apiKey: 'parallel-api-key' });
59
- ```
34
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/integrations/parallel/CHANGELOG.md) for version history and release notes.
60
35
 
61
- ## License
36
+ ## Support
62
37
 
63
- Apache-2.0
38
+ We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/parallel",
3
- "version": "0.1.1-alpha.0",
3
+ "version": "0.1.1",
4
4
  "description": "Parallel web search and extract tools for Mastra agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -54,9 +54,9 @@
54
54
  "typescript": "^7.0.2",
55
55
  "vitest": "4.1.10",
56
56
  "zod": "^4.4.3",
57
- "@internal/lint": "0.0.129",
58
- "@internal/types-builder": "0.0.104",
59
- "@mastra/core": "1.64.0-alpha.2"
57
+ "@internal/lint": "0.0.130",
58
+ "@internal/types-builder": "0.0.105",
59
+ "@mastra/core": "1.64.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build:lib": "tsdown --silent --config tsdown.config.ts",