Urgent.News

What's breaking now, across hundreds of outlets.

AI

Python 3.15 for AI agent builders: 5 changes worth knowing

Before you start: LangGraph doesn't install on Python 3.15 yet. One of its dependencies (ormsgpack) has no build for 3.15. Keep production agents on 3.13 or 3.14 for now. Python 3.15 won't make your agent faster. An agent spends most of its time waiting for the model, and a faster Python doesn't change that. Five changes do make building agents easier, though: faster startup, faster answers,…

Python 3.15 introduces several enhancements that can simplify the process of building AI agents. Although it won't make agents faster, there are five key improvements worth noting.

Firstly, startup time has been reduced through lazy imports. Pythons 3.15 loads modules only when needed, which can significantly speed up cold starts in serverless environments and CLI tools.

Secondly, TaskGroup.cancel() allows for faster agent responses. When one source answers a query, the rest can be stopped, reducing wait times from several seconds to just 0.8 seconds in testing.

Thirdly, the Tachyon profiler simplifies debugging. When an agent "hangs" in production, this command displays the status of each task, saving time by avoiding the need to restart the process. It's recommended to assign names to tasks for clearer output.

Fourthly, TypedDict(closed=True) enhances state safety. This ensures that agent state, typically a TypedDict, doesn't contain unexpected additional fields, which could end up in checkpoints and logs. However, this only works within the type checker, not at runtime.

Lastly, sentinel and frozendict offer a simpler coding experience. sentinel helps distinguish between "no value given" and None, while frozendict prevents accidental modifications to dictionary keys. Keep in mind that these features are type-checked, not runtime-enforced.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

I Build an Accounts & Budget AI App for Hactoberfest 2026!

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle I built an Accounts & Budget AI App for Hacktoberfest 2026! 💡 What is my project?

  • Developer creates AI-powered Accounts & Budget app for Hacktoberfest 2026
  • App uses Streamlit frontend, Python & Pandas backend, Google Gemma 3 AI
  • Creator shares Hacktoberfest experience and open-source project journey

More from Thursday, 15 October 2026 →