{"id":23933897,"url":"https://github.com/vortezwohl/Autono","last_synced_at":"2025-09-11T16:33:09.018Z","repository":{"id":259580854,"uuid":"878264141","full_name":"vortezwohl/Autono","owner":"vortezwohl","description":"A ReAct-Based Highly Robust Autonomous Agent Framework.","archived":false,"fork":false,"pushed_at":"2025-08-22T07:49:06.000Z","size":993,"stargazers_count":208,"open_issues_count":15,"forks_count":36,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-09-04T23:22:42.389Z","etag":null,"topics":["agent","agi","ai","aiagent","autogen","autonomous-agents","framework","langchain","llm-framework","mcp","mcp-agent","mcp-agent-framework","mcp-client","multiagent","nlp","openai","python","tool-learning","tool-oriented-learning","transformer"],"latest_commit_sha":null,"homepage":"https://doi.org/10.48550/arXiv.2504.04650","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vortezwohl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-25T04:18:55.000Z","updated_at":"2025-09-04T10:38:04.000Z","dependencies_parsed_at":"2024-10-26T17:53:58.209Z","dependency_job_id":"d2ccaeb1-d268-4eaf-bcb6-6db3b6ac7ca6","html_url":"https://github.com/vortezwohl/Autono","commit_stats":null,"previous_names":["vortezwohl/ceo","vortezwohl/ceo-agentic-ai-framework","vortezwohl/ceo-autonomous-agent-framework","vortezwohl/autono"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/vortezwohl/Autono","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vortezwohl%2FAutono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vortezwohl%2FAutono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vortezwohl%2FAutono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vortezwohl%2FAutono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vortezwohl","download_url":"https://codeload.github.com/vortezwohl/Autono/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vortezwohl%2FAutono/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274670400,"owners_count":25328233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agi","ai","aiagent","autogen","autonomous-agents","framework","langchain","llm-framework","mcp","mcp-agent","mcp-agent-framework","mcp-client","multiagent","nlp","openai","python","tool-learning","tool-oriented-learning","transformer"],"created_at":"2025-01-06T00:29:58.391Z","updated_at":"2025-09-11T16:33:08.979Z","avatar_url":"https://github.com/vortezwohl.png","language":"Python","funding_links":[],"categories":["📚 Projects (1974 total)","Building"],"sub_categories":["MCP Servers","Tools"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cp\u003e\n        \u003cimg src=\"https://github.com/vortezwohl/Autono/releases/download/autono_icon/autono_logo.png\" alt=\"Autono\" height=\"125\"\u003e\n    \u003c/p\u003e\n    \u003cdiv align=\"center\"\u003e\n        \u003cspan\u003e\n            \u003ca href=\"https://deepwiki.com/vortezwohl/Autono\" rel=\"nofollow\"\u003e\n                \u003cimg src=\"https://camo.githubusercontent.com/e7d4bb1a32530e373bb53fbe8eea825440ad27c7531d8f144d561acdd20c093a/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667\" alt=\"Ask DeepWiki\" data-canonical-src=\"https://deepwiki.com/badge.svg\" style=\"max-width: 100%;\"\u003e\n            \u003c/a\u003e\n        \u003c/span\u003e\n    \u003c/div\u003e\n    \u003cp style=\"font-weight: 800; font-size: 24px; color:rgb(143, 88, 195)\"\u003e\n        \u003ca href=\"https://doi.org/10.48550/arXiv.2504.04650\" rel=\"nofollow\"\u003e\n            \u003cimg src=\"https://arxiv.org/static/browse/0.3.4/images/icons/favicon-32x32.png\" alt=\"Paper\", style=\"max-width: 100%;height: 20px\"\u003e\n        \u003c/a\u003e\n        A \u003ca href=\"https://arxiv.org/abs/2210.03629\"\u003eReAct\u003c/a\u003e Based Highly Robust Autonomous Agent Framework.\n    \u003c/p\u003e\n    \u003cp style=\"font-weight: 600; font-size: 16px\"\u003e\n        \u003ca href=\"https://github.com/modelcontextprotocol\"\u003eMCP\u003c/a\u003e is currently supported. \u003ca href=\"#integration-with-mcp\"\u003eHow to use McpAgent\u003c/a\u003e.\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\u003ch4 align=\"center\"\u003e\n    \u003cp\u003e\n        \u003cb\u003eEnglish\u003c/b\u003e |\n        \u003ca href=\"https://github.com/vortezwohl/Autono/blob/main/i18n/README_zh-hant.md\"\u003e繁體中文\u003c/a\u003e |\n        \u003ca href=\"https://github.com/vortezwohl/Autono/blob/main/i18n/README_zh-hans.md\"\u003e简体中文\u003c/a\u003e |\n        \u003ca href=\"https://github.com/vortezwohl/Autono/blob/main/i18n/README_ja-jp.md\"\u003e日本語\u003c/a\u003e\n    \u003c/p\u003e\n\u003c/h4\u003e\n\n\u003ch5\u003e\u003c/br\u003e\u003c/h5\u003e\n\n## Abstract\n\nThis [paper](https://arxiv.org/abs/2504.04650) proposes a highly robust autonomous agent framework based on the ReAct paradigm, designed to solve complex tasks through adaptive decision making and multi-agent collaboration. Unlike traditional frameworks that rely on fixed workflows generated by LLM-based planners, this framework dynamically generates next actions during agent execution based on prior trajectories, thereby enhancing its robustness. To address potential termination issues caused by adaptive execution paths, I propose a timely abandonment strategy incorporating a probabilistic penalty mechanism. For multi-agent collaboration, I introduce a memory transfer mechanism that enables shared and dynamically updated memory among agents. The framework's innovative timely abandonment strategy dynamically adjusts the probability of task abandonment via probabilistic penalties, allowing developers to balance conservative and exploratory tendencies in agent execution strategies by tuning hyperparameters. This significantly improves adaptability and task execution efficiency in complex environments. Additionally, agents can be extended through external tool integration, supported by modular design and MCP protocol compatibility, which enables flexible action space expansion. Through explicit division of labor, the multi-agent collaboration mechanism enables agents to focus on specific task components, thereby significantly improving execution efficiency and quality.\n\n## Experiment\n\nThe experimental results demonstrate that the `autono` framework significantly outperforms `autogen` and `langchain` in handling tasks of varying complexity, especially in multi-step tasks with possible failures.\n\n| Framework   | Version | Model                                      | one-step-task | multi-step-task | multi-step-task-with-possible-failure |\n| ------ | --- |----------------------------------------- | ------------- | --------------- | ---------------------------------------- |\n| `autono` | `1.0.0` |gpt-4o-mini\u003cbr\u003eqwen-plus\u003cbr\u003edeepseek-v3 | 96.7%\u003c/br\u003e100%\u003c/br\u003e100% | 100%\u003c/br\u003e96.7%\u003c/br\u003e100% | 76.7%\u003c/br\u003e93.3%\u003c/br\u003e93.3% |\n| `autogen` | `0.4.9.2` |gpt-4o-mini\u003cbr\u003eqwen-plus\u003cbr\u003edeepseek-v3 |90%\u003c/br\u003e90%\u003c/br\u003eN/A | 53.3%\u003c/br\u003e0%\u003c/br\u003eN/A | 3.3%\u003c/br\u003e3.3%\u003c/br\u003eN/A |\n| `langchain` | `0.3.21` |gpt-4o-mini\u003cbr\u003eqwen-plus\u003cbr\u003edeepseek-v3 | 73.3%\u003c/br\u003e73.3%\u003c/br\u003e76.7% | 13.3%\u003c/br\u003e13.3%\u003c/br\u003e13.3% | 10%\u003c/br\u003e13.3%\u003c/br\u003e6.7% |\n\n- `one-step-task`: Tasks that can be completed with a single tool call.\n- `multi-step-task`: Tasks that require multiple tool calls to complete, with no possibility of tool failure.\n- `multi-step-task-with-possible-failure`: Tasks that require multiple tool calls to complete, where tools may fail, requiring the agent to retry and correct errors.\n\n\u003e The deepseek-v3 model is not supported by `autogen-agentchat==0.4.9.2`.\n\n\u003e You can reproduce my experiments [here](https://github.com/vortezwohl/experiment-03-22-2025).\n\n## Citation\n\nIf you are incorporating the `autono` framework into your research, please remember to properly **cite** it to acknowledge its contribution to your work.\n\nЕсли вы интегрируете фреймворк `autono` в своё исследование, пожалуйста, не забудьте правильно сослаться на него, указывая его вклад в вашу работу.\n\nもしあなたが研究に `autono` フレームワークを組み入れているなら、その貢献を認めるために適切に引用することを忘れないでください.\n\n如果您正在將 `autono` 框架整合到您的研究中，請務必正確引用它，以聲明它對您工作的貢獻.\n\n```bibtex\n@article{wu2025autono,\nauthor = {Zihao Wu},\ntitle = {Autono: A ReAct-Based Highly Robust Autonomous Agent Framework},\njournal = {arXiv preprint},\nyear = {2025},\neprint = {2504.04650},\narchivePrefix = {arXiv},\nprimaryClass = {cs.MA},\nurl = {https://arxiv.org/abs/2504.04650}\n}\n```\n```bibtex\n@software{Wu_Autono_2025,\nauthor = {Wu, Zihao},\nlicense = {GPL-3.0},\nmonth = apr,\ntitle = {{Autono}},\nurl = {https://github.com/vortezwohl/Autono},\nversion = {1.0.0},\nyear = {2025}\n}\n```\n\n## Installation\n\n- From [PYPI](https://pypi.org/project/autono/)\n\n    ```shell\n    pip install -U autono\n    ```\n\n- From [Github](https://github.com/vortezwohl/Autono/releases)\n\n    Get access to unreleased features.\n\n    ```shell\n    pip install git+https://github.com/vortezwohl/Autono.git\n    ```\n\n## Quick Start\n\nTo start building your own agent, follow the steps listed.\n\n1. set environmental variable `OPENAI_API_KEY`\n\n    ```\n    # .env\n    OPENAI_API_KEY=sk-...\n    ```\n\n2. import required dependencies\n\n    - `Agent` lets you instantiate an agent.\n\n    - `Personality` is an enumeration class used for customizing personalities of agents.\n\n        - `Personality.PRUDENT` makes the agent's behavior more cautious.\n\n        - `Personality.INQUISITIVE` encourages the agent to be more proactive in trying and exploring.\n\n    - `get_openai_model` gives you a `BaseChatModel` as thought engine.\n\n    - `@ability(brain: BaseChatModel, cache: bool = True, cache_dir: str = '')` is a decorator which lets you declare a function as an `Ability`.\n\n    - `@agentic(agent: Agent)` is a decorator which lets you declare a function as an `AgenticAbility`.\n\n    ```python\n    from autono import (\n        Agent,\n        Personality,\n        get_openai_model,\n        ability,\n        agentic\n    )\n    ```\n\n3. declare functions as basic abilities\n\n    ```python\n    @ability\n    def calculator(expr: str) -\u003e float:\n        # this function only accepts a single math expression\n        return simplify(expr)\n\n    @ability\n    def write_file(filename: str, content: str) -\u003e str:\n        with open(filename, 'w', encoding='utf-8') as f:\n            f.write(content)\n        return f'{content} written to {filename}.'\n    ```\n\n4. instantiate an agent\n\n    You can grant abilities to agents while instantiating them.\n\n    ```python\n    model = get_openai_model()\n    agent = Agent(abilities=[calculator, write_file], brain=model, name='Autono', personality=Personality.INQUISITIVE)\n    ```\n\n    - You can also grant more abilities to agents later:\n\n        ```python\n        agent.grant_ability(calculator)\n        ```\n\n        or\n\n        ```python\n        agent.grant_abilities([calculator])\n        ```\n\n    - To deprive abilities:\n\n        ```python\n        agent.deprive_ability(calculator)\n        ```\n\n        or\n\n        ```python\n        agent.deprive_abilities([calculator])\n        ```\n    \n    You can change an agent's personality using method `change_personality(personality: Personality)`\n\n    ```python\n    agent.change_personality(Personality.PRUDENT)\n    ```\n\n5. assign a request to your agent\n\n    ```python\n    agent.assign(\"Here is a sphere with radius of 9.5 cm and pi here is 3.14159, find the area and volume respectively then write the results into a file called 'result.txt'.\")\n    ```\n\n6. leave the rest to your agent\n\n    ```python\n    response = agent.just_do_it()\n    print(response)\n    ```\n\n\u003e `autono` also supports multi-agent collaboration scenario, declare a function as agent calling ability with `@agentic(agent: Agent)`, then grant it to an agent. [See example](https://github.com/vortezwohl/Autono/blob/autono/demo/multi_agent.py).\n\n## Integration with [MCP](https://github.com/modelcontextprotocol)\n\nI provide `McpAgent` to support tool calls based on the MCP protocol. Below is a brief guide to integrating `McpAgent` with `mcp.stdio_client`:\n\n1. import required dependencies\n\n    - `McpAgent` allows you to instantiate an agent capable of accessing MCP tools.\n\n    - `StdioMcpConfig` is an alias for `mcp.client.stdio.StdioServerParameters` and serves as the MCP server connection configuration.\n\n    - `@mcp_session(mcp_config: StdioMcpConfig)` allows you to declare a function as an MCP session.\n\n    - `sync_call` allows you to synchronizedly call a coroutine function.\n\n    ```python\n    from autono import (\n        McpAgent,\n        get_openai_model,\n        StdioMcpConfig,\n        mcp_session,\n        sync_call\n    )\n    ```\n\n2. create an MCP session\n\n    - To connect with a stdio based MCP server, use `StdioMcpConfig`.\n\n        ```python\n        mcp_config = StdioMcpConfig(\n            command='python',\n            args=['./my_stdio_mcp_server.py'],\n            env=dict(),\n            cwd='./mcp_servers'\n        )\n        ```\n\n        \u003e A function decorated with `@mcp_session` will receive an MCP session instance as its first parameter. A function can be decorated with multiple `@mcp_session` decorators to access sessions for different MCP servers.\n\n        ```python\n        @sync_call\n        @mcp_session(mcp_config)\n        async def run(session, request: str) -\u003e str:\n            ...\n        ```\n\n    - To connect via HTTP with a SSE based MCP server, just provide the URL.\n\n        ```python\n        @sync_call\n        @mcp_session('http://localhost:8000/sse')\n        async def run(session, request: str) -\u003e str:\n            ...\n        ```\n    \n    - To connect via websocket with a WS based MCP server, provide the URL.\n\n        ```python\n        @sync_call\n        @mcp_session('ws://localhost:8000/message')\n        async def run(session, request: str) -\u003e str:\n            ...\n        ```\n\n\n3. create an `McpAgent` instance within the MCP session\n\n    After creating `McpAgent`, you need to call the `fetch_abilities()` method to retrieve tool configurations from the MCP server.\n\n    ```python\n    @sync_call\n    @mcp_session(mcp_config)\n    async def run(session, request: str) -\u003e str:\n        mcp_agent = await McpAgent(session=session, brain=get_openai_model()).fetch_abilities()\n        ...\n    ```\n\n4. assign tasks to the `McpAgent` instance and await execution result\n\n    ```python\n    @sync_call\n    @mcp_session(mcp_config)\n    async def run(session, request: str) -\u003e str:\n        mcp_agent = await McpAgent(session=session, brain=get_openai_model()).fetch_abilities()\n        result = await mcp_agent.assign(request).just_do_it()\n        return result.conclusion\n    ```\n\n5. call the function\n\n    ```python\n    if __name__ == '__main__':\n        ret = run(request='What can you do?')\n        print(ret)\n    ```\n\n\u003e I also provide the complete MCP agent test script. [See example](https://github.com/vortezwohl/Autono/blob/autono/demo/mcp_agent.py).\n\n## Observability\n\nTo make the working process of agents observable, I provide two hooks, namely `BeforeActionTaken` and `AfterActionTaken`. \nThey allow you to observe and intervene in the decision-making and execution results of each step of the agent's actions. \nYou can obtain and modify the agent's decision results for the next action through the `BeforeActionTaken` hook, \nwhile `AfterActionTaken` allows you to obtain and modify the execution results of the actions (the tampered execution results will be part of the agent's memory).\n\nTo start using hooks, follow the steps listed.\n\n1. bring in hooks and messages from `autono`\n\n    ```python\n    from autono.brain.hook import BeforeActionTaken, AfterActionTaken\n    from autono.message import BeforeActionTakenMessage, AfterActionTakenMessage\n    ```\n\n2. declare functions and encapsulate them as hooks\n\n    ```python\n    def before_action_taken(agent: Agent, message: BeforeActionTakenMessage):\n        print(f'Agent: {agent.name}, Next move: {message}')\n        return message\n\n    def after_action_taken(agent: Agent, message: AfterActionTakenMessage):\n        print(f'Agent: {agent.name}, Action taken: {message}')\n        return message\n\n    before_action_taken_hook = BeforeActionTaken(before_action_taken)\n    after_action_taken_hook = AfterActionTaken(after_action_taken)\n    ```\n\n    \u003e In these two hook functions, you intercepted the message and printed the information in the message. \n    Afterwards, you returned the message unaltered to the agent. \n    Of course, you also have the option to **modify** the information in the message, \n    thereby achieving intervention in the agent's working process.\n\n3. use hooks during the agent's working process\n\n    ```python\n    agent.assign(...).just_do_it(before_action_taken_hook, after_action_taken_hook)\n    ```\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvortezwohl%2FAutono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvortezwohl%2FAutono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvortezwohl%2FAutono/lists"}