Skip to content

manus-pro/open-manus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenManus - Python Agent System

Discord Twitter

ManusPro is an agent-based system that can execute tasks, generate documents, conduct research, and more.

Demo video

demo.mp4

Checkout the frontend branch: image

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/open-manus.git
cd open-manus/python
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Optional dependencies:
  • For generating visualizations in PDFs: pip install matplotlib numpy

Features

  • Task planning and execution
  • Document generation
    • PDF generation with data tables and visualizations (auto-opens generated PDFs)
    • Markdown generation with auto-open capability
  • Web research using Firecrawl API
  • Code generation and automatic execution
  • Terminal command integration
  • Artifact management and tracking
  • Conversation handling

Configuration

Create a .env file in the project root with your API keys:

OPENAI_API_KEY=your_openai_key
FIRECRAWL_API_KEY=your_firecrawl_key  # For web research capabilities
# Optional: If using Claude
ANTHROPIC_API_KEY=your_anthropic_key

Usage

from app.agent.manus import Manus
import asyncio

# Create Manus agent
agent = Manus()

# Run a task
async def main():
    await agent.run("Generate a report about renewable energy technologies")

if __name__ == "__main__":
    asyncio.run(main())

Document Generation

OpenManus can generate different types of documents:

PDF Generation

from app.tool.pdf_generator import PDFGeneratorTool

pdf_tool = PDFGeneratorTool()
result = pdf_tool.run(
    content="# This is a PDF report\n\nContent goes here...",
    title="Sample Report",
    options={"auto_open": True}  # Automatically open the PDF after generation
)
print(f"PDF created at: {result['artifact_path']}")

Markdown Generation

from app.tool.markdown_generator import MarkdownGeneratorTool

md_tool = MarkdownGeneratorTool()
result = md_tool.run(
    content="## This is a Markdown document\n\nContent goes here...",
    title="Sample Document",
    options={"auto_open": True}  # Automatically open the markdown file
)
print(f"Markdown created at: {result['artifact_path']}")

Code Generation and Execution

Generate and automatically execute code:

from app.tool.code_generator import CodeGeneratorTool

code_tool = CodeGeneratorTool()
result = code_tool.run(
    description="Create a function that calculates the factorial of a number",
    language="python"  # Code will be auto-executed if it's safe
)
print(f"Code created at: {result['artifact_path']}")
if result.get("executed"):
    print(f"Execution result: {result['execution_result']['output']}")

Web Research

Perform web research using the Firecrawl API:

from app.tool.firecrawl_research import FirecrawlResearchTool

research_tool = FirecrawlResearchTool()
result = research_tool.run(
    query="Latest advancements in quantum computing",
    output_format="markdown",
    include_visualizations=True
)
print(f"Research data saved to: {result['artifact_path']}")

Optional Modules

Visualization Support

The PDF generator can include data visualizations if matplotlib is installed. To enable this feature:

pip install matplotlib numpy

Without matplotlib, the system will still work but will display a message in the PDF when visualizations are requested.

Browser Automation

For automating browser tasks, Selenium is used:

pip install selenium webdriver-manager

Web Research

For web research capabilities, the firecrawl-py package is required:

pip install firecrawl-py

License

MIT License

About

A step towards AGI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages