Remix.run Logo
cjonas 3 days ago

100% same experience. If it were up to me, I'd started with typescript, but the client insisted on using a python stack (landed on FastMCP, FastAPI, PydanticAI).

While, `PydanticAI` does the best it can with a limited type system, it just can't match the productivity of typescript.

And I still can't believe what a mess async python is. The worst thing we've encountered was a bug from mixing anyio with asyncio which resulted in our ECS container getting it's CPU pinned to 100% [1]. And constantly running into issue with libraries not handling task cancellation properly.

I get that python has captured the ML ecosystem, but these agent systems are just API calls and parsing json...

[1](https://github.com/agronholm/anyio/issues/884)

zzzeek 3 days ago | parent | next [-]

async python has problems, but "anyio exists" is not one of them that can be blamed on python, simply dont use weird third party libraries trying to second guess the asyncio architecture

edit: ironically I'm the author of a weird third party library trying to second guess the asyncio architecture but mine is good https://awaitlet.sqlalchemy.org/en/latest/ (but I'll likely be retiring it in the coming year due to lack of interest)

cjonas 3 days ago | parent [-]

I don't recall the exact situation but am I suppose to just know which async library each dependency is using? It reminds of of the early days of promises in JavaScript.

triyambakam 3 days ago | parent | prev [-]

I don't really see how you're comparing Pydantic AI here to Typescript. I'm assuming you meant simply Pydantic.

cjonas 3 days ago | parent [-]

Just comparing an agent framework written in python (with focus on being "typesafe") to one (any) written in typescript

triyambakam 3 days ago | parent [-]

That's a very poor comparison then and not very useful?