Re:Show HN: Mastra – Open-source TypeScript agent framework
by calcsam on Thursday February 20, 2025 @10:17AM
(#43115706)
You’re right that the syntax was inspired by the desire to avoid nested structures. But the syntax here is interesting as well and fairly readable. Worth thinking about!
[ Parent
| on HN ]
Re:Show HN: Mastra – Open-source TypeScript agent framework
by anentropic on Friday February 21, 2025 @05:46AM
(#43126122)
that example syntax is loosely based on CDK code for AWS Step Functions, since I had to write some recently
essentially you're building a DAG so it could be worth checking some other APIs which do a similar thing for inspiration
e.g. it looks like in Airflow you could write it as:
chain(llm, decider, [agentOne, agentTwo], workflow)
https://airflow.apache.org/docs/apache-airflow/stable/core-c...