Web based UI's (javascript baked in) are the only cross platform GUI all the major tech players endorse. Companies like Apple are hostile to alternative GUI frameworks, except web browser. Flash? that threatens the walled gardens so the big tech cartel came together to squash it out. Java graphics? we will not ship a JVM becuase "security". The web was already ubiquitous so the big tech couldn't squash it without squashing their own foot.
Typescript let's you start with a cross platform GUI right out of the gate. Text based HTML GUI is screen reader friendly, battle hardened for many years to get accessibility right.
Type system is advanced and allows for that sweet IDE experience.
And.... the Javascript ecosystem is the only game in town that gets close to the Lisp immediate feedback experience. (no Javascript is not as good as a lisp image, but it's better than nothing). Change a function, see the result instantly in the browser while you're app is still running. I'm not 100% sure this is true for Typescript as it must compile to javascript first, but compiling the TypeScript for 1 modified file with an on-save-hook could still be a pretty quick feedback loop.
Do these reasons have anything to do with AI agents? no but it would explain why people are already using Typescirpt, and thus use it for AI agents.
I'm not surprised, I don't think it has anything to do with AI, it's the same in blockchain and prob in all other fields.
I think ppl underestimate the cost of context switch between languages, even if you're really proficient in more than one.
If you're a team with 1-2 eng and have to build a frontend, you are forced to use js/ts. Now, if you can keep everything in a monorepo in the same language, you're simply moving faster. And I'm sure people will criticize and bring counter examples... but statistically 60-70% of the teams will just be faster working this way.
My first startup was frontend php, backend python, 2 eng; soon we specialized one working on frontend, the other on backend, it's tedious to context switch. My last startup was typescript for everything, again 2 eng, same code base, same coding style, both iterating on all code. (And daily I work in rust & C, I'm definitely not a frontend eng nor a js/ts enthusiast, I'm just reflecting on efficiency.)
The agent layer is a kind of client and since typescript thanks to node and the browser has become a universal language for client sides, whether the client is used by a human or used agent to agent.
> - Also, as Sam points out, full-stack devs can ship quickly using TS for both backend and frontend.
Typescript (which is still "Javascript") is extremely immature for a "backend" language.
I can't take anyone seriously if they believe or use such a pseudo-typed language like typescript and especially a weakly typed language with dynamic types on a costly runtime such as Javascript on the backend.
Both of them should stay far away from anything backend.
Yeah I'd use something different for sure. If bang per buck is needed. Since an API call to AI can cost like 1c or more maybe it doesn't matter if you waste 100ms of cpu time.
This is why TS is winning. Agent frameworks largely replace backend logic, and they have their own quirks with runtime costs. Most agent use cases look like chron job scripting or chatbots right now, and I expect we'll see far more use cases with proactive scripts. All of these avoid traditional bottleneck of runtime because the AI is the bottleneck.
There is value in fast iteration and delivery. These are early stage startups, the clock is ticking. I wouldn’t do it with JS but I understand why it would be used.
Now we can argue how good or bad the nodejs (or any alternative JS implementation) is. At the end of the day the objective is most likely to rock the boat enough to be acquired and have a payday. With enough discipline you can get far before the footguns show up.
Web based UI's (javascript baked in) are the only cross platform GUI all the major tech players endorse. Companies like Apple are hostile to alternative GUI frameworks, except web browser. Flash? that threatens the walled gardens so the big tech cartel came together to squash it out. Java graphics? we will not ship a JVM becuase "security". The web was already ubiquitous so the big tech couldn't squash it without squashing their own foot.
Typescript let's you start with a cross platform GUI right out of the gate. Text based HTML GUI is screen reader friendly, battle hardened for many years to get accessibility right.
Type system is advanced and allows for that sweet IDE experience.
And.... the Javascript ecosystem is the only game in town that gets close to the Lisp immediate feedback experience. (no Javascript is not as good as a lisp image, but it's better than nothing). Change a function, see the result instantly in the browser while you're app is still running. I'm not 100% sure this is true for Typescript as it must compile to javascript first, but compiling the TypeScript for 1 modified file with an on-save-hook could still be a pretty quick feedback loop.
Do these reasons have anything to do with AI agents? no but it would explain why people are already using Typescirpt, and thus use it for AI agents.
I'm not surprised, I don't think it has anything to do with AI, it's the same in blockchain and prob in all other fields.
I think ppl underestimate the cost of context switch between languages, even if you're really proficient in more than one.
If you're a team with 1-2 eng and have to build a frontend, you are forced to use js/ts. Now, if you can keep everything in a monorepo in the same language, you're simply moving faster. And I'm sure people will criticize and bring counter examples... but statistically 60-70% of the teams will just be faster working this way.
My first startup was frontend php, backend python, 2 eng; soon we specialized one working on frontend, the other on backend, it's tedious to context switch. My last startup was typescript for everything, again 2 eng, same code base, same coding style, both iterating on all code. (And daily I work in rust & C, I'm definitely not a frontend eng nor a js/ts enthusiast, I'm just reflecting on efficiency.)
Is there a recommended typescript library for building AI agents?
The agent layer is a kind of client and since typescript thanks to node and the browser has become a universal language for client sides, whether the client is used by a human or used agent to agent.
Makes sense - for front-end there's really no alternative. For back-end node.js is more than fast enough for pretty much any startup.
This is interesting, TBH the Ease of using FE & BE in Typescript is the reason I think. I'm also using TS for that.
much more easier to built UI
Ig this is one of the reasons!
> - Also, as Sam points out, full-stack devs can ship quickly using TS for both backend and frontend.
Typescript (which is still "Javascript") is extremely immature for a "backend" language.
I can't take anyone seriously if they believe or use such a pseudo-typed language like typescript and especially a weakly typed language with dynamic types on a costly runtime such as Javascript on the backend.
Both of them should stay far away from anything backend.
Yeah I'd use something different for sure. If bang per buck is needed. Since an API call to AI can cost like 1c or more maybe it doesn't matter if you waste 100ms of cpu time.
This is why TS is winning. Agent frameworks largely replace backend logic, and they have their own quirks with runtime costs. Most agent use cases look like chron job scripting or chatbots right now, and I expect we'll see far more use cases with proactive scripts. All of these avoid traditional bottleneck of runtime because the AI is the bottleneck.
There is value in fast iteration and delivery. These are early stage startups, the clock is ticking. I wouldn’t do it with JS but I understand why it would be used.
Now we can argue how good or bad the nodejs (or any alternative JS implementation) is. At the end of the day the objective is most likely to rock the boat enough to be acquired and have a payday. With enough discipline you can get far before the footguns show up.
It depends. There is no right or wrong.