Code Monkey home page Code Monkey logo

agentcy's Introduction

Agentcy

Multi-Agent Creative Collaboration

GitHub Contributors GitHub Last Commit GitHub Stars GitHub Forks Github License Twitter


OverviewAgentsToolsSetupConclusion RoadmapLicense


A small team autonomous of agents help you unlock, uncover or explore the potential of your business. Agentcy takes two simple inputs to generate a plan, research and deliverables to help you gain a competitive advantage.


📖 Overview

Modeled on advertising and creative agencies, you'll move from problem space to solution space with successive steps of research, writing, ideation and strategic planning. Agentcy uses the AutoGen framework to orchestrate multiple agents to ensure that tasks are handled by the most qualified agent, leading to more efficient and accurate outcomes.

🕵🏽 Agents

The agents involved in the collaboration include:

  1. Agency Manager: Creates a plan and approach to tackle the problem or opportunity.
  2. Agency Researcher: Conducts research on user pain points, market opportunities, and prevailing market conditions.
  3. Writing Assistant: Utilizes research and content writing functions to generate content.
  4. Agency Strategist: Drafts strategic briefs for effective brand positioning in the market.
  5. Agency Copywriter: Crafts compelling narratives and messages that align with the brand's strategy.
  6. Agency Media Planner: Identifies the best mix of media channels for advertising.
  7. Agency Marketer: Transforms strategy and insights into marketable ideas.
  8. Agency Director: Guides the creative vision of the project.
  9. User Proxy: Acts as an intermediary between the human user and the agents.

🛠️ Tools Used

  1. Serper for realtime web search
  2. Browserless for web scrape
  3. Langchain for content summarization

⚙️ Setup & Configuration

  1. Ensure required libraries are installed:
pip install pyautogen
  1. Set up the OpenAI configuration list by either providing an environment variable OAI_CONFIG_LIST or specifying a file path.
[
    {
        "model": "gpt-3.5-turbo", #or whatever model you prefer
        "api_key": "INSERT_HERE"
    }
]
  1. Setup api keys in .env:
OPENAI_API_KEY="XXX"
SERPAPI_API_KEY="XXX"
SERPER_API_KEY="XXX"
BROWSERLESS_API_KEY="XXX"
  1. Launch in CLI:
python3 main.py

⏯️ Conclusion

In the realm of creative agencies, the multi-agent collaboration approach revolutionizes the way projects are handled. By tapping into the distinct expertise of various agency roles, from strategists to media planners, we can guarantee that each facet of a project is managed by those best suited for the task. This methodology not only ensures precision and efficiency but also showcases its versatility, as it can be tailored to suit diverse project requirements, whether it's brand positioning, content creation, or any other creative endeavor.

Credit to Jason Zhou's RAG example.

📈 Roadmap

  • Refine workflow and data pass through to agents
  • Reduce unnecessary back and forth
  • Modularize code
  • Implement alternative and local LLM models
  • Save files to local folder
  • Implement other agents, see commented out agents
  • Create and train fine-tuned agents for each domain specific task
  • Add more tools for agents to utilize
  • Create UI for project

📝 License

MIT License. See LICENSE for more information.

agentcy's People

Contributors

amadad avatar eltociear avatar

Stargazers

AboveWallStreet avatar Charlie Cortial avatar  avatar  avatar Matthias Neumayer avatar Ayush avatar Mariena Quintanilla avatar Herklos avatar  avatar  avatar  avatar Qi Tong avatar  avatar Onur ULUSOY avatar  avatar  avatar  avatar GAI Group avatar  avatar id-2 avatar Pash avatar T0PD0G5G0DP0T avatar Irfan Shah avatar  avatar  avatar Patrick Sprowls avatar  avatar Samuel Devdas avatar AI in PM avatar KidKarmaツ avatar  avatar Jose Suarez avatar Daniel Duckworth avatar Chad Vavra avatar Junior Thiesen avatar  avatar  avatar hjvogel avatar  avatar sfuller14 avatar  avatar Sean Rieger avatar TheEmbers Guo avatar KSD avatar  avatar von avatar  avatar DAVE EVERETT avatar  avatar Moshe Malka avatar  avatar KingDie avatar Phillip Hetzel avatar  avatar  avatar  avatar  avatar Camilla Napoles avatar  avatar RealTimeX avatar  avatar test avatar  avatar Samba Siva avatar Matt Luceen avatar Lukasz Hanusik avatar  avatar  avatar  avatar  avatar Johnny avatar 昱彤 avatar  avatar Gilbert avatar Mike Oller avatar  avatar  avatar  avatar Cory Jones avatar George Karsas avatar Hugo Alves avatar  avatar Jonny's IT Services avatar Kyle O'Brien avatar joga_bonito avatar  avatar HuFeiHu avatar اجاي avatar Joe Swann avatar  avatar  avatar Yetmens avatar Di Bop avatar ILIA.eth avatar Marc Green avatar Yang Sun avatar  avatar  avatar  avatar CentOP avatar

Watchers

Luca G. Soave avatar Ryan Thrash avatar  avatar  avatar  avatar Starved Midnight avatar SHAHNAB AHMED avatar Franck avatar  avatar Bledar Ramo avatar AI in PM avatar Matt avatar  avatar  avatar  avatar

agentcy's Issues

Error: Invalid parameter: only messages with role 'assistant' can have a function call.

When the writing assistant tries to call the research function, there is an error:
"openai.error.InvalidRequestError: Invalid parameter: only messages with role 'assistant' can have a function call."

This happens with both gpt-4 and 3.5-turbo.

I codified the most important parts like this box

Agency_Copywriter (to chat_manager):

Great work, Agency Strategist! The strategic brief provides a clear roadmap for the development of the Experimental Bass Music Database. It effectively outlines the brand's positioning, target audience, and unique value proposition. The key messages and emotional appeal are well-defined, and the strategic initiatives align with the goal of building a comprehensive and trusted resource.

Next, let's collaborate with the Agency Designer to ensure that the visual elements and user experience complement the brand's voice and strategic direction. By aligning the text and visuals, we can create a cohesive brand story that resonates with the target audience. Let's continue working together to bring the Experimental Bass Music Database to life!


[autogen.oai.completion: 11-01 17:10:44] {223} INFO - retrying in 10 seconds...
Traceback (most recent call last):
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\oai\completion.py", line 209, in _get_response
response = openai_completion.create(request_timeout=request_timeout, **config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 155, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 299, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 710, in _interpret_response
self._interpret_response_line(
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 775, in _interpret_response_line
raise self.handle_error_response(
openai.error.APIError: The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 3a48ccdd1f5a96586718e2f31f005694 in your email.) {
"error": {
"message": "The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 3a48ccdd1f5a96586718e2f31f005694 in your email.)",
"type": "server_error",
"param": null,
"code": null
}
}
500 {'error': {'message': 'The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 3a48ccdd1f5a96586718e2f31f005694 in your email.)', 'type': 'server_error', 'param': None, 'code': None}} {'Date': 'Thu, 02 Nov 2023 00:10:14 GMT', 'Content-Type': 'application/json', 'Content-Length': '366', 'Connection': 'keep-alive', 'access-control-allow-origin': '
', 'openai-model': 'gpt-3.5-turbo-0613', 'openai-organization': 'zenchant', 'openai-processing-ms': '852', 'openai-version': '2020-10-01', 'strict-transport-security': 'max-age=15724800; includeSubDomains', 'x-ratelimit-limit-requests': '5000', 'x-ratelimit-limit-tokens': '90000', 'x-ratelimit-remaining-requests': '4999', 'x-ratelimit-remaining-tokens': '84399', 'x-ratelimit-reset-requests': '12ms', 'x-ratelimit-reset-tokens': '3.733s', 'x-request-id': '3a48ccdd1f5a96586718e2f31f005694', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '81f82738a9ab6a04-SMF', 'alt-svc': 'h3=":443"; ma=86400'}
[autogen.oai.completion: 11-01 17:11:03] {223} INFO - retrying in 10 seconds...
Traceback (most recent call last):
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\oai\completion.py", line 209, in _get_response
response = openai_completion.create(request_timeout=request_timeout, **config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 155, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 299, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 710, in _interpret_response
self._interpret_response_line(
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 775, in _interpret_response_line
raise self.handle_error_response(
openai.error.APIError: The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 09955dfb9dc7289f412373a1dc8d3255 in your email.) {
"error": {
"message": "The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 09955dfb9dc7289f412373a1dc8d3255 in your email.)",
"type": "server_error",
"param": null,
"code": null
}
}
500 {'error': {'message': 'The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID 09955dfb9dc7289f412373a1dc8d3255 in your email.)', 'type': 'server_error', 'param': None, 'code': None}} {'Date': 'Thu, 02 Nov 2023 00:10:33 GMT', 'Content-Type': 'application/json', 'Content-Length': '366', 'Connection': 'keep-alive', 'access-control-allow-origin': '
', 'openai-model': 'gpt-3.5-turbo-0613', 'openai-organization': 'zenchant', 'openai-processing-ms': '8412', 'openai-version': '2020-10-01', 'strict-transport-security': 'max-age=15724800; includeSubDomains', 'x-ratelimit-limit-requests': '5000', 'x-ratelimit-limit-tokens': '90000', 'x-ratelimit-remaining-requests': '4999', 'x-ratelimit-remaining-tokens': '87783', 'x-ratelimit-reset-requests': '12ms', 'x-ratelimit-reset-tokens': '1.477s', 'x-request-id': '09955dfb9dc7289f412373a1dc8d3255', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '81f8277ebdb26a04-SMF', 'alt-svc': 'h3=":443"; ma=86400'}
writing_assistant (to chat_manager):

******* Suggested function Call: research *****
Arguments:
{
  "query": "Experimental Bass Music"
}
***********************************************

Traceback (most recent call last):
File "C:\Users\Zenchant\Documents\agentcy\main.py", line 448, in
user_proxy.initiate_chat(
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 521, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 324, in send
recipient.receive(message, self, request_reply, silent)
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 452, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 764, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\groupchat.py", line 116, in run_chat
speaker = groupchat.select_speaker(speaker, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\groupchat.py", line 45, in select_speaker
final, name = selector.generate_oai_reply(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 596, in generate_oai_reply
response = oai.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\oai\completion.py", line 773, in create
response = cls.create(
^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\oai\completion.py", line 804, in create
return cls._get_response(params, raise_on_ratelimit_or_timeout=raise_on_ratelimit_or_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\autogen\oai\completion.py", line 209, in _get_response
response = openai_completion.create(request_timeout=request_timeout, **config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 155, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 299, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 710, in _interpret_response
self._interpret_response_line(
File "C:\Users\Zenchant\Documents\agentcy\myenv\Lib\site-packages\openai\api_requestor.py", line 775, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: Invalid parameter: only messages with role 'assistant' can have a function call.

Timeout error

I always have this problem when running this repo with a valid API key , GPT 3.5 16k


File "/Users/jlcases/codigo/agentcy/venv/lib/python3.10/site-packages/openai/api_requestor.py", line 617, in request_raw
    raise error.Timeout("Request timed out: {}".format(e)) from e
openai.error.Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60)

I reviewed the code and timeout is set at 600s

Any thought?

Want to contribute

Hi Amadad would like to collaborate with me to make this next level product. I have team of frontend engineers and a team who can deploy this at this scale. Just contact me on discord drdoggo im in the auto gen discord

ImportError: please install openai and diskcache to use the autogen.oai subpackage.

Please enter the your goal, brief, or problem statement: project management
User_proxy (to chat_manager):

project management

Traceback (most recent call last):
File "/home/specific/Dokumente/dws/agentcy/main.py", line 443, in
user_proxy.initiate_chat(
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/conversable_agent.py", line 521, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/conversable_agent.py", line 324, in send
recipient.receive(message, self, request_reply, silent)
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/conversable_agent.py", line 452, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/conversable_agent.py", line 764, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/groupchat.py", line 116, in run_chat
speaker = groupchat.select_speaker(speaker, self)
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/groupchat.py", line 45, in select_speaker
final, name = selector.generate_oai_reply(
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/agentchat/conversable_agent.py", line 596, in generate_oai_reply
response = oai.ChatCompletion.create(
File "/home/specific/Dokumente/dws/agentcy/venv/lib/python3.9/site-packages/autogen/oai/completion.py", line 761, in create
raise ERROR
ImportError: please install openai and diskcache to use the autogen.oai subpackage.

Process finished with exit code 1

Python 3.11.6
pip 21.3.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.