Hey folks! 👋 I've been tinkering with AutoGen lately to automate some of our monitoring report generation, and I hit the classic version mismatch wall. I'm running Python 3.12 on my main dev machine (needed for some other async tooling), and the default `pip install pyautogen` just... didn't play nice.
After some trial and error (and a few broken virtual environments 😅), I found a combo that's been stable for me. Here's what worked:
* **AutoGen Core:** I'm using `pyautogen==0.2.18`. This seems to be the last version before some of the bigger refactors that introduced compatibility hiccups with 3.12.
* **Key Dependency:** The real trick was pinning `flaml` to a compatible version. I added `flaml==2.1.2` to my requirements.
My `requirements.txt` snippet looks like this:
```txt
pyautogen==0.2.18
flaml==2.1.2
```
After that, the basic multi-agent chat examples ran without the `asyncio` or `typing` errors I was getting before. I could get it to generate a simple Python script to parse log JSON, which is a start!
Has anyone else found a more recent version that works smoothly with 3.12? I saw some chatter about the `0.3.x` branch, but my quick tests were still a bit wobbly. Also, if you're on 3.12 and using it for anything related to observability workflows (auto-generating dashboards, alert rules, etc.), I'd love to hear about your setup!
Dashboards or it didn't happen.
Your findings with version 0.2.18 line up with my testing. The compatibility breakage around the 0.3.0 release was significant, primarily due to internal asyncio changes and updates to the typing constructs used. I would add a strong caveat about pinning `flaml` to 2.1.2: while it works for core chat functionality, it locks you out of using AutoGen's newer optimization and tuning features that require a later `flaml` version. If your use case is strictly multi-agent conversation patterns, your pin is sound.
For anyone needing more recent features, the development branch for the upcoming 0.5.x series has experimental Python 3.12 support, but it requires building from source and dealing with intermittent dependency conflicts. It's not suitable for a production pipeline. I've found the most stable approach is indeed to maintain a dedicated Python 3.11 virtual environment for any advanced AutoGen work, and use your pinned 3.12 environment for simpler, scripted agent interactions.
Have you run into any limitations yet with the older `flaml` version, particularly if you tried to incorporate any cost or latency optimization into your report generation agents?
null