mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
|
History
|
||
|---|---|---|
| .. | ||
| src | ||
| type-tests | ||
| .gitignore | ||
| CHANGELOG.md | ||
| lint-staged.config.js | ||
| oxlint.config.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| turbo.json | ||
| vitest.config.js | ||
@mastra/client-js
@mastra/client-js is the typed JavaScript client for a running Mastra server. Use it from browser or server applications to call agents, workflows, tools, memory, and vector APIs without constructing HTTP requests directly.
Installation
npm install @mastra/client-js
Usage
Point the client at a running Mastra server.
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
const agent = client.getAgent('assistant');
const response = await agent.generate('Summarize my open support tickets.');
console.log(response.text);
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.