TL;DR: AI agent frameworks are moving into production, with TypeScript, tool calling, memory, structured workflows, and integrations becoming the core primitives for autonomous workflows according to WorkOS. Mastra’s discussion with WorkOS at HumanX 2026 highlights how the governance challenge is no longer just building agents, but deciding how their identities, access, and runtime actions are controlled once they reach production.
NHIMG editorial — based on content published by WorkOS: Abhi Aiyer on building Mastra and the future of AI agent frameworks
By the numbers:
- 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems, inappropriately sharing sensitive data, and revealing access credentials.
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes.
Questions worth separating out
Q: How should security teams govern AI agents built into application frameworks?
A: They should treat the framework layer as part of the identity architecture, not just the app stack.
Q: Why do agent frameworks create new access-risk problems for IAM teams?
A: Because they let runtime decisions, tool calls, and stateful workflows happen inside familiar development stacks, which can hide where authorisation actually occurs.
Q: What breaks when AI agent permissions are inherited from the host application?
A: The boundary between application access and agent access disappears.
Practitioner guidance
- Map agent framework trust boundaries Document where the framework creates, stores, and reuses credentials, tool permissions, and memory state so identity review can happen at the same layer as runtime execution.
- Assign ownership to every production agent path Tie each autonomous workflow to a named system owner, a review cadence, and an offboarding trigger so non-human identity does not persist after the business use case changes.
- Separate remembered context from authorised action Review whether stored memory can influence access to tools or data, and require explicit authorisation points when prior state changes the agent’s decision path.
What's in the full article
WorkOS's full article covers the operational detail this post intentionally leaves for the source:
- The full discussion of how Mastra handles tool calling, memory, and workflow composition in a production TypeScript stack.
- The interview context from HumanX 2026, including how the team thinks about framework adoption and developer feedback loops.
- The deeper explanation of why the ecosystem feels early, including the evolving patterns for multi-agent coordination and evaluation.
- The development perspective on how open-source feedback shapes roadmap decisions for agent tooling.
👉 Read WorkOS's interview on Mastra, AI agent frameworks, and the future of agentic tooling →
AI agent frameworks in TypeScript: what changes for builders?
Explore further
TypeScript agent frameworks are becoming identity infrastructure by accident. When developers build autonomous workflows inside the same language and deployment stack as the application, the framework starts acting like an identity control plane whether teams label it that way or not. That shifts governance from a narrow tooling question to a broader IAM and NHI design problem. Practitioners should treat the framework boundary as part of access architecture, not just code structure.
A few things that frame the scale:
- 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems, inappropriately sharing sensitive data, and revealing access credentials, according to AI Agents: The New Attack Surface report.
- 92% agree governing AI agents is critical to enterprise security, yet only 44% have implemented any policies to do so.
A question worth separating out:
Q: How can teams reduce risk when building autonomous workflows in TypeScript?
A: They should require explicit identity ownership, short-lived credentials, reviewed integrations, and a clear offboarding path for each agent. The goal is to prevent autonomous workflows from accumulating persistent access simply because they are convenient to build and reuse.
👉 Read our full editorial: Mastra and the agent framework race are reshaping AI tooling