Commit Graph

46 Commits

Author SHA1 Message Date
Victor Dibia 32d2a18bf1
[Draft] Enable File Upload/Paste as Task in AGS (#6091)
<!-- 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?



https://github.com/user-attachments/assets/e160f16d-f42d-49e2-a6c6-687e4e6786f4



Enable file upload/paste as a task in AGS. Enables tasks like

- Can you research and fact check the ideas in this screenshot?
- Summarize this file

Only text and images supported for now
Underneath, it constructs TextMessage and Multimodal messages as the
task.

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

## Related issue number

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

Closes #5773 

## 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.

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2025-04-09 02:44:45 +00:00
Michael Scovetta a024790c5b
Fix sha256_hash docstring (#6236)
Fixes the sha256_hash docstring to refer to SHA-256 and not MD5.

## Why are these changes needed?

The docstring refers to (presumably) a previous implementation that was
using MD5.

## Related issue number

N/A

## Checks

- [X] 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.
- [N/A] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [N/A] I've made sure all auto checks have passed.
2025-04-07 15:34:32 -04:00
湛露先生 0a314c17c7
fix autostudio dabase jsons. (#6183)
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-04-04 15:00:56 -07:00
EeS f9268204ad
[BUGFIX] Add LLMCallEventMessage to resolve instantiation error in AgentStudio (#6204)
This PR defines the missing `LLMCallEventMessage` class to resolve an
instantiation error that occurs when using custom messages (e.g., via
AgentStudio).

> **Discord Report**  
> சravanaன் — 오후 6:40  
> _“i updated agentchat and agentcore and tried running the config from
agentstudio and it is now not running the agent and is throwing error
`TypeError: Can't instantiate abstract class LLMCallEventMessage with
abstract methods to_model_message, to_model_text, to_text`”_

The issue stems from `LLMCallEventMessage` being an abstract class that
lacks required methods from `BaseChatMessage`.
This PR implements the missing methods.

Since `LLMCallEventMessage` is intended for **logging/UI use only**, and
not to be sent to LLMs, the `to_model_message()` method raises
`NotImplementedError` by design.


## Related issue number

Reported in Discord 
Closes #6206
2025-04-04 10:24:55 -07:00
Eric Zhu 7615c7b83b
Rename to use BaseChatMessage and BaseAgentEvent. Bring back union types. (#6144)
Rename the `ChatMessage` and `AgentEvent` base classes to `BaseChatMessage` and `BaseAgentEvent`. 

Bring back the `ChatMessage` and `AgentEvent` as union of built-in concrete types to avoid breaking existing applications that depends on Pydantic serialization. 

Why?

Many existing code uses containers like this:

```python
class AppMessage(BaseModel):
   name: str
   message: ChatMessage 

# Serialization is this:
m = AppMessage(...)
m.model_dump_json()

# Fields like HandoffMessage.target will be lost because it is now treated as a base class without content or target fields.
```

The assumption on `ChatMessage` or `AgentEvent` to be a union of concrete types could be in many existing code bases. So this PR brings back the union types, while keep method type hints such as those on `on_messages` to use the `BaseChatMessage` and `BaseAgentEvent` base classes for flexibility.
2025-03-30 09:34:40 -07:00
湛露先生 97ccc582fc
Fix some code for clean autogenstudio (#5981)
<!-- 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. -->

## Related issue number

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

## Checks

- [x] 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.
- [x] I've made sure all auto checks have passed.

Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-03-21 14:35:56 -07:00
Victor Dibia 8f8ee0478a
AGS - Test Model Component in UI, Compare Sessions (#5963)
<!-- 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?

- Adds ability to test model clients in UI after configrations, before
they are used in agents or teams
- Adds UI side by side comparison of sessions
<img width="1878" alt="image"
src="https://github.com/user-attachments/assets/f792d8d6-3f5d-4d8c-a365-5a9e9c00f49e"
/>
<img width="1877" alt="image"
src="https://github.com/user-attachments/assets/5a115a5a-95e1-4956-a733-5f0065711fe3"
/>


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

## Related issue number

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

Closes #4273 
Closes #5728

## 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.
2025-03-17 11:00:46 -07:00
Victor Dibia fe1feb3906
Enable Auth in AGS (#5928)
<!-- 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?


https://github.com/user-attachments/assets/b649053b-c377-40c7-aa51-ee64af766fc2

<img width="100%" alt="image"
src="https://github.com/user-attachments/assets/03ba1df5-c9a2-4734-b6a2-0eb97ec0b0e0"
/>


## Authentication

This PR implements an experimental authentication feature to enable
personalized experiences (multiple users). Currently, only GitHub
authentication is supported. You can extend the base authentication
class to add support for other authentication methods.

By default authenticatio is disabled and only enabled when you pass in
the `--auth-config` argument when running the application.

### Enable GitHub Authentication

To enable GitHub authentication, create a `auth.yaml` file in your app
directory:

```yaml
type: github
jwt_secret: "your-secret-key"
token_expiry_minutes: 60
github:
  client_id: "your-github-client-id"
  client_secret: "your-github-client-secret"
  callback_url: "http://localhost:8081/api/auth/callback"
  scopes: ["user:email"]
```

Please see the documentation on [GitHub
OAuth](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app)
for more details on obtaining the `client_id` and `client_secret`.

To pass in this configuration you can use the `--auth-config` argument
when running the application:

```bash
autogenstudio ui --auth-config /path/to/auth.yaml
```

Or set the environment variable:

```bash
export AUTOGENSTUDIO_AUTH_CONFIG="/path/to/auth.yaml"
```

```{note}
- Authentication is currently experimental and may change in future releases
- User data is stored in your configured database
- When enabled, all API endpoints require authentication except for the authentication endpoints
- WebSocket connections require the token to be passed as a query parameter (`?token=your-jwt-token`)

```

## Related issue number

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

## 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.

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-03-14 15:02:05 -07:00
Victor Dibia 2cc8c73d3b
Fix termination UI in AGS (#5888)
<!-- 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?

Fix termination UI in AGS, ensure it can be edited correctly

<img width="1269" alt="image"
src="https://github.com/user-attachments/assets/eaa7a92f-a1ea-4ab4-a679-2894ac441311"
/>
<img width="1273" alt="image"
src="https://github.com/user-attachments/assets/6db81068-932f-4d4e-9512-279770c02bf2"
/>
<img width="1270" alt="image"
src="https://github.com/user-attachments/assets/5ca9df7d-b968-46c9-9d62-becd78809273"
/>


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

## Related issue number

<!-- For example: "Closes #1234" -->
Closes #5872
## 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.
2025-03-11 11:46:25 -07:00
Victor Dibia 648f734c75
Fix component.label error in AGS frontend (#5845)
Fix issue here in this discussion -
https://github.com/microsoft/autogen/discussions/4208#discussioncomment-12394408

<!-- 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?

Fix bug in AGS UI where frontend crashes because the default team config
is null

- update /teams endpoint to always return a default team if none is
found for the user
- update UI to check for team before rendering 
- also update run_id type to be autoincrement int (similar to team id)
instead of uuid. This helps side step the migration failed errors
related to UUID type when using an sqlite backend

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

## Related issue number

<!-- For example: "Closes #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.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2025-03-06 10:52:42 -08:00
Victor Dibia 679a9357f8
Fix AGS Cascading Delete Issue (#5804)
<!-- 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?

> Hey Victor, this is maybe a bug, but when a session is delete, runs
and messages for that session are not deleted, any reason why to keep
them?

@husseinmozannar 

The main fix is to add a pragma that ensures SQL lite enforces foreign
key constraints.
Also needed to update error messages for autoupgrade of databases. Also
adds a test for cascade deletes and for parts of teammanager

With this fix,

- Messages get deleted when the run is deleted 
- Runs get deleted when sessiosn are deleted 
- Sessions get deleted when a team is deleted 

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

## Related issue number

<!-- For example: "Closes #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.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.
2025-03-03 21:46:57 +00:00
Peter Jausovec 7bbf8e075d
fix incorrect field name from config to component (#5761)
<!-- 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?

The Team DB class doesn't have the "config" field anymore. It has
"component"

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

## Related issue number

<!-- For example: "Closes #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.
- [ ] I've added tests (if relevant) corresponding to the changes
introduced in this PR.
- [ ] I've made sure all auto checks have passed.

Co-authored-by: Victor Dibia <victordibia@microsoft.com>
2025-02-28 19:23:59 -08:00
Victor Dibia 6625f89c28
Add support for default model client, in AGS updates to settings UI (#5763)
<!-- 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?

Add support for default model client, in AGS updates to settings UI. 
A default model client will be used for subsequent background tasks
(e.g, automatically naming sessions to meaningful names).

<img width="1441" alt="image"
src="https://github.com/user-attachments/assets/31675ef4-8f80-4a8c-9762-3d6bcbc6d33d"
/>


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

## Related issue number

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

Closes #5685

## 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.
2025-02-28 16:37:51 -08:00
Victor Dibia 05fc763b8a
add anthropic native support (#5695)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

Claude 3.7 just came out. Its a pretty capable model and it would be
great to support it in Autogen.
This will could augment the already excellent support we have for
Anthropic via the SKAdapters in the following ways

- Based on the ChatCompletion API similar to the ollama and openai
client
- Configurable/serializable (can be dumped) .. this means it can be used
easily in AGS.

## What is Supported 

(video below shows the client being used in autogen studio)

https://github.com/user-attachments/assets/8fb7c17c-9f9c-4525-aa9c-f256aad0f40b



- streaming 
- tool callign / function calling 
- drop in integration with assistant agent. 
- multimodal support

```python

from dotenv import load_dotenv
import os 

load_dotenv()

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.ui import Console
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.models.anthropic import AnthropicChatCompletionClient 
model_client =   AnthropicChatCompletionClient(
        model="claude-3-7-sonnet-20250219" 
    )

async def get_weather(city: str) -> str:
    """Get the weather for a given city."""
    return f"The weather in {city} is 73 degrees and Sunny."

 
agent = AssistantAgent(
    name="weather_agent",
    model_client=model_client,
    tools=[get_weather],
    system_message="You are a helpful assistant.", 
    # model_client_stream=True,   
)

# Run the agent and stream the messages to the console.
async def main() -> None:
    await Console(agent.run_stream(task="What is the weather in New York?"))
await main()
```

result 

```
messages = [
    UserMessage(content="Write a very short story about a dragon.", source="user"),
]

# Create a stream.
stream = model_client.create_stream(messages=messages)

# Iterate over the stream and print the responses.
print("Streamed responses:")
async for response in stream:  # type: ignore
    if isinstance(response, str):
        # A partial response is a string.
        print(response, flush=True, end="")
    else:
        # The last response is a CreateResult object with the complete message.
        print("\n\n------------\n")
        print("The complete response:", flush=True)
        print(response.content, flush=True)
        print("\n\n------------\n")
        print("The token usage was:", flush=True)
        print(response.usage, flush=True)
```

 

<!-- 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. -->

## Related issue number

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

Closes #5205 
Closes #5708

## 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. 



cc @rohanthacker
2025-02-26 07:27:41 +00:00
Victor Dibia fbe94dd7ed
Add Token Streaming in AGS , Support Env variables (#5659)
<!-- Thank you for your contribution! Please review
https://microsoft.github.io/autogen/docs/Contribute before opening a
pull request. -->

This PR has 3 main improvements. 

- Token streaming 
- Adds support for environment variables in the app settings 
- Updates AGS to persist Gallery entry in db.

## Adds Token Streaming in AGS.  

Agentchat now supports streaming of tokens via
`ModelClientStreamingChunkEvent `. This PR is to track progress on
supporting that in the AutoGen Studio UI.

If `model_client_stream` is enabled in an assitant agent, then token
will be streamed in UI.

```python
streaming_assistant = AssistantAgent(
    name="assistant",
    model_client=model_client,
    system_message="You are a helpful assistant.",
    model_client_stream=True,  # Enable streaming tokens.
)

```

https://github.com/user-attachments/assets/74d43d78-6359-40c3-a78e-c84dcb5e02a1


## Env Variables 
Also adds support for env variables in AGS Settings

You can set env variables that are loaded just before a team is run.
Handy to set variable to be used by tools etc.

<img width="1291" alt="image"
src="https://github.com/user-attachments/assets/437b9d90-ccee-42f7-be5d-94ab191afd67"
/>


> Note: the set variables are available to the server process.

<!-- 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. -->

## Related issue number

<!-- For example: "Closes #1234" -->
Closes #5627  
Closes #5662 
Closes #5619 

## 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.
2025-02-25 15:21:08 +00:00
Victor Dibia 2f43005624
Improve Gallery Editor UX in AGS (#5613)
<!-- 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? 

Fixes the problem where Gallery items could only be modified via JSON 

This PR does the following

- Refactor TeamBuilder to have modular component editor UI primarily
focused on editing each component type.
- Refactor the Gallery UX 
   - improve layout to use tabs for each component type 
- enable editing of each component item by reusing the component editor
- Enable switching between form editing and UI editing for coponent
editor view

This way, gallery items can be readily modified and then reused in the
component library in team builder.
It also implements an upate to the Gallery data structure to make it
more intuitive - it has a components field that has teams, agents,
models ...

<img width="1598" alt="image"
src="https://github.com/user-attachments/assets/3c3a228a-0bd2-4fc1-85ec-c9685c80bf72"
/>
<img width="1614" alt="image"
src="https://github.com/user-attachments/assets/5b6ed840-9c48-47bc-8c17-2aa50c7dcb99"
/>


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

## Related issue number

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

Closes #5465 
Closes #5047
 
cc @nour-bouzid @balakreshnan @EItanya @joslat @IustinT @leonG7
## 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.
2025-02-20 21:51:05 -08:00
Victor Dibia f49f159a43
Support Component Validation API in AGS (#5503)
<!-- 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?

It is useful to rapidly validate any changes to a team structure as
teams are built either via drag and drop or by modifying the underlying
spec

You can now “validate” your team. The key ideas are as follows
- Each team is based on some Component Config specification which is a
pedantic model underneath.
- Validation is 3 pronged based on a ValidatorService class 
    - Data model validation (validate component schema)
    - Instantiation validation (validate component can be instantiated)
- Provider validation, component_type validation (validate that provider
exists and can be imported)
- UX: each time a component is **loaded or saved**, it is automatically
validated and any errors shown (via a server endpoint). This way, the
developer immediately knows if updates to the configuration is wrong or
has errors.

> Note: this is different from actually running the component against a
task. Currently you can run the entire team. In a separate PR we will
implement ability to run/test other components.

<img width="1360" alt="image"
src="https://github.com/user-attachments/assets/d61095b7-0b07-463a-b4b2-5c50ded750f6"
/>

<img width="1368" alt="image"
src="https://github.com/user-attachments/assets/09a1677e-76e8-44a4-9749-15c27457efbb"
/>

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

## Related issue number

Closes #4616 

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

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-02-12 17:29:43 +00:00
Victor Dibia 340a8e8587
Add notes on api key and modifying specifications in AGS (#5466)
<!-- 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. -->

Add clear notes on how to specify api key and modifying specifications
in AGS.
Add diagrams explaining how to switch between visual builder and JSON
mode

## Why are these changes needed?

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


![teambuilder](https://github.com/user-attachments/assets/9eede334-7f60-4c87-bec6-cf41839ba231)


## Related issue number

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

@nour-bouzid 

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-02-09 14:46:07 -08:00
Victor Dibia 7fc7f383f0
Enable LLM Call Observability in AGS (#5457)
<!-- 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. -->

It is often helpful to inspect the raw request and response to/from an
LLM as agents act.
This PR, does the following:

- Updates TeamManager to yield LLMCallEvents from core library
- Run in an async background task to listen for LLMCallEvent JIT style
when a team is run
   - Add events to   an async queue and 
- yield those events in addition to whatever actual agentchat
team.run_stream yields.
- Update the AGS UI to show those LLMCallEvents in the messages section
as a team runs
   - Add settings panel to show/hide llm call events in messages. 
- Minor updates to default team

<img width="1539" alt="image"
src="https://github.com/user-attachments/assets/bfbb19fe-3560-4faa-b600-7dd244e0e974"
/>
<img width="1554" alt="image"
src="https://github.com/user-attachments/assets/775624f5-ba83-46e8-81ff-512bfeed6bab"
/>
<img width="1538" alt="image"
src="https://github.com/user-attachments/assets/3becbf85-b75a-4506-adb7-e5575ebbaec4"
/>


## Why are these changes needed?

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

## Related issue number

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

Closes #5440 

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-02-09 04:50:12 +00:00
Victor Dibia 9494ac97a0
AGS Improvements (Add Test Button in Team Builder View + Others) (#5416)
<!-- 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?

- Add ability to test teams in Team Builder view 
- Update Gallery (add deep research default team, fix bug with gallery
serialization)
- UI fixes 
   -  improve drag drop component experience 
- improve new session experience (single click rather than 3 clicks to
create a session)
   - fix bug with stop reason not being shown in some cases

<img width="1738" alt="Image"
src="https://github.com/user-attachments/assets/4b895df2-3bad-474e-bec6-4fbcbf1c4346"
/>

<img width="1761" alt="Image"
src="https://github.com/user-attachments/assets/65f52eb9-e926-4168-88fb-d2496c159474"
/>

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

## Related issue number

Closes #5392

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

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-02-07 23:37:44 +00:00
Victor Dibia 6454e3fece
fix permission issue in ags windows (#5360)
<!-- 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?

Fix permission issue in ags windows (env files now stored in a user
directory)

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

## Related issue number

<!-- For example: "Closes #1234" -->
Closes #5355
## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
2025-02-04 10:23:46 -08:00
Victor Dibia b89ca2a5ae
Fix warnings in AGS (#5320)
This PR does the following: 

- Fix warning messages in AGS on launch.
- Improve Cli message to include app URL on startup from command line
- Minor improvements default gallery generator. (add more default tools)
- Improve new session behaviour.



## Related issue number

Closes #5097

## Checks
2025-02-04 06:32:34 +00:00
Victor Dibia b2800d729b
Update AGS to Use AgentChat Declarative Config Serialization (#5261)
<!-- 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 PR updates AGS to use the declarative config serialization native
to AgentChat.
The effect? You can build your teams/artifacts directly in python, run
`team.dump_component()` and immediately run it in AGS.

Some change details:

- Removes ComponentFactory. Instead TeamManager just loads team specs
directly using `Team.load_component`.
- Some fixes to the UI to simplify drag and drop experience.  
- Improve layout of nodes...


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

## Related issue number

<!-- For example: "Closes #1234" -->
Closes #4439 
Closes #5172

## Checks

- [ ] I've included any doc changes needed for
https://microsoft.github.io/autogen/. See
https://microsoft.github.io/autogen/docs/Contribute#documentation 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.


cc @EItanya @nour-bouzid
2025-01-31 00:24:37 +00:00
Jack Gerrits c2721ff65b
Update all versions to 0.4.0 (#4941)
* Update all versions to 0.4.0

* update redirect

* install with upgrade for agentchat
2025-01-09 15:29:54 -05:00
Victor Dibia 4e3a70303d
Add Deploy view in AGS (#4756)
* update version, fix component factory bug

* add basic structure for deploy

* minor fixes, deploy v1

* minor text updated

* format fixes

* formatting fixes .. webby test samples

* update cli command, update views,

* packakge.json and other fixes

* format fixes
2024-12-18 18:57:11 -08:00
Eric Zhu e902e94b14
Define AgentEvent, rename tool call messages to events. (#4750)
* Define AgentEvent, rename tool call messages to events.

* update doc

* Use AgentEvent | ChatMessage to replace AgentMessage

* Update docs

* update deprecation notice

* remove unused

* fix doc

* format
2024-12-18 14:09:19 -08:00
Hussein Mozannar 7d0f485bd2
WebSurfer add close method (#4727)
* fix finicky websurfer test

* add close method

* update default to not download or debug

* enable closing agents in team_manager

---------

Co-authored-by: Victor Dibia <victor.dibia@gmail.com>
2024-12-16 18:51:52 -08:00
Victor Dibia 6a4a11042c
Add AOAI Support in AGS (#4718)
* add oai support, improve component config typing, minor updates to docs, update ags tests

* faq updates

* update faq, add model_capabilities

* update faq
2024-12-16 13:17:42 -08:00
Victor Dibia c7145156b1
Add Component Gallery to AGS (#4693)
* fix message instance check error

* general refactor, enable 3rd party gallery

* format fixes

* update detail view

* improve detail view and test sync capabilities

* minor tweaks, version bump

* version bump

* update uv.lock

* update lockfile

* update uv.lock

* update uv lock

* pin uv version

* uv version

* revert

* revert

* minor side bar and drag drop layout fixes

* revert version numbering.

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-12-14 15:33:14 -08:00
Victor Dibia 85cf942d37
Add v1 Drag and Drop Team Composition to AGS (#4609)
* v1 progress on drag_drop

* add v1 for node deletions

* major refactor, add sidebar to teams and session playground

* format updates

* formatting updates

* update formatting

* formatting and other checks

* add mangentic one deps

* general refactor, fix new team creation bug etc...

* minor bugfix

* update uv lock

---------

Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-12-11 14:31:25 -08:00
Leonardo Pinheiro 253fe216fd
Add models.openai and tools.langchain namespaces (#4601)
* add models.openai namespace

* refactor tools namespace

* update lock file

* revert pyproject changes

* update docs and add cast

* update ext models doc ref

* increase underline

* add reply models namespace

* update imports

* fix test

* linting

* fix missing conflicts

* revert pydantic changes

* rename to replay

* replay

* fix reply

* Fix test

* formatting

* example

---------

Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-12-09 19:18:09 -08:00
Jack Gerrits 218e84fd8e
Migrate remaining components (#4626) 2024-12-09 18:39:07 -08:00
Jack Gerrits 87011ae01b
Migrate model context and models modules out of components (#4613)
* Move model context out of components

* move models out of components

* rename docs file
2024-12-09 10:00:08 -08:00
Hussein Mozannar 3817b8ddf6
Add MagenticOneGroupChat to AGS (#4595)
* add magenticonegroupchat to ags

* fix termination condition

* typing order check

* format error

* fix M1 orchestrator handle tool mesages

* add filesurfer and coder
2024-12-08 21:44:16 -08:00
Jack Gerrits 3022369eeb
Flatten core base and components (#4513)
* Flatten core base and components

* remove extra files

* dont export from deprecated locations

* format

* fmt
2024-12-03 17:00:44 -08:00
Eric Zhu 32aa452af8
Remove autogen_agentchat.tasks, create autogen_agentchat.ui and autogen_agentchat.conditions (#4512) 2024-12-03 15:24:25 -08:00
gagb b6a7d56844
Adds Video Surfer to autogen_ext (#4387)
* Add initial code

* Update and add readme

* Update

* update readme

* Refine action space

* Add tutorial

* Improve doc string

* Improve doc string

* Remove readme

* Update toml

* Update assignment

* Expose the tools

* Update pyproject toml

* Improve docs

* remove assignment'

* Run poe format

* Update uv lock

* Fix mypy errors

* Fix linting errors

* poe format

* run checks

* Updaye

* Rename submodule

* Improve documentation

---------

Co-authored-by: Mohammad Mazraeh <Mazraeh.Mohammad@Gmail.com>
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-11-29 14:41:23 -08:00
Hussein Mozannar 531ec38073
Ags web surfer (#4340)
* initial addition

* working without multimodal messages

* show images

* remove temp changes

* ui type websurfer

* fix issue with image width, enable text truncation, enable viewing images full screen

---------

Co-authored-by: Victor Dibia <victor.dibia@gmail.com>
2024-11-26 21:24:45 -08:00
Victor Dibia fe96f7de24
Add Session Saving to AGS (#4369)
* fix import issue related to agentchat update #4245

* update uv lock file

* fix db auto_upgrade logic issue.

* im prove msg rendering issue

* Support termination condition combination. Closes #4325

* fix db instantiation bug

* update yarn.lock, closes #4260 #4262

* remove deps for now with vulnerabilities found by dependabot #4262

* update db tests

* add ability to load sessions from db ..

* format updates, add format checks to ags

* format check fixes

* linting and ruff check fixes

* make tests for ags non-parrallel to avoid db race conditions.

* format updates

* fix concurrency issue

* minor ui tweaks, move run start to websocket

* lint fixes

* update uv.lock

* Update python/packages/autogen-studio/autogenstudio/datamodel/types.py

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

* Update python/packages/autogen-studio/autogenstudio/teammanager.py

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

* reuse user proxy from agentchat

* ui tweaks

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Hussein Mozannar <hmozannar@microsoft.com>
2024-11-26 15:39:36 -08:00
Victor Dibia 44640e29a3
Fix Import Issue in AGS, Remove InnerMessage import from agentchat.messages (#4246)
* fix import issue related to agentchat update #4245

* update uv lock file
2024-11-17 12:04:55 -08:00
Victor Dibia 2997c27d1b
Add Human Input Mode in AGS (#4210)
* add react-flow

* update tutorial, some ui improvement for agent thread layout

* v1 for interactive viz for agent state

* add Ui visualization of message based transitions

* minor updates

* fix node edges, support visualization of self loops

* improve edges and layout, add support for selector group chat prompt

* minor ui tweaks

* ui and layout updates

* ugrade dependencies to fix dependabot scan errors

* persist sidebar, enable contentbar title mechanism #4191

* add support for user proxy agent, support human in put mode. #4011

* add UI support for human input mode via a userproxy agent  #4011

* version update

* fix db initialization bug

* support for human input mode in UI, fix backend api route minor bugs

* update pyproject toml and uv lock

* readme update, support full screen mode for agent visualiation

* update uv.lock
2024-11-15 14:51:57 -08:00
Victor Dibia b9f7282830
Add visualization of Agent Message Transitions State in AGS (#4148)
* add react-flow

* update tutorial, some ui improvement for agent thread layout

* v1 for interactive viz for agent state

* add Ui visualization of message based transitions

* minor updates

* fix node edges, support visualization of self loops

* improve edges and layout, add support for selector group chat prompt

* minor ui tweaks
2024-11-12 20:29:06 -08:00
Victor Dibia 0e985d4b40
v1 of AutoGen Studio on AgentChat (#4097)
* add skeleton worflow manager

* add test notebook

* update test nb

* add sample team spec

* refactor requirements to agentchat and ext

* add base provider to return agentchat agents from json spec

* initial api refactor, update dbmanager

* api refactor

* refactor tests

* ags api tutorial update

* ui refactor

* general refactor

* minor refactor updates

* backend api refaactor

* ui refactor and update

* implement v1 for streaming connection with ui updates

* backend refactor

* ui refactor

* minor ui tweak

* minor refactor and tweaks

* general refactor

* update tests

* sync uv.lock with main

* uv lock update
2024-11-09 14:32:24 -08:00
Jack Gerrits ed50ba4548
Use sha256 for hashing (#3829)
Co-authored-by: Ryan Sweet <rysweet@microsoft.com>
2024-10-17 10:33:18 -07:00
Jack Gerrits 1174fcd92e Merge branch 'main' into staging 2024-10-02 14:38:28 -04:00
Jack Gerrits 2596648fc9 move studio to a package 2024-09-30 10:20:38 -04:00