-
-
Notifications
You must be signed in to change notification settings - Fork 322
Added, renamed and consolidated methods of BaseAgent #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added, renamed and consolidated methods of BaseAgent #107
Conversation
I don't know why Black Check is giving an error. It ran OK locally. |
I noticed the CI/CD workflow is failing on the black formatting check with the following error:
This appears to be an issue with the CI environment rather than the code itself. The workflow is trying to use black before it's properly installed in the recreated virtualenv. The tests pass locally, and running To fix this in the CI workflow, I'd suggest updating it to:
Something like this might help:
Let me know if there's anything else I need to address on my end for this PR. Thanks! |
@koichikawamura Heya, I'm aiming to merge the branch over the weekend Been thinking about it as well, I don't think we can provide backward compatibility here Semantic Versioning dictates that any breaking change must trigger a major version increase - no matter how small Since I am finishing up on MCP support over the weekend as well, I suppose calling it Atomic Agents 2.0 would not be too bad, at least that way we don't break anything that anyone might be running in production Since it is a "major release", though, I'll prepare a release branch later for this so that we can properly test and find any bugs or issues I'll have a look at the Black thing, thanks for your suggestion! Anyways, all that being said, I had an idea for a slight improvement to this implementation, @koichikawamura (sorry for it not being in the original issue, I only just thought of it) but I think it would be better if we would have a method For code cleanliness, we could still have 4 private functions EDIT: I fixed the issue with Black on the main branch and merged it onto this PR, thanks again! |
Hi @KennyVaneetvelde , Actually, I've been thinking about an idea for some time. It may sound a little bold but now is a good timing to talk about it if you are thinking about a major version up. BTW, I imagine. that many people are migrating to Python3.12 because it is the standard version in Ubuntu 24.04LTS. |
@koichikawamura Yeah I'd be curious to see what that would look like! What did you think about my suggestion to make streaming a parameter of Another thing I wanted to look at for a V2.0 was proper modules, currently imports are a bit awkward and long some times, directly reflecting the internal folder structure - this was handy during initial development but it makes usage a bit awkward and I noticed in some cases vscode does not enjoy it either & has trouble with auto-imports I don't have much time today but I'll make an issue for it so we can keep track and I'll make a v2.0 label or something |
I made the following PR to demonstrate the problem which arises from batch/streaming switch parameter: A method which returns It doesn't cause any problem for synchronous processing. In fact, As the bottom line, I would stick to the four-method (run, run_stream, run_async, run_async_stream) implementation. |
Decided to make MCP into a v1.1.0 release since there were no breaking changes, but I went ahead and made a v2.0 milestone, this PR looks good so I'll also merge it into the v2.0 branch |
Hi @KennyVaneetvelde,
In accordance to the discussion at #100, I reformed
BaseAgent
class and now it has the following 4 agent running methods in this PR:(I recreated PR with my private account since I no longer use @tf-koichi account.)
run
synchronous batch run
run_stream
synchronous streaming run
run_async
asynchronous batch run
run_async_stream
asynchronous streaming run
I sought a way to incorporate a transition mechanism to
run_async
for backward compatibility, but couldn't figure out a good one.Also I made changes to type hints so that they make use of
TypeVar
.Koichi