Sam Bhagwat
banner
calcsam.bsky.social
Sam Bhagwat
@calcsam.bsky.social
spice distributor. prev cofounder @gatsbyjs. now building mastra.ai
one more thing

some people think this is how you keep score (?)

it's not why we're building this, but definitely a morale boost

and a reminder for all of us that great things take time
February 24, 2025 at 8:04 PM
made a gametime decision that since we had the spotlight

we may as well cut the beta

x.com/calcsam/sta...
February 24, 2025 at 8:04 PM
ofc folks also found the parts that didn't work quite right

unclear docs, meh apis, weird ui artifacts

our linear project is full of papercuts

so this sprint we're sanding all the rough edges
February 24, 2025 at 8:04 PM
the first thing we saw was lots of excited devs

people loved mastra's agent playground, the workflow api, the dev environment
February 24, 2025 at 8:04 PM
As an example, our workflow graph API has three main methods, .step() for branching, .then() for chaining, and .after() for merging.

Every time we show it to someone building with AI, they immediately nod along. The control flow is apparent and intuitive.
February 14, 2025 at 7:40 PM
Even better, I can do this collaboratively on a screenshare with an engineer, so they can themselves learn the process and begin to develop better taste for APIs
February 14, 2025 at 7:40 PM
And that was incredibly difficult....until LLMs

Now, I can describe the parameters of an API problem to Claude -- on web or in Cursor -- and ask it for help.

It can access all the underlying code. It will propose five or six plausible approaches.
February 14, 2025 at 7:40 PM
One of the main reasons Next.js beat Gatsby was that @kylemathews and I struggled to articulate our taste around APIs in a way that was legible to others, as well as meaningfully review APIs others proposed.
February 14, 2025 at 7:40 PM
Left to their own devices even great engineers tend to ship overly verbose API names, create overly large options dictionaries, and overload methods in unintuitive ways.
February 14, 2025 at 7:40 PM
Class and function names and parameters need to be immediately intuitive

Should a variable be a function parameter or part of an options object?

Can you set configdefaults on a class but override them on a particular invocation?

Do you want descriptive or evocative apis?
February 14, 2025 at 7:40 PM
so @mastra_ai is an open source typescript agent framework

when you’re building a framework, you need to do a lot of API design, specifically the nouns and verbs your users use.
February 14, 2025 at 7:40 PM
please share what you build!
February 5, 2025 at 6:38 AM
if you're comfortable in JS you could try mastra.ai
Mastra.ai
The Typescript AI framework
mastra.ai
February 5, 2025 at 6:37 AM
thanks @libsqlhq @tursodatabase
January 31, 2025 at 12:41 AM
If you're interested in multi-agent orchestration, take a look at the code: github.com/mastra-ai/m...

And the deployed app: mastra-eight.vercel.app/
mastra/examples/travel-app at main · mastra-ai/mastra
The TypeScript AI framework. Contribute to mastra-ai/mastra development by creating an account on GitHub.
github.com
January 29, 2025 at 1:53 AM
It passes the data into another agent that validates it and formats it for the user, again using a Zod schema:
January 29, 2025 at 1:53 AM
In order to get the agent to perform well, we needed to write rather exhaustive instructions:
January 29, 2025 at 1:53 AM
Tools take in defined input schemas using Zod and can call external APIs while maintaining strict typing.
January 29, 2025 at 1:53 AM
The first agent has detailed instructions and access to a set of tools. It generates a set of possibilities using tools provided and ranks them according to the user's preferences.

It can call the tools in whatever order it needs.
January 29, 2025 at 1:53 AM