AIOS Docs
  • Welcome
  • Getting Started
    • Installation
    • Quickstart
      • Use Terminal
      • Use WebUI
    • Environment Variables Configuration
  • AIOS Kernel
    • Overview
    • LLM Core(s)
      • LiteLLM Compatible Backend
      • vLLM Backend
      • Hugging Face Backend
      • LLM Routing
    • Scheduler
      • FIFOScheduler
      • RRScheduler
    • Context
    • Memory
      • Base Layer
      • Agentic Memory Operations
    • Storage
      • sto_mount
      • sto_create_file
      • sto_create_directory
      • sto_write
      • sto_retrieve
      • sto_rollback
      • sto_share
    • Tools
    • Access
    • Syscalls
    • Terminal
  • AIOS Agent
    • How to Use Agent
    • How to Develop Agents
      • Develop with Native SDK
      • Develop with AutoGen
      • Develop with Open-Interpreter
      • Develop with MetaGPT
    • How to Publish Agents
  • AIOS-Agent SDK
    • Overview
    • LLM Core API
      • llm_chat
      • llm_chat_with_json_output
      • llm_chat_with_tool_call_output
      • llm_call_tool
      • llm_operate_file
    • Memory API
      • create_memory
      • get_memory
      • update_memory
      • delete_memory
      • search_memories
      • create_agentic_memory
    • Storage API
      • mount
      • create_file
      • create_dir
      • write_file
      • retrieve_file
      • rollback_file
      • share_file
    • Tool API
      • How to Develop Tools
    • Access API
    • Post API
    • Agent API
  • Community
    • How to Contribute
Powered by GitBook
On this page
  • Intruduction
  • Quick Start
  1. AIOS Agent
  2. How to Develop Agents

Develop with MetaGPT

PreviousDevelop with Open-InterpreterNextHow to Publish Agents

Last updated 1 month ago

Intruduction

MetaGPT is a multi-agent framework. We made it so that agent applications developed with MetaGPT can run on AIOS by adding just one line of code.

Quick Start

For installation and usage of open-interpreter, please refer to .

If you want to run an application developed with MetaGPT on AIOS, please add prepare_framework() before you use MetaGPT, and select a framework type through FrameworkType. When you want to use MetaGPT, you should use FrameworkType.MetaGPT.

Then nothing needs to change, use MetaGPT as usual.

+ with aios_starter(**vars(args)):
+     prepare_framework(FrameworkType.MetaGPT)

      repo: ProjectRepo = generate_repo("Create a 2048 game")  # or ProjectRepo("<path>")
      print(repo)

Or use Data Interpreter:

+ with aios_starter(**vars(args)):
+     prepare_framework(FrameworkType.MetaGPT)

      async def di_main():
          di = DataInterpreter()
          await di.run("Run data analysis on sklearn Iris dataset, include a plot")

      asyncio.run(di_main())  # or await main() in a jupyter notebook setting

MetaGPT requires a longer output context to generate longer code, so you may need to use --max_new_tokens to set a larger output token length.

python scripts/aios-metagpt/example_aios_metagpt.py --llm_name gpt-4o-mini --max_new_tokens 4000

More examples can be found in

MetaGPT
https://github.com/agiresearch/AIOS/tree/main/scripts/aios-metagpt
.