Skip to content
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

doc & sample: Update documentation for human-in-the-loop and UserProxyAgent; Add UserProxyAgent to ChainLit sample; #5656

Merged
merged 6 commits into from
Feb 25, 2025

Conversation

ekzhu
Copy link
Collaborator

@ekzhu ekzhu commented Feb 22, 2025

Resolves #5610

And address various questions regarding to how to use user proxy agent and human-in-the-loop.

…yAgent; Add UserProxyAgent to ChainLit sample;
@ekzhu ekzhu requested a review from victordibia February 22, 2025 04:27
Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.66%. Comparing base (a54a85e) to head (26cf899).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5656   +/-   ##
=======================================
  Coverage   75.66%   75.66%           
=======================================
  Files         171      171           
  Lines       10576    10576           
=======================================
  Hits         8002     8002           
  Misses       2574     2574           
Flag Coverage Δ
unittests 75.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@victordibia
Copy link
Collaborator

Minor update to paragra[h.
To use the {py:class}~autogen_agentchat.agents.UserProxyAgent, you can create an instance of it and include it in the team before running the team. The team contains logic on when to call the {py:class}~autogen_agentchat.agents.UserProxyAgent to ask for feedback from the user. For example in a RoundRobinGroupChat team, the {py:class}~autogen_agentchat.agents.UserProxyAgent is called in the order in which it is passed to the team, while in a SelectorGroupChat team, the selector prompt or selector function determines when the {py:class}~autogen_agentchat.agents.UserProxyAgent is called.

@ekzhu ekzhu enabled auto-merge (squash) February 25, 2025 01:36
@ekzhu ekzhu merged commit a14aeab into main Feb 25, 2025
52 checks passed
@ekzhu ekzhu deleted the ekzhu-user-proxy-chainlit branch February 25, 2025 01:41
kadenbking added a commit to kadenbking/autogen that referenced this pull request Feb 25, 2025
* doc: Enrich AssistantAgent API documentation with usage examples. (microsoft#5653)

Resolves microsoft#5562

* remove dep on aspire - add google.protobuf (microsoft#5645)

<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

<!-- Please give a short summary of the change and the problem this
solves. -->

removes unneeded deps

## Related issue number

<!-- For example: "Closes microsoft#1234" -->

Closes microsoft#5644

## Checks

- [ ] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.

* [dotnet] Add mixin for easier state save/load apis (microsoft#5438)

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>

* Replace the undefined tools variable with tool_schema parameter in ToolUseAgent class (microsoft#5684)

Replace the undefined `tools` variable with `tool_schema` parameter

<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?
This change keeps the documentation up to date :
https://microsoft.github.io/autogen/stable//user-guide/core-user-guide/components/tools.html

<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

<!-- For example: "Closes microsoft#1234" -->

## Checks

- [ ] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.

* Improve readme inconsistency (microsoft#5691)

### Before

<img width="823" alt="image"
src="https://github.com/user-attachments/assets/d5ba1671-9433-4fa4-9884-c0de6fafb82e"
/>



### After
<img width="803" alt="image"
src="https://github.com/user-attachments/assets/07fdd32a-d2ad-450d-8b7f-b21f10f14c85"
/>

* pack agenthost as tool (microsoft#5647)

<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->

## Why are these changes needed?

convenience - allows to just run "agenthost"

```
dotnet pack --no-build --configuration Release --output './output/release' -bl\n
dotnet tool install --add-source ./output/release Microsoft.AutoGen.AgentHost
agenthost 
```

<!-- Please give a short summary of the change and the problem this
solves. -->

## Related issue number

<!-- For example: "Closes microsoft#1234" -->

closes microsoft#5646 

## Checks

- [ ] I've included any doc changes needed for
<https://microsoft.github.io/autogen/>. See
<https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to
build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.

* update versions to 0.4.8 (microsoft#5689)

* Update issue templates (microsoft#5686)

* doc & sample: Update documentation for human-in-the-loop and UserProxyAgent; Add UserProxyAgent to ChainLit sample; (microsoft#5656)

Resolves microsoft#5610

And address various questions regarding to how to use user proxy agent
and human-in-the-loop.

* doc: Update SelectorGroupChat doc on how to use O3-mini model. (microsoft#5657)

Resolves microsoft#5408

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>

* Add metadata field to basemessage (microsoft#5372)

Add metadata field to BaseMessage.

Why?
- additional metadata field can track 1) timestamp if needed, 2) flags
about the message. For instance, a use case is a metadata field
{"internal":"yes"} that would hide messages from being displayed in an
application or studio.

As long as an extra field is added to basemessage that is not consumed
by existing agents, I am happy.



Notes:
- We can also only add it to BaseChatMessage, that would be fine
- I don't care what the extra field is called as long as there is an
extra field somewhere
- I don't have preference for the type, a str could work, but a dict
would be more useful.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Change base image to one with arm64 support (microsoft#5681)

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Shubham Shukla <shubhamshkl@gmail.com>
Co-authored-by: gagb <gagb@users.noreply.github.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AgentChat ChainLit sample to add UserProxyAgent example
3 participants