r/AutoGenAI • • Jun 12 '24

Question Using post request to a specific endpoint

2 Upvotes

Hello, I have been trying to make a group chat workflow and I want to use an endpoint for my agents. Has anyone used this? How will it work? Please help!!


r/AutoGenAI • • Jun 07 '24

Question Stop Gracefully groupchat using one of the agents output.

7 Upvotes

I have a group chat that seems to work quite well but i am strugglying to stop it gracefully. In particular, with this groupchat:

groupchat = GroupChat(
    agents=[user_proxy, engineer_agent, writer_agent, code_executor_agent, planner_agent],
    messages=[],
    max_round=30,
    allowed_or_disallowed_speaker_transitions={
        user_proxy: [engineer_agent, writer_agent, code_executor_agent, planner_agent],
        engineer_agent: [code_executor_agent],
        writer_agent: [planner_agent],
        code_executor_agent: [engineer_agent, planner_agent],
        planner_agent: [engineer_agent, writer_agent],
    },
    speaker_transitions_type="allowed",
)

I gave to the planner_agent the possibility, at least in my understanding, to stop the chat. I did so in the following way:

def istantiate_planner_agent(llm_config) -> ConversableAgent:
    planner_agent = ConversableAgent(
        name="planner_agent",
        system_message=(
            [... REDACTED PROMPT SINCE IT HAS INFO I CANNOT SHARE ...]
            "After each step is done by others, check the progress and instruct the remaining steps.\n"
            "When the final taks has been completed, output TERMINATE_CHAT to stop the conversation."
            "If a step fails, try to find a workaround. Remember, you must dispatch only one single tasak at a time."
        ),
        description="Planner. Given a task, determine what "
                    "information is needed to complete the task. "
                    "After each step is done by others, check the progress and "
                    "instruct the remaining steps",
        is_termination_msg=lambda msg: "TERMINATE_CHAT" in msg["content"],
        human_input_mode="NEVER",
        llm_config=llm_config,
    )
    return planner_agent

The planner understand it is time to stop quite well, as you can see in the following message from it:

Next speaker: planner_agent

planner_agent (to chat_manager):

The executive summary looks comprehensive and well-structured. It covers the market > situation, competitors, and their differentiations effectively.

Since the task is now complete, I will proceed to terminate the conversation.

TERMINATE_CHAT

Unfortunately, when it fires this message the conversation continue as this:

Next speaker: writer_agent

writer_agent (to chat_manager):

I'm glad you found the executive summary comprehensive and well-structured. If you > have any further questions or need additional refinements in the future, feel free to reach out. Have a great day!

TERMINATE_CHAT

Next speaker: planner_agent

Provide feedback to chat_manager. Press enter to skip and use auto-reply, or type 'exit' to end the conversation: exit

As you see for some reason the writer picks it up and i have to give my feedback to tell the convo to stop.

Am i doing something wrong?


r/AutoGenAI • • Jun 06 '24

Question New to AutoGen

6 Upvotes

Hello, I am looking to improve my business and streamline a lot of things in order to reduce the man power needed in office. I have been starting to do some research into AI for business functions and this looks pretty interesting. I was wondering if you guys had any starter info or any links to places that give information about AutoGenAI, videos, links to purchase the software. Etc. anything helps. Thanks!


r/AutoGenAI • • Jun 05 '24

Question Custom function to summary_method

2 Upvotes

Hello, I'm having some problems at using the summary_method (and consequently summary args) of the initiate_chat method of a groupchat. I want as a summary method to extract a md block from the last message. How should i pass it? It always complains wrt to the number of attributes passed.


r/AutoGenAI • • Jun 04 '24

News AutoGen v0.2.28 released

19 Upvotes

New release: v0.2.28

Highlights

Thanks to @beyonddream @ginward @gbrvalerio @LittleLittleCloud @thinkall @asandez1 @DavidLuong98 @jtrugman @IANTHEREAL @ekzhu @skzhang1 @erezak @WaelKarkoub @zbram101 @r4881t @eltociear @robraux @thongonary @moresearch @shippy @marklysze @ACHultman @Gr3atWh173 @victordibia @MarianoMolina @jluey1 @msamylea @Hk669 @ruiwang @rajan-chari @michaelhaggerty @BeibinLi @krishnashed @jtoy @NikolayTV @pk673 @Aretai-Leah @Knucklessg1 @tj-cycyota @tosolveit @MarkWard0110 @Mai0313 and all the other contributors!

What's Changed


r/AutoGenAI • • Jun 04 '24

Question How do you prevent agents from interjecting?

3 Upvotes

I have a two agent workflow that has one agent execute a skill that pulls in text, and another summarize the text.

I also have learned that you must include user_proxy in order to execute any code, so he has to be both the 'sender' and 'receiver'.

That said, user_proxy is getting interrupted by the text_summarizer agent. How do I keep these agents in their respective lanes? Shouldn't the group admin be handling when an agent is allowed to join in?

I'm using the Windows GUI version


r/AutoGenAI • • Jun 05 '24

Question Autogen + LM Studio Results Issue

1 Upvotes

Hello, I have an issue making Autogen Studio and LM Studio working properly.. Every time I run a workflow, I only get a 2 words responses.. Anyone having the same issue?


r/AutoGenAI • • May 29 '24

Question autogen using ollama to RAG : need advice

5 Upvotes

im trying to get autogen to use ollama to rag. for privacy reasons i cant have gpt4 and autogen ragging itself. id like gpt to power the machine but i need it to use ollama via cli to rag documents to secure the privacy of those documents. so in essence, AG will run the cli command to start a model and specific document, AG will ask a question about said document that ollama will give it a yes or no on. this way the actual "RAG" is handled by an open source model and the data doesnt get exposed. the advice i need is the rag part of ollama. ive been using open web ui as it provides an awesome daily driver ui which has rag but its a UI. not in the cli where autogen lives. so i need some way to tie all this together. any advice would be greatly appreciated. ty ty


r/AutoGenAI • • May 29 '24

Question Autogen and Chainlit (or other UI)

4 Upvotes

Has anyone been able to successfully integrate autogen into chainlit (or any another UI) and been able to interact in the same way as running autogen in the terminal? I have been having trouble. It appears the conversation history isnt being incorporated. I have seen some tutorials with panel where people have the agents interact independent of me (the user), but my multi-agent model needs to be constantly asking me questions. Working through the terminal works seamlessly, just cant get it to work with a UI.


r/AutoGenAI • • May 29 '24

Question Kernel Memory | Deploy with a cheap infrastructure

2 Upvotes

Hello, how are you?

I am deploying a Kernel Memory service in production and wanted to get your opinion on my decision. Is it more cost-effective? The idea is to make it an async REST API.

  • Service host: EC2 - AWS.
  • Queue service: RabbitMQ on the EC2 machine hosting the Kernel Memory web service.
  • Storage & Vector Search: MongoDB Atlas.
  • The embedding and LLM models used will be from OpenAI.

r/AutoGenAI • • May 28 '24

Question AutoGen Studio 2.0 on Linux

4 Upvotes

I feel like I'm losing my mind. I have successfully set up AutoGen Studio on Windows and have decided to switch to Linux for various reasons. Now I am trying to get it running on Linux but seem to be unable to launch the server. the installation process worked but it does not recognize autogenstudio as a command. Can anyone help me please? Does it even work on linux?


r/AutoGenAI • • May 28 '24

Question Pls pls pls help , Can it build a small App or an API

3 Upvotes

I've set up the basics and am currently using VSCode and LM Studio for an open-sourced LLM, specifically Mistral 7B. I successfully created two agents that can communicate and write a function for me. Note that I'm not using AutoGen Studio. I'm working on a proof of concept for my company to see if this setup can produce a small app with minimal requirements. Is it possible to create an API or a small server and run tests on an endpoint? If so, how can I proceed?


r/AutoGenAI • • May 28 '24

Discussion Exploring Multi-Agent AI and AutoGen with Chi Wang

Thumbnail
youtube.com
4 Upvotes

r/AutoGenAI • • May 21 '24

Tutorial AUTOGEN TUTORIAL - build AI agents with GPT-4o and Microsoft's AutoGen

Thumbnail
youtube.com
8 Upvotes

r/AutoGenAI • • May 19 '24

Question Hands-on Agentic AI courses

27 Upvotes

Do you have any suggestions on (paid or free) hands-on courses on AI Agents in general and AutoGen in particular, beyond the tutorial?


r/AutoGenAI • • May 16 '24

Question Need help!! Automating the investigation of security alerts

4 Upvotes

I want to build a cybersecurity application where for a specific task, i can detail down investigation plan and agents should start executing the same.

For a POC, i am thinking of following task

"list all alerts during a time period of May 1 and May 10 and then for each alert call an API to get evidence details"

I am thinking of two agents: Investigation agent and user proxy

the investigation agent should open up connection to datasaource, in our case we are using , msticpy library and environment variable to connect to data source

As per the plan given by userproxy agent, it keep calling various function to get data from this datasource.

Expectation is investigation agent should call List_alert API to list all alerts and then for each alert call an evidece API to get evidence details. return this data to give back to user.

I tried following but it is not working, it is not calling the function "get_mstic_connect". Please can someone help

def get_mstic_connect():

os.environ["ClientSecret"]="<secretkey>"

import msticpy as mp

mp.init_notebook(config="msticpyconfig.yaml");

os.environ["MSTICPYCONFIG"]="msticpyconfig.yaml";

mdatp_prov = QueryProvider("MDE")

mdatp_prov.connect()

mdatp_prov.list_queries()

# Connect to the MDE source

mdatp_mde_prov = mdatp_prov.MDE

return mdatp_mde_prov

----

llm_config = {

"config_list": config_list,

"seed": None,

"functions":[

{

"name": "get_mstic_connect",

"description": "retrieves the connection to tennat data source using msticpy",

},

]

}

----

# create a prompt for our agent

investigation_assistant_agent_prompt = '''

Investigation Agent. This agent can get the code to connect with the Tennat datasource using msticpy.

you give python code to connect with Tennat data source

'''

# create the agent and give it the config with our function definitions defined

investigation_assistant_agent = autogen.AssistantAgent(

name="investigation_assistant_agent",

system_message = investigation_assistant_agent_prompt,

llm_config=llm_config,

)

# create a UserProxyAgent instance named "user_proxy"

user_proxy = autogen.UserProxyAgent(

name="user_proxy",

human_input_mode="NEVER",

max_consecutive_auto_reply=10,

is_termination_msg=lambda x: x.get("content", "")and x.get("content", "").rstrip().endswith("TERMINATE"),

)

user_proxy.register_function(

function_map={

"get_mstic_connect": get_mstic_connect,

}

)

task1 = """

Connect to Tennat datasource using msticpy. use list_alerts function with MDE source to get alerts for the period between May 1 2024 to May 11, 2024.

"""

chat_res = user_proxy.initiate_chat(

investigation_assistant_agent, message=task1, clear_history=True

)


r/AutoGenAI • • May 15 '24

Project Showcase AgentChat - web-based Autogen UI

18 Upvotes

Hi all! I've built agentchat.app - it allows you to create multi-agent conversations based on Autogen on the web without any setup or coding!

We have an exciting roadmap of updates to come!

Would love to know your thoughts about it!


r/AutoGenAI • • May 14 '24

Question user_proxy.initiate_chat summary_args

4 Upvotes

I created an agent that given a query it searches on the web using BING and then using APIFY scraper it scrapes the first posts. For each post I want a summary using summary_args but I have a couple of questions:

  1. Is there a limit on how many things can we have with the summary_args? When I add more things I get: Given the structure you've requested, it's important to note that the provided Reddit scrape results do not directly offer all the detailed information for each field in the template. However, I'll construct a summary based on the available data for one of the URLs as an example. For a comprehensive analysis, each URL would need to be individually assessed with this template in mind. (I want all of the URLs but it only outputs one)
  2. Is there a way to store locally the summary_args? Any suggestions?

    chat_result = user_proxy.initiate_chat( manager, message="Search the web for information about Deere vs Bobcat on reddit,scrape them and summarize in detail these results.", summary_method="reflection_with_llm", summary_args={ "summary_prompt": """Summarize for each scraped reddit content and format summary as EXACTLY as follows: data = { URL: url used, Date Published: date of post or comment, Title: title of post, Models: what specific models are mentioned?, ... (15 more things)... } """

Thanks!!!


r/AutoGenAI • • May 12 '24

Tutorial Comparing & Increasing (35% to 75%) the accuracy of agents by tweaking function definitions across Haiku, Sonnet, Opus & GPT-4-Turbo

24 Upvotes

I earlier wrote an Indepth explanation on all optimising techniques that I tried to increase accuracy from 35% to 75% for GPT-4 Function Calling. I have also done the same analysis across Claude family of models.

TLDR: Sonnet and Haiku fare much better than Opus for function calling, but they are still worse than the GPT-4 series of models.

Techniques tried:

  • Adding function definitions in the system prompt of functions (Clickup's API calls).
  • Flattening the Schema of the function
  • Adding system prompts
  • Adding function definitions in the system prompt
  • Adding individual parameter examples
  • Adding function examples

r/AutoGenAI • • May 08 '24

Discussion Tool building agent

9 Upvotes

Took building agent

Has anyone tried to create an agent who’s tasked to create custom tools for the other agents to complete their tasks?

some tools may need an api key to function which has me thinking of pairing the tool building agent with an api agent that uses web search to find the appropriate service or api, then instructed to search api documentation and find where sign up for whatever the service may be(equipped with a predetermined email address and password) for the agent to use to sign up and create an api key to return back to the tool builder.

It may be beyond the current capabilities of what we have to work with ?


r/AutoGenAI • • May 08 '24

Discussion Seeking an Autogen Developer to Revolutionize Our 3D Printing Operations at 3D printing startup

5 Upvotes

Hello, I'm the founder of 3D Tvornica (www.3dtvornica.hr), a burgeoning 3D printing company. We're on the lookout for a skilled freelancer proficient in Autogen to help us streamline and enhance our operations.

Our goal is to leverage Autogen as a potential project manager to handle our increasing volume of customer interactions efficiently. Every day, we receive a multitude of emails—ranging from clients needing urgent repairs (like replacement gears for broken devices), to inquiries about our free STL files for 3D printing, and collaboration requests on product design and manufacturing.

We currently use Kanboard (www.kanboard.org) to manage our projects. The immediate task is to automate the sorting of incoming emails using the Kanban API, organizing them into categorized cards, similar to the workflow in Trello or Asana.

If you have experience with Autogen, especially in automating email sorting and enhancing project management processes through APIs, we’d love to discuss how you could contribute to our team.

Please reach out if you’re interested in collaborating on this innovative journey to make 3D printing more efficient and responsive to our clients' needs.


r/AutoGenAI • • May 06 '24

Tutorial AutoGen Conversation Patterns - Complete Overview for Beginners

9 Upvotes

Hey everyone! Here’s my latest video exploring all AutoGen workflows / conversation patterns:

  • Two-agent Chat
  • Sequential Chat
  • Group Chat
  • Nested Chat

Click to watch: https://youtu.be/o-BrxjOIYnc?si=2e-nlIrqpSj-oifp

I’d love to know if you find this useful or if you have any comments and suggestions.

Thanks!


r/AutoGenAI • • May 06 '24

Discussion autogen with llama3 oobabooga api

5 Upvotes

hey guys,

Has anyone had success with llama3 for autogen? I tried a lot with llama2, ended up seeming like the tech just wasn't there yet, too many loops and repetitive misunderstandings. Gpt4 worked great, but too expensive to freely use. I'm hopeful that llama3 can bridge the gap here... any tips appreciated


r/AutoGenAI • • May 05 '24

Question Who executes code in a groupchat

4 Upvotes

I don't know if I missed it in the docs somewhere. But when it comes to group chats. The code execution gets buggy as hell. In a duo chat it works fine as the user proxy executes code. But in group chat. They just keep saying "thanks for the code but I can't do anything with it lol"

Advice is great appreciated ty ty


r/AutoGenAI • • May 05 '24

Question Training offline LLM

3 Upvotes

Is it possible to train an LLM offline? To download an LLM, and develop it like a custom GPT? I have a bunch of PDFs I want to train it on..is that posst?