Skip to content

Commit 451f761

Browse files
author
Dongjin Jang
committed
[ADD] Bedrock-Manus, Insight Extractor with Strand SDK
1 parent 051b46f commit 451f761

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+6915
-3
lines changed

genai/aws-gen-ai-kr/20_applications/08_bedrock_manus/use_cases/01_deep_research/main.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"# TAVILY_API_KEY = your_key\n",
2626
"# JINA_API_KEY = your_key\n",
2727
"# CHROME_INSTANCE_PATH = /Applications/Google Chrome.app/Contents/MacOS/Google Chrome\n",
28-
"# BROWSER_HEADLESS=False\n",
29-
"TAVILY_API_KEY = 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"
28+
"# BROWSER_HEADLESS=False"
3029
]
3130
},
3231
{
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Contributing to LangManus
2+
3+
Thank you for your interest in contributing to LangManus! We welcome contributions of all kinds from the community.
4+
5+
## Ways to Contribute
6+
7+
There are many ways you can contribute to LangManus:
8+
9+
- **Code Contributions**: Add new features, fix bugs, or improve performance
10+
- **Documentation**: Improve README, add code comments, or create examples
11+
- **Bug Reports**: Submit detailed bug reports through issues
12+
- **Feature Requests**: Suggest new features or improvements
13+
- **Code Reviews**: Review pull requests from other contributors
14+
- **Community Support**: Help others in discussions and issues
15+
16+
## Development Setup
17+
18+
1. Fork the repository
19+
2. Clone your fork:
20+
```bash
21+
git clone https://github.com/your-username/langmanus.git
22+
cd langmanus
23+
```
24+
3. Set up your development environment:
25+
```bash
26+
python -m venv .venv
27+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
28+
uv sync
29+
```
30+
4. Configure pre-commit hooks:
31+
```bash
32+
chmod +x pre-commit
33+
ln -s ../../pre-commit .git/hooks/pre-commit
34+
```
35+
36+
## Development Process
37+
38+
1. Create a new branch:
39+
```bash
40+
git checkout -b feature/amazing-feature
41+
```
42+
43+
2. Make your changes following our coding standards:
44+
- Write clear, documented code
45+
- Follow PEP 8 style guidelines
46+
- Add tests for new features
47+
- Update documentation as needed
48+
49+
3. Run tests and checks:
50+
```bash
51+
make test # Run tests
52+
make lint # Run linting
53+
make format # Format code
54+
make coverage # Check test coverage
55+
```
56+
57+
4. Commit your changes:
58+
```bash
59+
git commit -m 'Add some amazing feature'
60+
```
61+
62+
5. Push to your fork:
63+
```bash
64+
git push origin feature/amazing-feature
65+
```
66+
67+
6. Open a Pull Request
68+
69+
## Pull Request Guidelines
70+
71+
- Fill in the pull request template completely
72+
- Include tests for new features
73+
- Update documentation as needed
74+
- Ensure all tests pass and there are no linting errors
75+
- Keep pull requests focused on a single feature or fix
76+
- Reference any related issues
77+
78+
## Code Style
79+
80+
- Follow PEP 8 guidelines
81+
- Use type hints where possible
82+
- Write descriptive docstrings
83+
- Keep functions and methods focused and single-purpose
84+
- Comment complex logic
85+
86+
## Community Guidelines
87+
88+
- Be respectful and inclusive
89+
- Follow our code of conduct
90+
- Help others learn and grow
91+
- Give constructive feedback
92+
- Stay focused on improving the project
93+
94+
## Need Help?
95+
96+
If you need help with anything:
97+
- Check existing issues and discussions
98+
- Join our community channels
99+
- Ask questions in discussions
100+
101+
We appreciate your contributions to making LangManus better!
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Langmanus
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
# [USE-CASES] Deep Research based on Bedrock-Manus
2+
3+
<p align="left">
4+
<a href="https://github.com/aws-samples">
5+
<img alt="Build" src="https://img.shields.io/badge/Contribution-Welcome-blue">
6+
</a>
7+
<a href="https://github.com/aws-samples/aws-ai-ml-workshop-kr/blob/master/LICENSE">
8+
<img alt="License" src="https://img.shields.io/badge/LICENSE-MIT-green">
9+
</a>
10+
<a href="https://github.com/aws-samples/aws-ai-ml-workshop-kr/tree/master/genai/aws-gen-ai-kr/20_applications/08_bedrock_manus">
11+
<img alt="Build" src="https://img.shields.io/badge/Origin-Bedrock_Manus-red">
12+
</a>
13+
</p>
14+
15+
[English](./README.md)
16+
17+
> Amazon Bedrock-Optimized AI Automation Framework
18+
19+
Bedrock-Manus is an AI automation framework optimized for Amazon Bedrock and business use cases.
20+
21+
> Come From Open Source, Back to Open Source
22+
23+
Bedrock-Manus is based on the open-source project [LangManus](https://github.com/Darwin-lfl/langmanus).
24+
25+
> Amazon Bedrock-Optimized AI Automation Framework
26+
27+
## Demo Video
28+
29+
> **Task**: I'm planning to buy a laptop. Which products released within the past 2 years would you recommend? Please create the results as a PDF report.
30+
31+
[![Demo](./assets/demo.gif)]
32+
33+
- [View on YouTube](https://www.youtube.com/watch?v=Pb1lJTSLI98)
34+
- Output in Demo is [English- Report.pdf (6 pages)](./assets/final_report_deep_resrarch.pdf))
35+
36+
## Table of Contents
37+
- [Quick Start](#quick-start)
38+
- [Architecture](#architecture)
39+
- [Features](#features)
40+
- [Setup](#setup)
41+
- [Prerequisites](#prerequisites)
42+
- [Installation](#installation)
43+
- [Usage](#usage)
44+
- [Contributors](#contributors)
45+
- [License](#license)
46+
- [Acknowledgments](#acknowledgments)
47+
48+
## Quick Start
49+
50+
```bash
51+
# Clone the repository
52+
git clone https://github.com/aws-samples/aws-ai-ml-workshop-kr.git
53+
cd cd aws-ai-ml-workshop-kr/genai/aws-gen-ai-kr/20_applications/08_bedrock_manus/use_cases/01_deep_research
54+
55+
# Create and activate virtual environment
56+
cd setup/
57+
./create_conda_virtual_env.sh bedrock-manus
58+
59+
# Run the project
60+
conda activate bedrock-manus
61+
python main.py
62+
63+
```
64+
65+
## Architecture
66+
67+
Bedrock-Manus implements a hierarchical multi-agent system where a supervisor coordinates specialized agents to accomplish complex tasks:
68+
69+
![Bedrock-Manus Architecture](./assets/architecture.png)
70+
71+
The system consists of the following agents working together:
72+
73+
1. **Planner** - Analyzes tasks and creates execution strategies
74+
2. **Supervisor** - Oversees and manages the execution of other agents
75+
3. **Researcher** - Solves a given problem by gatering information from the web
76+
4. **Coder** - Handles code generation and modifications
77+
5. **Reporter** - Generates reports and summaries of the workflow results
78+
79+
## Features
80+
81+
### Core Capabilities
82+
- 🤖 **LLM Integration**
83+
- Support for all models provided in Amazon Bedrock (Nova, Claude, DeepSeek, Llama, etc.)
84+
- Multi-tier LLM system for different task complexities
85+
86+
### Development Features
87+
- 🐍 **Python Integration**
88+
- Built-in Python REPL
89+
- Code execution environment
90+
91+
### Workflow Management
92+
- 📊 **Visualization and Control**
93+
- Planning based on TODO list
94+
- Workflow graph visualization
95+
- Multi-agent orchestration
96+
- Task delegation and monitoring
97+
98+
## Setup
99+
100+
### Prerequisites
101+
102+
- This code has been tested in the environments listed below.
103+
- Amazon SageMaker AI Studio (CodeEditor and JypyterLab)
104+
105+
### Installation
106+
107+
Bedrock-Manus leverages `conda environment`
108+
Follow the steps below to set up a virtual environment and install the necessary dependencies:
109+
110+
```bash
111+
# Step 1: Create and activate a virtual environment through conda
112+
cd setup/
113+
./create_conda_virtual_env.sh bedrock-manus
114+
```
115+
116+
By completing these steps, you'll ensure your environment is properly configured and ready for development.
117+
118+
## Usage
119+
120+
### Basic Execution
121+
122+
To run Bedrock-Manus with default settings:
123+
124+
```bash
125+
python main.py
126+
```
127+
or use `main.ipynb`
128+
129+
To run Bedrock-Manus with UI (Streamlit):
130+
```bash
131+
cd app/
132+
streamlit run app.py
133+
```
134+
135+
### Advanced Configuration
136+
137+
Bedrock-Manus can be customized through various configuration files in the `src/config` directory:
138+
- `agents.py`: Modify team composition, agent system prompts, and `prompt caching` enablement
139+
140+
### Agent Prompts System
141+
142+
Bedrock-Manus uses a sophisticated prompting system in the `src/prompts` directory to define agent behaviors and responsibilities:
143+
144+
#### Core Agent Roles
145+
146+
- **Supervisor ([`src/prompts/supervisor.md`](src/prompts/supervisor.md))**: Coordinates the team and delegates tasks by analyzing requests and determining which specialist should handle them. Makes decisions about task completion and workflow transitions.
147+
148+
- **Planner ([`src/prompts/planner.md`](src/prompts/file_manager.md))**: Plan and Execute tasks using a team of specialized agents to achieve the desired outcome.
149+
150+
- **Researcher ([`src/prompts/researcher.md`](src/prompts/researher.md))**: Specializes in information gathering through web searches and data collection. Uses Tavily search and web crawling capabilities while avoiding mathematical computations or file operations.
151+
152+
- **Coder ([`src/prompts/coder.md`](src/prompts/coder.md))**: Professional software engineer role focused on Python and bash scripting. Handles:
153+
- Python code execution and analysis
154+
- Shell command execution
155+
- Technical problem-solving and implementation
156+
157+
- **Reporter ([`src/prompts/reporter.md`](src/prompts/coder.md))**: Professional reporter responsible for writing clear, comprehensive reports based ONLY on provided information and verifiable facts.
158+
- Summary imtermideate results
159+
- Python code execution (results generation)
160+
- Shell command execution (results generation)
161+
162+
#### Prompt System Architecture
163+
164+
The prompts system uses a template engine ([`src/prompts/template.py`](src/prompts/template.py)) that:
165+
- Loads role-specific markdown templates
166+
- Handles variable substitution (e.g., current time, team member information)
167+
- Formats system prompts for each agent
168+
169+
Each agent's prompt is defined in a separate markdown file, making it easy to modify behavior and responsibilities without changing the underlying code.
170+
171+
## Contributors
172+
173+
- **Dongjin Jang, Ph.D.** (AWS AI/ML Specislist Solutions Architect) | [Mail](mailto:[email protected]) | [Linkedin](https://www.linkedin.com/in/dongjin-jang-kr/) | [Git](https://github.com/dongjin-ml) | [Hugging Face](https://huggingface.co/Dongjin-kr) |
174+
175+
## License
176+
177+
- <span style="#FF69B4;"> This is licensed under the [MIT License](https://github.com/aws-samples/aws-ai-ml-workshop-kr/blob/master/LICENSE). </span>
178+
179+
## Acknowledgments
180+
181+
Special thanks to all the open source projects and contributors (especilly LangMauns) that make BedrockManus possible. We stand on the shoulders of giants.

0 commit comments

Comments
 (0)