autono

A ReAct-Based Highly Robust Autonomous Agent Framework.

https://github.com/vortezwohl/autono

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary

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
Last synced: 4 months ago · JSON representation ·

Repository

A ReAct-Based Highly Robust Autonomous Agent Framework.

Basic Info
Statistics
  • Stars: 208
  • Watchers: 13
  • Forks: 36
  • Open Issues: 15
  • Releases: 31
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
Created about 1 year ago · Last pushed 5 months ago
Metadata Files
Readme License Citation

README.md

Autono

Paper A ReAct Based Highly Robust Autonomous Agent Framework.

MCP is currently supported. How to use McpAgent.

English | 繁體中文 | 简体中文 | 日本語


Abstract

This paper 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.

Experiment

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

| Framework | Version | Model | one-step-task | multi-step-task | multi-step-task-with-possible-failure | | ------ | --- |----------------------------------------- | ------------- | --------------- | ---------------------------------------- | | autono | 1.0.0 |gpt-4o-mini
qwen-plus
deepseek-v3 | 96.7%
100%
100% | 100%
96.7%
100% | 76.7%
93.3%
93.3% | | autogen | 0.4.9.2 |gpt-4o-mini
qwen-plus
deepseek-v3 |90%
90%
N/A | 53.3%
0%
N/A | 3.3%
3.3%
N/A | | langchain | 0.3.21 |gpt-4o-mini
qwen-plus
deepseek-v3 | 73.3%
73.3%
76.7% | 13.3%
13.3%
13.3% | 10%
13.3%
6.7% |

  • one-step-task: Tasks that can be completed with a single tool call.
  • multi-step-task: Tasks that require multiple tool calls to complete, with no possibility of tool failure.
  • 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.

The deepseek-v3 model is not supported by autogen-agentchat==0.4.9.2.

You can reproduce my experiments here.

Citation

If you are incorporating the autono framework into your research, please remember to properly cite it to acknowledge its contribution to your work.

Если вы интегрируете фреймворк autono в своё исследование, пожалуйста, не забудьте правильно сослаться на него, указывая его вклад в вашу работу.

もしあなたが研究に autono フレームワークを組み入れているなら、その貢献を認めるために適切に引用することを忘れないでください.

如果您正在將 autono 框架整合到您的研究中,請務必正確引用它,以聲明它對您工作的貢獻.

bibtex @article{wu2025autono, author = {Zihao Wu}, title = {Autono: A ReAct-Based Highly Robust Autonomous Agent Framework}, journal = {arXiv preprint}, year = {2025}, eprint = {2504.04650}, archivePrefix = {arXiv}, primaryClass = {cs.MA}, url = {https://arxiv.org/abs/2504.04650} } bibtex @software{Wu_Autono_2025, author = {Wu, Zihao}, license = {GPL-3.0}, month = apr, title = {{Autono}}, url = {https://github.com/vortezwohl/Autono}, version = {1.0.0}, year = {2025} }

Installation

  • From PYPI

    shell pip install -U autono

  • From Github

    Get access to unreleased features.

    shell pip install git+https://github.com/vortezwohl/Autono.git

Quick Start

To start building your own agent, follow the steps listed.

  1. set environmental variable OPENAI_API_KEY

    ```

    .env

    OPENAIAPIKEY=sk-... ```

  2. import required dependencies

- `Agent` lets you instantiate an agent.

- `Personality` is an enumeration class used for customizing personalities of agents.

    - `Personality.PRUDENT` makes the agent's behavior more cautious.

    - `Personality.INQUISITIVE` encourages the agent to be more proactive in trying and exploring.

- `get_openai_model` gives you a `BaseChatModel` as thought engine.

- `@ability(brain: BaseChatModel, cache: bool = True, cache_dir: str = '')` is a decorator which lets you declare a function as an `Ability`.

- `@agentic(agent: Agent)` is a decorator which lets you declare a function as an `AgenticAbility`.

```python
from autono import (
    Agent,
    Personality,
    get_openai_model,
    ability,
    agentic
)
```
  1. declare functions as basic abilities

    ```python @ability def calculator(expr: str) -> float: # this function only accepts a single math expression return simplify(expr)

    @ability def write_file(filename: str, content: str) -> str: with open(filename, 'w', encoding='utf-8') as f: f.write(content) return f'{content} written to {filename}.' ```

  2. instantiate an agent

    You can grant abilities to agents while instantiating them.

    python model = get_openai_model() agent = Agent(abilities=[calculator, write_file], brain=model, name='Autono', personality=Personality.INQUISITIVE)

- You can also grant more abilities to agents later:

    ```python
    agent.grant_ability(calculator)
    ```

    or

    ```python
    agent.grant_abilities([calculator])
    ```

- To deprive abilities:

    ```python
    agent.deprive_ability(calculator)
    ```

    or

    ```python
    agent.deprive_abilities([calculator])
    ```

You can change an agent's personality using method `change_personality(personality: Personality)`

```python
agent.change_personality(Personality.PRUDENT)
```
  1. assign a request to your agent

    python 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'.")

  2. leave the rest to your agent

    python response = agent.just_do_it() print(response)

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.

Integration with MCP

I provide McpAgent to support tool calls based on the MCP protocol. Below is a brief guide to integrating McpAgent with mcp.stdio_client:

  1. import required dependencies
- `McpAgent` allows you to instantiate an agent capable of accessing MCP tools.

- `StdioMcpConfig` is an alias for `mcp.client.stdio.StdioServerParameters` and serves as the MCP server connection configuration.

- `@mcp_session(mcp_config: StdioMcpConfig)` allows you to declare a function as an MCP session.

- `sync_call` allows you to synchronizedly call a coroutine function.

```python
from autono import (
    McpAgent,
    get_openai_model,
    StdioMcpConfig,
    mcp_session,
    sync_call
)
```
  1. create an MCP session
- To connect with a stdio based MCP server, use `StdioMcpConfig`.

    ```python
    mcp_config = StdioMcpConfig(
        command='python',
        args=['./my_stdio_mcp_server.py'],
        env=dict(),
        cwd='./mcp_servers'
    )
    ```

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

    ```python
    @sync_call
    @mcp_session(mcp_config)
    async def run(session, request: str) -> str:
        ...
    ```

- To connect via HTTP with a SSE based MCP server, just provide the URL.

    ```python
    @sync_call
    @mcp_session('http://localhost:8000/sse')
    async def run(session, request: str) -> str:
        ...
    ```

- To connect via websocket with a WS based MCP server, provide the URL.

    ```python
    @sync_call
    @mcp_session('ws://localhost:8000/message')
    async def run(session, request: str) -> str:
        ...
    ```
  1. create an McpAgent instance within the MCP session

    After creating McpAgent, you need to call the fetch_abilities() method to retrieve tool configurations from the MCP server.

    python @sync_call @mcp_session(mcp_config) async def run(session, request: str) -> str: mcp_agent = await McpAgent(session=session, brain=get_openai_model()).fetch_abilities() ...

  2. assign tasks to the McpAgent instance and await execution result

    python @sync_call @mcp_session(mcp_config) async def run(session, request: str) -> str: mcp_agent = await McpAgent(session=session, brain=get_openai_model()).fetch_abilities() result = await mcp_agent.assign(request).just_do_it() return result.conclusion

  3. call the function

    python if __name__ == '__main__': ret = run(request='What can you do?') print(ret)

I also provide the complete MCP agent test script. See example.

Observability

To make the working process of agents observable, I provide two hooks, namely BeforeActionTaken and AfterActionTaken. They allow you to observe and intervene in the decision-making and execution results of each step of the agent's actions. You can obtain and modify the agent's decision results for the next action through the BeforeActionTaken hook, while 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).

To start using hooks, follow the steps listed.

  1. bring in hooks and messages from autono

    python from autono.brain.hook import BeforeActionTaken, AfterActionTaken from autono.message import BeforeActionTakenMessage, AfterActionTakenMessage

  2. declare functions and encapsulate them as hooks

    ```python def beforeactiontaken(agent: Agent, message: BeforeActionTakenMessage): print(f'Agent: {agent.name}, Next move: {message}') return message

    def afteractiontaken(agent: Agent, message: AfterActionTakenMessage): print(f'Agent: {agent.name}, Action taken: {message}') return message

    beforeactiontakenhook = BeforeActionTaken(beforeactiontaken) afteractiontakenhook = AfterActionTaken(afteractiontaken) ```

    In these two hook functions, you intercepted the message and printed the information in the message. Afterwards, you returned the message unaltered to the agent. Of course, you also have the option to modify the information in the message, thereby achieving intervention in the agent's working process.

  3. use hooks during the agent's working process

    python agent.assign(...).just_do_it(before_action_taken_hook, after_action_taken_hook)

Owner

  • Name: Vortez Wohl
  • Login: vortezwohl
  • Kind: user
  • Location: Fuzhou, China

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it using the following information.
doi:
authors:
  - given-names: Zihao
    family-names: Wu
    orcid: https://orcid.org/0009-0003-2474-2092
    affiliation:
      - Fujian University of Technology
    email: vortez.wohl@gmail.com
    github: https://github.com/vortezwohl
title: Autono
version: 1.0.0
date-released: 2025-04-06
abstract: >
    This paper (project) 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.
keywords:
  - ReAct
  - Robustness
  - Autonomous Agent
  - Multi-Agent
license: GPL-3.0
url: https://github.com/vortezwohl/Autono

GitHub Events

Total
  • Release event: 2
  • Watch event: 16
  • Push event: 23
  • Pull request event: 3
  • Fork event: 5
  • Create event: 3
Last Year
  • Release event: 2
  • Watch event: 16
  • Push event: 23
  • Pull request event: 3
  • Fork event: 5
  • Create event: 3

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 545
  • Total Committers: 6
  • Avg Commits per committer: 90.833
  • Development Distribution Score (DDS): 0.367
Past Year
  • Commits: 545
  • Committers: 6
  • Avg Commits per committer: 90.833
  • Development Distribution Score (DDS): 0.367
Top Committers
Name Email Commits
吴子豪 v****l@p****e 345
zihaowu z****u@i****m 86
吴子豪(Zihao Wu) z****1@h****m 85
吴子豪 v****l@g****m 27
Ikko Eltociear Ashimine e****r@g****m 1
= = 1
Committer Domains (Top 20 + Academic)