@mastra/mcp-docs-server 0.0.1-alpha.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.
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fcomposio.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Ffirecrawl.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fgithub.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +11 -0
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Frag.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fragie.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-azure.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-deepgram.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-elevenlabs.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-google.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-ibm.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-murf.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-openai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-playai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-replicate.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fspeech-speechify.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fstabilityai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +59 -0
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +24 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +302 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +12 -0
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +302 -0
- package/.docs/organized/changelogs/create-mastra.md +302 -0
- package/.docs/organized/changelogs/mastra.md +302 -0
- package/.docs/organized/code-examples/agent.md +385 -0
- package/.docs/organized/code-examples/ai-sdk-useChat.md +377 -0
- package/.docs/organized/code-examples/assistant-ui.md +37 -0
- package/.docs/organized/code-examples/bird-checker-with-express.md +235 -0
- package/.docs/organized/code-examples/bird-checker-with-nextjs-and-eval.md +360 -0
- package/.docs/organized/code-examples/bird-checker-with-nextjs.md +250 -0
- package/.docs/organized/code-examples/crypto-chatbot.md +96 -0
- package/.docs/organized/code-examples/fireworks-r1.md +159 -0
- package/.docs/organized/code-examples/integrations.md +184 -0
- package/.docs/organized/code-examples/mcp-configuration.md +341 -0
- package/.docs/organized/code-examples/memory-todo-agent.md +161 -0
- package/.docs/organized/code-examples/memory-with-context.md +167 -0
- package/.docs/organized/code-examples/memory-with-libsql.md +204 -0
- package/.docs/organized/code-examples/memory-with-pg.md +224 -0
- package/.docs/organized/code-examples/memory-with-upstash.md +268 -0
- package/.docs/organized/code-examples/quick-start.md +127 -0
- package/.docs/organized/code-examples/stock-price-tool.md +124 -0
- package/.docs/organized/code-examples/weather-agent.md +352 -0
- package/.docs/organized/code-examples/workflow-ai-recruiter.md +159 -0
- package/.docs/organized/code-examples/workflow-with-inline-steps.md +111 -0
- package/.docs/organized/code-examples/workflow-with-memory.md +393 -0
- package/.docs/organized/code-examples/workflow-with-separate-steps.md +131 -0
- package/.docs/raw/agents/00-overview.mdx +185 -0
- package/.docs/raw/agents/01-agent-memory.mdx +610 -0
- package/.docs/raw/agents/02-adding-tools.mdx +224 -0
- package/.docs/raw/agents/03-adding-voice.mdx +170 -0
- package/.docs/raw/deployment/deployment.mdx +156 -0
- package/.docs/raw/deployment/logging-and-tracing.mdx +242 -0
- package/.docs/raw/deployment/server.mdx +114 -0
- package/.docs/raw/evals/00-overview.mdx +106 -0
- package/.docs/raw/evals/01-supported-evals.mdx +31 -0
- package/.docs/raw/evals/02-custom-eval.mdx +187 -0
- package/.docs/raw/faq/index.mdx +63 -0
- package/.docs/raw/frameworks/01-next-js.mdx +238 -0
- package/.docs/raw/frameworks/02-ai-sdk.mdx +218 -0
- package/.docs/raw/getting-started/installation.mdx +436 -0
- package/.docs/raw/getting-started/project-structure.mdx +80 -0
- package/.docs/raw/guides/01-chef-michel.mdx +242 -0
- package/.docs/raw/guides/02-stock-agent.mdx +182 -0
- package/.docs/raw/guides/03-recruiter.mdx +187 -0
- package/.docs/raw/index.mdx +22 -0
- package/.docs/raw/local-dev/creating-projects.mdx +74 -0
- package/.docs/raw/local-dev/integrations.mdx +127 -0
- package/.docs/raw/local-dev/mastra-dev.mdx +65 -0
- package/.docs/raw/rag/chunking-and-embedding.mdx +128 -0
- package/.docs/raw/rag/overview.mdx +85 -0
- package/.docs/raw/rag/retrieval.mdx +362 -0
- package/.docs/raw/rag/vector-databases.mdx +271 -0
- package/.docs/raw/reference/agents/createTool.mdx +190 -0
- package/.docs/raw/reference/agents/generate.mdx +327 -0
- package/.docs/raw/reference/agents/getAgent.mdx +54 -0
- package/.docs/raw/reference/agents/stream.mdx +361 -0
- package/.docs/raw/reference/cli/build.mdx +48 -0
- package/.docs/raw/reference/cli/deploy.mdx +22 -0
- package/.docs/raw/reference/cli/dev.mdx +97 -0
- package/.docs/raw/reference/cli/init.mdx +43 -0
- package/.docs/raw/reference/client-js/agents.mdx +90 -0
- package/.docs/raw/reference/client-js/error-handling.mdx +38 -0
- package/.docs/raw/reference/client-js/index.mdx +127 -0
- package/.docs/raw/reference/client-js/logs.mdx +24 -0
- package/.docs/raw/reference/client-js/memory.mdx +94 -0
- package/.docs/raw/reference/client-js/telemetry.mdx +20 -0
- package/.docs/raw/reference/client-js/tools.mdx +44 -0
- package/.docs/raw/reference/client-js/vectors.mdx +79 -0
- package/.docs/raw/reference/client-js/workflows.mdx +137 -0
- package/.docs/raw/reference/core/mastra-class.mdx +232 -0
- package/.docs/raw/reference/deployer/cloudflare.mdx +176 -0
- package/.docs/raw/reference/deployer/deployer.mdx +159 -0
- package/.docs/raw/reference/deployer/netlify.mdx +88 -0
- package/.docs/raw/reference/deployer/vercel.mdx +97 -0
- package/.docs/raw/reference/evals/answer-relevancy.mdx +186 -0
- package/.docs/raw/reference/evals/bias.mdx +186 -0
- package/.docs/raw/reference/evals/completeness.mdx +174 -0
- package/.docs/raw/reference/evals/content-similarity.mdx +183 -0
- package/.docs/raw/reference/evals/context-position.mdx +190 -0
- package/.docs/raw/reference/evals/context-precision.mdx +189 -0
- package/.docs/raw/reference/evals/context-relevancy.mdx +188 -0
- package/.docs/raw/reference/evals/contextual-recall.mdx +191 -0
- package/.docs/raw/reference/evals/faithfulness.mdx +193 -0
- package/.docs/raw/reference/evals/hallucination.mdx +219 -0
- package/.docs/raw/reference/evals/keyword-coverage.mdx +176 -0
- package/.docs/raw/reference/evals/prompt-alignment.mdx +238 -0
- package/.docs/raw/reference/evals/summarization.mdx +205 -0
- package/.docs/raw/reference/evals/textual-difference.mdx +161 -0
- package/.docs/raw/reference/evals/tone-consistency.mdx +181 -0
- package/.docs/raw/reference/evals/toxicity.mdx +165 -0
- package/.docs/raw/reference/index.mdx +8 -0
- package/.docs/raw/reference/memory/Memory.mdx +186 -0
- package/.docs/raw/reference/memory/createThread.mdx +93 -0
- package/.docs/raw/reference/memory/getThreadById.mdx +43 -0
- package/.docs/raw/reference/memory/getThreadsByResourceId.mdx +45 -0
- package/.docs/raw/reference/memory/query.mdx +164 -0
- package/.docs/raw/reference/observability/create-logger.mdx +106 -0
- package/.docs/raw/reference/observability/logger.mdx +55 -0
- package/.docs/raw/reference/observability/otel-config.mdx +120 -0
- package/.docs/raw/reference/observability/providers/braintrust.mdx +40 -0
- package/.docs/raw/reference/observability/providers/index.mdx +15 -0
- package/.docs/raw/reference/observability/providers/laminar.mdx +41 -0
- package/.docs/raw/reference/observability/providers/langfuse.mdx +51 -0
- package/.docs/raw/reference/observability/providers/langsmith.mdx +46 -0
- package/.docs/raw/reference/observability/providers/langwatch.mdx +45 -0
- package/.docs/raw/reference/observability/providers/new-relic.mdx +40 -0
- package/.docs/raw/reference/observability/providers/signoz.mdx +40 -0
- package/.docs/raw/reference/observability/providers/traceloop.mdx +40 -0
- package/.docs/raw/reference/rag/astra.mdx +258 -0
- package/.docs/raw/reference/rag/chroma.mdx +281 -0
- package/.docs/raw/reference/rag/chunk.mdx +237 -0
- package/.docs/raw/reference/rag/document.mdx +129 -0
- package/.docs/raw/reference/rag/embeddings.mdx +160 -0
- package/.docs/raw/reference/rag/extract-params.mdx +72 -0
- package/.docs/raw/reference/rag/graph-rag.mdx +182 -0
- package/.docs/raw/reference/rag/libsql.mdx +357 -0
- package/.docs/raw/reference/rag/metadata-filters.mdx +298 -0
- package/.docs/raw/reference/rag/pg.mdx +477 -0
- package/.docs/raw/reference/rag/pinecone.mdx +249 -0
- package/.docs/raw/reference/rag/qdrant.mdx +236 -0
- package/.docs/raw/reference/rag/rerank.mdx +212 -0
- package/.docs/raw/reference/rag/turbopuffer.mdx +249 -0
- package/.docs/raw/reference/rag/upstash.mdx +198 -0
- package/.docs/raw/reference/rag/vectorize.mdx +253 -0
- package/.docs/raw/reference/storage/libsql.mdx +74 -0
- package/.docs/raw/reference/storage/postgresql.mdx +48 -0
- package/.docs/raw/reference/storage/upstash.mdx +86 -0
- package/.docs/raw/reference/tools/client.mdx +180 -0
- package/.docs/raw/reference/tools/document-chunker-tool.mdx +141 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +154 -0
- package/.docs/raw/reference/tools/mcp-configuration.mdx +206 -0
- package/.docs/raw/reference/tools/vector-query-tool.mdx +212 -0
- package/.docs/raw/reference/voice/composite-voice.mdx +140 -0
- package/.docs/raw/reference/voice/deepgram.mdx +164 -0
- package/.docs/raw/reference/voice/elevenlabs.mdx +216 -0
- package/.docs/raw/reference/voice/google.mdx +198 -0
- package/.docs/raw/reference/voice/mastra-voice.mdx +394 -0
- package/.docs/raw/reference/voice/murf.mdx +251 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +431 -0
- package/.docs/raw/reference/voice/openai.mdx +168 -0
- package/.docs/raw/reference/voice/playai.mdx +159 -0
- package/.docs/raw/reference/voice/speechify.mdx +145 -0
- package/.docs/raw/reference/workflows/after.mdx +88 -0
- package/.docs/raw/reference/workflows/commit.mdx +37 -0
- package/.docs/raw/reference/workflows/createRun.mdx +77 -0
- package/.docs/raw/reference/workflows/else.mdx +72 -0
- package/.docs/raw/reference/workflows/execute.mdx +110 -0
- package/.docs/raw/reference/workflows/if.mdx +107 -0
- package/.docs/raw/reference/workflows/resume.mdx +155 -0
- package/.docs/raw/reference/workflows/start.mdx +84 -0
- package/.docs/raw/reference/workflows/step-class.mdx +100 -0
- package/.docs/raw/reference/workflows/step-condition.mdx +134 -0
- package/.docs/raw/reference/workflows/step-function.mdx +92 -0
- package/.docs/raw/reference/workflows/step-options.mdx +69 -0
- package/.docs/raw/reference/workflows/suspend.mdx +80 -0
- package/.docs/raw/reference/workflows/then.mdx +74 -0
- package/.docs/raw/reference/workflows/until.mdx +165 -0
- package/.docs/raw/reference/workflows/watch.mdx +118 -0
- package/.docs/raw/reference/workflows/while.mdx +168 -0
- package/.docs/raw/reference/workflows/workflow.mdx +233 -0
- package/.docs/raw/workflows/00-overview.mdx +168 -0
- package/.docs/raw/workflows/control-flow.mdx +712 -0
- package/.docs/raw/workflows/dynamic-workflows.mdx +232 -0
- package/.docs/raw/workflows/steps.mdx +98 -0
- package/.docs/raw/workflows/suspend-and-resume.mdx +196 -0
- package/.docs/raw/workflows/variables.mdx +248 -0
- package/LICENSE +44 -0
- package/README.md +129 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/prepare-docs/code-examples.d.ts +4 -0
- package/dist/prepare-docs/code-examples.js +91 -0
- package/dist/prepare-docs/copy-raw.d.ts +1 -0
- package/dist/prepare-docs/copy-raw.js +41 -0
- package/dist/prepare-docs/index.d.ts +1 -0
- package/dist/prepare-docs/index.js +8 -0
- package/dist/prepare-docs/package-changes.d.ts +4 -0
- package/dist/prepare-docs/package-changes.js +92 -0
- package/dist/prepare-docs/prepare.d.ts +1 -0
- package/dist/prepare-docs/prepare.js +13 -0
- package/dist/sse.d.ts +1 -0
- package/dist/sse.js +9 -0
- package/dist/stdio.d.ts +1 -0
- package/dist/stdio.js +8 -0
- package/dist/tools/__tests__/blog.test.d.ts +1 -0
- package/dist/tools/__tests__/blog.test.js +48 -0
- package/dist/tools/__tests__/changes.test.d.ts +1 -0
- package/dist/tools/__tests__/changes.test.js +36 -0
- package/dist/tools/__tests__/docs.test.d.ts +1 -0
- package/dist/tools/__tests__/docs.test.js +46 -0
- package/dist/tools/__tests__/examples.test.d.ts +1 -0
- package/dist/tools/__tests__/examples.test.js +52 -0
- package/dist/tools/blog.d.ts +15 -0
- package/dist/tools/blog.js +73 -0
- package/dist/tools/changes.d.ts +11 -0
- package/dist/tools/changes.js +69 -0
- package/dist/tools/docs.d.ts +11 -0
- package/dist/tools/docs.js +176 -0
- package/dist/tools/examples.d.ts +11 -0
- package/dist/tools/examples.js +61 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +9 -0
- package/package.json +66 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
### package.json
|
|
2
|
+
```json
|
|
3
|
+
{
|
|
4
|
+
"name": "examples-stock-price-tool",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "mastra dev",
|
|
10
|
+
"test": "cross-env NODE_OPTIONS='--experimental-vm-modules --max-old-space-size=8192' jest"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"description": "",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@ai-sdk/openai": "latest",
|
|
18
|
+
"@mastra/core": "workspace:*",
|
|
19
|
+
"zod": "^3.24.2"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@jest/globals": "^29.7.0",
|
|
23
|
+
"jest": "^29.7.0",
|
|
24
|
+
"mastra": "workspace:*",
|
|
25
|
+
"ts-jest": "^29.2.6"
|
|
26
|
+
},
|
|
27
|
+
"version": "0.0.1"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### index.ts
|
|
33
|
+
```typescript
|
|
34
|
+
import { mastra } from './mastra';
|
|
35
|
+
|
|
36
|
+
async function main() {
|
|
37
|
+
const stockAgent = mastra.getAgent('stockAgent');
|
|
38
|
+
const response = await stockAgent.generate('What is the current stock price of Apple (AAPL)?');
|
|
39
|
+
|
|
40
|
+
const toolCall: any = response.toolResults.find((result: any) => result.toolName === 'stockPrices');
|
|
41
|
+
|
|
42
|
+
const currentPrice = toolCall?.result?.currentPrice;
|
|
43
|
+
|
|
44
|
+
console.log(`The current price of Apple (AAPL) is $${currentPrice}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
main();
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### mastra/agents/index.ts
|
|
52
|
+
```typescript
|
|
53
|
+
import { openai } from '@ai-sdk/openai';
|
|
54
|
+
import { Agent } from '@mastra/core/agent';
|
|
55
|
+
|
|
56
|
+
import { stockPrices } from '../tools/stock-price';
|
|
57
|
+
|
|
58
|
+
export const stockAgent = new Agent({
|
|
59
|
+
name: 'Stock Agent',
|
|
60
|
+
instructions:
|
|
61
|
+
'You are a helpful assistant that provides current stock prices. When asked about a stock, use the stock price tool to fetch the stock price.',
|
|
62
|
+
model: openai('gpt-4o'),
|
|
63
|
+
tools: {
|
|
64
|
+
stockPrices,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### mastra/index.ts
|
|
71
|
+
```typescript
|
|
72
|
+
import { Mastra } from '@mastra/core';
|
|
73
|
+
|
|
74
|
+
import { stockAgent } from './agents';
|
|
75
|
+
|
|
76
|
+
export const mastra = new Mastra({
|
|
77
|
+
agents: { stockAgent },
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### mastra/tools/stock-price.ts
|
|
83
|
+
```typescript
|
|
84
|
+
import { createTool } from '@mastra/core/tools';
|
|
85
|
+
import { z } from 'zod';
|
|
86
|
+
|
|
87
|
+
export const getStockPrice = async (symbol: string) => {
|
|
88
|
+
const data = await fetch(`https://mastra-stock-data.vercel.app/api/stock-data?symbol=${symbol}`).then(r => r.json());
|
|
89
|
+
return data.prices['4. close'];
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const stockPrices = createTool({
|
|
93
|
+
id: 'Get Stock Price',
|
|
94
|
+
inputSchema: z.object({
|
|
95
|
+
symbol: z.string(),
|
|
96
|
+
}),
|
|
97
|
+
description: `Fetches the last day's closing stock price for a given symbol`,
|
|
98
|
+
execute: async ({ context }) => {
|
|
99
|
+
console.log('Using tool to fetch stock price for', context.symbol);
|
|
100
|
+
return {
|
|
101
|
+
symbol: context.symbol,
|
|
102
|
+
currentPrice: await getStockPrice(context.symbol),
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### mastra/tools/tools.test.ts
|
|
110
|
+
```typescript
|
|
111
|
+
import { describe, it, expect } from 'vitest';
|
|
112
|
+
|
|
113
|
+
import { getStockPrice } from './stock-price';
|
|
114
|
+
|
|
115
|
+
describe('Test Tools', () => {
|
|
116
|
+
it('should run the stockPrices', async () => {
|
|
117
|
+
const result = await getStockPrice('AAPL');
|
|
118
|
+
|
|
119
|
+
console.log(result);
|
|
120
|
+
expect(result).toBeDefined();
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
```
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
### package.json
|
|
2
|
+
```json
|
|
3
|
+
{
|
|
4
|
+
"name": "examples-weather-agent",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"description": "",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "npx tsx src/mastra/index.ts"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@ai-sdk/openai": "latest",
|
|
17
|
+
"@mastra/core": "workspace:^",
|
|
18
|
+
"zod": "^3.24.2"
|
|
19
|
+
},
|
|
20
|
+
"version": "0.0.1"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### mastra/agents/index.ts
|
|
26
|
+
```typescript
|
|
27
|
+
import { openai } from '@ai-sdk/openai';
|
|
28
|
+
import { Agent } from '@mastra/core/agent';
|
|
29
|
+
|
|
30
|
+
import { weatherTool } from '../tools';
|
|
31
|
+
|
|
32
|
+
export const weatherAgent = new Agent({
|
|
33
|
+
name: 'Weather Agent',
|
|
34
|
+
instructions: `You are a helpful weather assistant that provides accurate weather information.
|
|
35
|
+
|
|
36
|
+
Your primary function is to help users get weather details for specific locations. When responding:
|
|
37
|
+
- Always ask for a location if none is provided
|
|
38
|
+
- If giving a location with multiple parts (e.g. "New York, NY"), use the most relevant part (e.g. "New York")
|
|
39
|
+
- Include relevant details like humidity, wind conditions, and precipitation
|
|
40
|
+
- Keep responses concise but informative
|
|
41
|
+
|
|
42
|
+
Use the weatherTool to fetch current weather data.`,
|
|
43
|
+
model: openai('gpt-4o'),
|
|
44
|
+
tools: { weatherTool },
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### mastra/index.ts
|
|
50
|
+
```typescript
|
|
51
|
+
import { Mastra } from '@mastra/core';
|
|
52
|
+
|
|
53
|
+
import { weatherAgent } from './agents';
|
|
54
|
+
import { weatherWorkflow } from './workflows';
|
|
55
|
+
|
|
56
|
+
const mastra = new Mastra({
|
|
57
|
+
agents: { weatherAgent },
|
|
58
|
+
workflows: { weatherWorkflow },
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
async function agentExample() {
|
|
62
|
+
const agent = await mastra.getAgent('weatherAgent');
|
|
63
|
+
const result = await agent.generate('What is the weather in London?');
|
|
64
|
+
console.log(result.text);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function workflowExample() {
|
|
68
|
+
const { start } = mastra.getWorkflow('weatherWorkflow').createRun();
|
|
69
|
+
|
|
70
|
+
const result = await start({
|
|
71
|
+
triggerData: {
|
|
72
|
+
city: 'London',
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
console.log('\n \n');
|
|
77
|
+
console.log(result);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// agentExample();
|
|
81
|
+
workflowExample();
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### mastra/tools/index.ts
|
|
86
|
+
```typescript
|
|
87
|
+
import { createTool } from '@mastra/core/tools';
|
|
88
|
+
import { z } from 'zod';
|
|
89
|
+
|
|
90
|
+
interface WeatherResponse {
|
|
91
|
+
current: {
|
|
92
|
+
time: string;
|
|
93
|
+
temperature_2m: number;
|
|
94
|
+
apparent_temperature: number;
|
|
95
|
+
relative_humidity_2m: number;
|
|
96
|
+
wind_speed_10m: number;
|
|
97
|
+
wind_gusts_10m: number;
|
|
98
|
+
weather_code: number;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const weatherTool = createTool({
|
|
103
|
+
id: 'get-weather',
|
|
104
|
+
description: 'Get current weather for a location',
|
|
105
|
+
inputSchema: z.object({
|
|
106
|
+
location: z.string().describe('City name'),
|
|
107
|
+
}),
|
|
108
|
+
outputSchema: z.object({
|
|
109
|
+
temperature: z.number(),
|
|
110
|
+
feelsLike: z.number(),
|
|
111
|
+
humidity: z.number(),
|
|
112
|
+
windSpeed: z.number(),
|
|
113
|
+
windGust: z.number(),
|
|
114
|
+
conditions: z.string(),
|
|
115
|
+
location: z.string(),
|
|
116
|
+
}),
|
|
117
|
+
execute: async ({ context }) => {
|
|
118
|
+
return await getWeather(context.location);
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const getWeather = async (location: string) => {
|
|
123
|
+
const geocodingUrl = `https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(location)}&count=1`;
|
|
124
|
+
const geocodingResponse = await fetch(geocodingUrl);
|
|
125
|
+
const geocodingData = await geocodingResponse.json();
|
|
126
|
+
|
|
127
|
+
if (!geocodingData.results?.[0]) {
|
|
128
|
+
throw new Error(`Location '${location}' not found`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const { latitude, longitude, name } = geocodingData.results[0];
|
|
132
|
+
|
|
133
|
+
const weatherUrl = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}¤t=temperature_2m,apparent_temperature,relative_humidity_2m,wind_speed_10m,wind_gusts_10m,weather_code`;
|
|
134
|
+
|
|
135
|
+
const response = await fetch(weatherUrl);
|
|
136
|
+
const data: WeatherResponse = await response.json();
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
temperature: data.current.temperature_2m,
|
|
140
|
+
feelsLike: data.current.apparent_temperature,
|
|
141
|
+
humidity: data.current.relative_humidity_2m,
|
|
142
|
+
windSpeed: data.current.wind_speed_10m,
|
|
143
|
+
windGust: data.current.wind_gusts_10m,
|
|
144
|
+
conditions: getWeatherCondition(data.current.weather_code),
|
|
145
|
+
location: name,
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
function getWeatherCondition(code: number): string {
|
|
150
|
+
const conditions: Record<number, string> = {
|
|
151
|
+
0: 'Clear sky',
|
|
152
|
+
1: 'Mainly clear',
|
|
153
|
+
2: 'Partly cloudy',
|
|
154
|
+
3: 'Overcast',
|
|
155
|
+
45: 'Foggy',
|
|
156
|
+
48: 'Depositing rime fog',
|
|
157
|
+
51: 'Light drizzle',
|
|
158
|
+
53: 'Moderate drizzle',
|
|
159
|
+
55: 'Dense drizzle',
|
|
160
|
+
56: 'Light freezing drizzle',
|
|
161
|
+
57: 'Dense freezing drizzle',
|
|
162
|
+
61: 'Slight rain',
|
|
163
|
+
63: 'Moderate rain',
|
|
164
|
+
65: 'Heavy rain',
|
|
165
|
+
66: 'Light freezing rain',
|
|
166
|
+
67: 'Heavy freezing rain',
|
|
167
|
+
71: 'Slight snow fall',
|
|
168
|
+
73: 'Moderate snow fall',
|
|
169
|
+
75: 'Heavy snow fall',
|
|
170
|
+
77: 'Snow grains',
|
|
171
|
+
80: 'Slight rain showers',
|
|
172
|
+
81: 'Moderate rain showers',
|
|
173
|
+
82: 'Violent rain showers',
|
|
174
|
+
85: 'Slight snow showers',
|
|
175
|
+
86: 'Heavy snow showers',
|
|
176
|
+
95: 'Thunderstorm',
|
|
177
|
+
96: 'Thunderstorm with slight hail',
|
|
178
|
+
99: 'Thunderstorm with heavy hail',
|
|
179
|
+
};
|
|
180
|
+
return conditions[code] || 'Unknown';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### mastra/workflows/index.ts
|
|
186
|
+
```typescript
|
|
187
|
+
import { openai } from '@ai-sdk/openai';
|
|
188
|
+
import { Agent } from '@mastra/core/agent';
|
|
189
|
+
import { Step, Workflow } from '@mastra/core/workflows';
|
|
190
|
+
import { z } from 'zod';
|
|
191
|
+
|
|
192
|
+
const agent = new Agent({
|
|
193
|
+
name: 'Weather Agent',
|
|
194
|
+
instructions: `
|
|
195
|
+
You are a local activities and travel expert who excels at weather-based planning. Analyze the weather data and provide practical activity recommendations.
|
|
196
|
+
For each day in the forecast, structure your response exactly as follows:
|
|
197
|
+
📅 [Day, Month Date, Year]
|
|
198
|
+
═══════════════════════════
|
|
199
|
+
🌡️ WEATHER SUMMARY
|
|
200
|
+
• Conditions: [brief description]
|
|
201
|
+
• Temperature: [X°C/Y°F to A°C/B°F]
|
|
202
|
+
• Precipitation: [X% chance]
|
|
203
|
+
🌅 MORNING ACTIVITIES
|
|
204
|
+
Outdoor:
|
|
205
|
+
• [Activity Name] - [Brief description including specific location/route]
|
|
206
|
+
Best timing: [specific time range]
|
|
207
|
+
Note: [relevant weather consideration]
|
|
208
|
+
🌞 AFTERNOON ACTIVITIES
|
|
209
|
+
Outdoor:
|
|
210
|
+
• [Activity Name] - [Brief description including specific location/route]
|
|
211
|
+
Best timing: [specific time range]
|
|
212
|
+
Note: [relevant weather consideration]
|
|
213
|
+
🏠 INDOOR ALTERNATIVES
|
|
214
|
+
• [Activity Name] - [Brief description including specific venue]
|
|
215
|
+
Ideal for: [weather condition that would trigger this alternative]
|
|
216
|
+
⚠️ SPECIAL CONSIDERATIONS
|
|
217
|
+
• [Any relevant weather warnings, UV index, wind conditions, etc.]
|
|
218
|
+
Guidelines:
|
|
219
|
+
- Suggest 2-3 time-specific outdoor activities per day
|
|
220
|
+
- Include 1-2 indoor backup options
|
|
221
|
+
- For precipitation >50%, lead with indoor activities
|
|
222
|
+
- All activities must be specific to the location
|
|
223
|
+
- Include specific venues, trails, or locations
|
|
224
|
+
- Consider activity intensity based on temperature
|
|
225
|
+
- Keep descriptions concise but informative
|
|
226
|
+
Maintain this exact formatting for consistency, using the emoji and section headers as shown.
|
|
227
|
+
`,
|
|
228
|
+
model: openai('gpt-4o'),
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
const fetchWeather = new Step({
|
|
232
|
+
id: 'fetch-weather',
|
|
233
|
+
description: 'Fetches weather forecast for a given city',
|
|
234
|
+
inputSchema: z.object({
|
|
235
|
+
city: z.string().describe('The city to get the weather for'),
|
|
236
|
+
}),
|
|
237
|
+
execute: async ({ context }) => {
|
|
238
|
+
const triggerData = context?.getStepResult<{ city: string }>('trigger');
|
|
239
|
+
|
|
240
|
+
if (!triggerData) {
|
|
241
|
+
throw new Error('Trigger data not found');
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const geocodingUrl = `https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(triggerData.city)}&count=1`;
|
|
245
|
+
const geocodingResponse = await fetch(geocodingUrl);
|
|
246
|
+
const geocodingData = await geocodingResponse.json();
|
|
247
|
+
|
|
248
|
+
if (!geocodingData.results?.[0]) {
|
|
249
|
+
throw new Error(`Location '${triggerData.city}' not found`);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const { latitude, longitude, name } = geocodingData.results[0];
|
|
253
|
+
|
|
254
|
+
const weatherUrl = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&daily=temperature_2m_max,temperature_2m_min,precipitation_probability_mean,weathercode&timezone=auto`;
|
|
255
|
+
const response = await fetch(weatherUrl);
|
|
256
|
+
const data = await response.json();
|
|
257
|
+
|
|
258
|
+
const forecast = data.daily.time.map((date: string, index: number) => ({
|
|
259
|
+
date,
|
|
260
|
+
maxTemp: data.daily.temperature_2m_max[index],
|
|
261
|
+
minTemp: data.daily.temperature_2m_min[index],
|
|
262
|
+
precipitationChance: data.daily.precipitation_probability_mean[index],
|
|
263
|
+
condition: getWeatherCondition(data.daily.weathercode[index]),
|
|
264
|
+
location: name,
|
|
265
|
+
}));
|
|
266
|
+
|
|
267
|
+
return forecast;
|
|
268
|
+
},
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
const forecastSchema = z.array(
|
|
272
|
+
z.object({
|
|
273
|
+
date: z.string(),
|
|
274
|
+
maxTemp: z.number(),
|
|
275
|
+
minTemp: z.number(),
|
|
276
|
+
precipitationChance: z.number(),
|
|
277
|
+
condition: z.string(),
|
|
278
|
+
location: z.string(),
|
|
279
|
+
}),
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
const planActivities = new Step({
|
|
283
|
+
id: 'plan-activities',
|
|
284
|
+
description: 'Suggests activities based on weather conditions',
|
|
285
|
+
inputSchema: forecastSchema,
|
|
286
|
+
execute: async ({ context, mastra }) => {
|
|
287
|
+
const forecast = context?.getStepResult<z.infer<typeof forecastSchema>>('fetch-weather');
|
|
288
|
+
|
|
289
|
+
if (!forecast) {
|
|
290
|
+
throw new Error('Forecast data not found');
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const prompt = `Based on the following weather forecast for ${forecast[0].location}, suggest appropriate activities:
|
|
294
|
+
${JSON.stringify(forecast, null, 2)}
|
|
295
|
+
`;
|
|
296
|
+
|
|
297
|
+
const response = await agent.stream([
|
|
298
|
+
{
|
|
299
|
+
role: 'user',
|
|
300
|
+
content: prompt,
|
|
301
|
+
},
|
|
302
|
+
]);
|
|
303
|
+
|
|
304
|
+
let activitiesText = '';
|
|
305
|
+
|
|
306
|
+
for await (const chunk of response.textStream) {
|
|
307
|
+
process.stdout.write(chunk);
|
|
308
|
+
activitiesText += chunk;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return {
|
|
312
|
+
activities: activitiesText,
|
|
313
|
+
};
|
|
314
|
+
},
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
function getWeatherCondition(code: number): string {
|
|
318
|
+
const conditions: Record<number, string> = {
|
|
319
|
+
0: 'Clear sky',
|
|
320
|
+
1: 'Mainly clear',
|
|
321
|
+
2: 'Partly cloudy',
|
|
322
|
+
3: 'Overcast',
|
|
323
|
+
45: 'Foggy',
|
|
324
|
+
48: 'Depositing rime fog',
|
|
325
|
+
51: 'Light drizzle',
|
|
326
|
+
53: 'Moderate drizzle',
|
|
327
|
+
55: 'Dense drizzle',
|
|
328
|
+
61: 'Slight rain',
|
|
329
|
+
63: 'Moderate rain',
|
|
330
|
+
65: 'Heavy rain',
|
|
331
|
+
71: 'Slight snow fall',
|
|
332
|
+
73: 'Moderate snow fall',
|
|
333
|
+
75: 'Heavy snow fall',
|
|
334
|
+
95: 'Thunderstorm',
|
|
335
|
+
};
|
|
336
|
+
return conditions[code] || 'Unknown';
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const weatherWorkflow = new Workflow({
|
|
340
|
+
name: 'weather-workflow',
|
|
341
|
+
triggerSchema: z.object({
|
|
342
|
+
city: z.string().describe('The city to get the weather for'),
|
|
343
|
+
}),
|
|
344
|
+
})
|
|
345
|
+
.step(fetchWeather)
|
|
346
|
+
.then(planActivities);
|
|
347
|
+
|
|
348
|
+
weatherWorkflow.commit();
|
|
349
|
+
|
|
350
|
+
export { weatherWorkflow };
|
|
351
|
+
|
|
352
|
+
```
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
### package.json
|
|
2
|
+
```json
|
|
3
|
+
{
|
|
4
|
+
"name": "examples-workflow-ai-recruiter",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": true,
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
+
"dev": "mastra dev",
|
|
11
|
+
"start:dev": "npx bun src/mastra/index.ts"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"description": "",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^22.13.10",
|
|
19
|
+
"mastra": "workspace:^",
|
|
20
|
+
"tsx": "^4.19.3",
|
|
21
|
+
"typescript": "^5.8.2",
|
|
22
|
+
"zod": "^3.24.2"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@ai-sdk/openai": "latest",
|
|
26
|
+
"@mastra/core": "workspace:^",
|
|
27
|
+
"ai": "latest"
|
|
28
|
+
},
|
|
29
|
+
"version": "0.0.1-alpha.2"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### mastra/index.ts
|
|
35
|
+
```typescript
|
|
36
|
+
import { openai } from '@ai-sdk/openai';
|
|
37
|
+
import { Mastra } from '@mastra/core';
|
|
38
|
+
import { Agent } from '@mastra/core/agent';
|
|
39
|
+
import { Step, Workflow } from '@mastra/core/workflows';
|
|
40
|
+
import { z } from 'zod';
|
|
41
|
+
|
|
42
|
+
const recruiter = new Agent({
|
|
43
|
+
name: 'Recruiter Agent',
|
|
44
|
+
instructions: `You are a recruiter.`,
|
|
45
|
+
model: openai('gpt-4o-mini'),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const gatherCandidateInfo = new Step({
|
|
49
|
+
id: 'gatherCandidateInfo',
|
|
50
|
+
inputSchema: z.object({
|
|
51
|
+
resumeText: z.string(),
|
|
52
|
+
}),
|
|
53
|
+
outputSchema: z.object({
|
|
54
|
+
candidateName: z.string(),
|
|
55
|
+
isTechnical: z.boolean(),
|
|
56
|
+
specialty: z.string(),
|
|
57
|
+
resumeText: z.string(),
|
|
58
|
+
}),
|
|
59
|
+
execute: async ({ context, mastra }) => {
|
|
60
|
+
const resumeText = context?.getStepResult<{ resumeText: string }>('trigger')?.resumeText;
|
|
61
|
+
|
|
62
|
+
const prompt = `
|
|
63
|
+
You are given this resume text:
|
|
64
|
+
"${resumeText}"
|
|
65
|
+
`;
|
|
66
|
+
const res = await recruiter.generate(prompt, {
|
|
67
|
+
output: z.object({
|
|
68
|
+
candidateName: z.string(),
|
|
69
|
+
isTechnical: z.boolean(),
|
|
70
|
+
specialty: z.string(),
|
|
71
|
+
resumeText: z.string(),
|
|
72
|
+
}),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return res.object;
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
interface CandidateInfo {
|
|
80
|
+
candidateName: string;
|
|
81
|
+
isTechnical: boolean;
|
|
82
|
+
specialty: string;
|
|
83
|
+
resumeText: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const askAboutSpecialty = new Step({
|
|
87
|
+
id: 'askAboutSpecialty',
|
|
88
|
+
outputSchema: z.object({
|
|
89
|
+
question: z.string(),
|
|
90
|
+
}),
|
|
91
|
+
execute: async ({ context, mastra }) => {
|
|
92
|
+
const candidateInfo = context?.getStepResult<CandidateInfo>('gatherCandidateInfo');
|
|
93
|
+
|
|
94
|
+
const prompt = `
|
|
95
|
+
You are a recruiter. Given the resume below, craft a short question
|
|
96
|
+
for ${candidateInfo?.candidateName} about how they got into "${candidateInfo?.specialty}".
|
|
97
|
+
Resume: ${candidateInfo?.resumeText}
|
|
98
|
+
`;
|
|
99
|
+
const res = await recruiter.generate(prompt);
|
|
100
|
+
return { question: res?.text?.trim() || '' };
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const askAboutRole = new Step({
|
|
105
|
+
id: 'askAboutRole',
|
|
106
|
+
outputSchema: z.object({
|
|
107
|
+
question: z.string(),
|
|
108
|
+
}),
|
|
109
|
+
execute: async ({ context, mastra }) => {
|
|
110
|
+
const candidateInfo = context?.getStepResult<CandidateInfo>('gatherCandidateInfo');
|
|
111
|
+
|
|
112
|
+
const prompt = `
|
|
113
|
+
You are a recruiter. Given the resume below, craft a short question
|
|
114
|
+
for ${candidateInfo?.candidateName} asking what interests them most about this role.
|
|
115
|
+
Resume: ${candidateInfo?.resumeText}
|
|
116
|
+
`;
|
|
117
|
+
const res = await recruiter.generate(prompt);
|
|
118
|
+
return { question: res?.text?.trim() || '' };
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const candidateWorkflow = new Workflow({
|
|
123
|
+
name: 'candidate-workflow',
|
|
124
|
+
triggerSchema: z.object({
|
|
125
|
+
resumeText: z.string(),
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
candidateWorkflow
|
|
130
|
+
.step(gatherCandidateInfo)
|
|
131
|
+
.then(askAboutSpecialty, {
|
|
132
|
+
when: { 'gatherCandidateInfo.isTechnical': true },
|
|
133
|
+
})
|
|
134
|
+
.after(gatherCandidateInfo)
|
|
135
|
+
.step(askAboutRole, {
|
|
136
|
+
when: { 'gatherCandidateInfo.isTechnical': false },
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
candidateWorkflow.commit();
|
|
140
|
+
|
|
141
|
+
const mastra = new Mastra({
|
|
142
|
+
workflows: {
|
|
143
|
+
candidateWorkflow,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
(async () => {
|
|
148
|
+
const { runId, start } = mastra.getWorkflow('candidateWorkflow').createRun();
|
|
149
|
+
|
|
150
|
+
console.log('Run', runId);
|
|
151
|
+
|
|
152
|
+
const runResult = await start({
|
|
153
|
+
triggerData: { resumeText: 'Simulated resume content...' },
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
console.log('Final output:', runResult.results);
|
|
157
|
+
})();
|
|
158
|
+
|
|
159
|
+
```
|