-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/ai agent #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GYFX35
wants to merge
16
commits into
main
Choose a base branch
from
feat/ai-agent
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4ad8145
feat: Redesign frontend with modern UI
google-labs-jules[bot] a8084c3
I've gained some new creative abilities to help you with design tasks.
google-labs-jules[bot] 13daf94
feat: Add Educator agent
google-labs-jules[bot] f0c5555
I've just expanded my skillset! I can now act as a Cybersecurity spec…
google-labs-jules[bot] 69abb9c
I've added a new "Business Developer" capability and prepared your ap…
google-labs-jules[bot] fe19081
I've just finished preparing the application for Heroku deployment an…
google-labs-jules[bot] c34828d
I have a new capability to help you with your Git workflow.
google-labs-jules[bot] a2b2469
feat: Enhance UI with interactive feedback and syntax highlighting
google-labs-jules[bot] 7ff0c0f
fix: Add temporary index.html for deployment test
google-labs-jules[bot] 60b05dc
I've completed a major feature update for you. This update adds six n…
google-labs-jules[bot] 29bf230
feat: Add Scam Tracker agent
google-labs-jules[bot] f27703d
I've been enhanced with new programming and design capabilities to be…
google-labs-jules[bot] 6ca6ca2
I can now help with specialized domains!
google-labs-jules[bot] f9d9f98
feat: Add Astronaut agent
google-labs-jules[bot] 3806fdd
I have introduced a new full-stack web application for a multi-role A…
google-labs-jules[bot] 7061457
I have introduced a new full-stack web application for a multi-role A…
google-labs-jules[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Python | ||
| __pycache__/ | ||
| *.pyc | ||
| *.pyo | ||
| *.pyd | ||
| .Python | ||
| env/ | ||
| venv/ | ||
| pip-wheel-metadata/ | ||
| .installed.cfg | ||
| *.egg-info/ | ||
| *.egg | ||
|
|
||
| # Logs | ||
| *.log | ||
| logs/ | ||
|
|
||
| # Generated code | ||
| generated_code/ | ||
|
|
||
| # Node.js | ||
| node_modules/ | ||
| npm-debug.log | ||
| package-lock.json | ||
| yarn.lock | ||
| pnpm-lock.yaml | ||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
| pid.[0-9]*.log | ||
| yarn-error.log | ||
| lerna-debug.log | ||
| .pnpm-debug.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Use an official Python runtime as a parent image | ||
| FROM python:3.11-slim | ||
|
|
||
| # Set the working directory in the container | ||
| WORKDIR /app | ||
|
|
||
| # Copy the backend requirements file and install dependencies | ||
| COPY backend/requirements.txt . | ||
| RUN pip install --no-cache-dir -r requirements.txt | ||
|
|
||
| # Copy the backend and frontend code into the container | ||
| COPY backend/ ./backend | ||
| COPY frontend/ ./frontend | ||
|
|
||
| # Make port 8000 available to the world outside this container | ||
| EXPOSE 8000 | ||
|
|
||
| # Define environment variables | ||
| ENV PYTHONUNBUFFERED 1 | ||
|
|
||
| # Run the app. The Gunicorn server will bind to 0.0.0.0:8000 | ||
| # The module is backend.main and the Flask app instance is named 'app' | ||
| CMD ["gunicorn", "--bind", "0.0.0.0:8000", "backend.main:app"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| web: gunicorn backend.main:app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,157 @@ | ||
| # AI-services | ||
| AI services | ||
| # AI Agent: A Multi-Role Assistant | ||
|
|
||
| This project is a web-based AI agent that can perform several roles to assist with software development, business, and educational tasks. | ||
|
|
||
| ## Features | ||
|
|
||
| - **Software Engineer:** Generates multi-section HTML/CSS for a static website or simple Python scripts. | ||
| - **Debugger:** Lints HTML and CSS code to find basic errors. Can analyze pasted code or fetch a file directly from a GitHub URL. | ||
| - **Marketer:** Creates promotional social media posts from a business description. | ||
| - **System Analyzer:** Scans a website URL for broken links and suggests search queries to find solutions. | ||
| - **Designer:** Finds royalty-free images/videos, generates CSS animation scripts, and suggests color palettes. | ||
| - **Educator:** Takes any question and provides a direct link to Google search results. | ||
| - **Cybersecurity Analyst:** Scans a website's HTTP headers and reports on key security headers. | ||
| - **Business Developer:** Generates a business plan outline and suggests SEO keyword research queries for a startup idea. | ||
| - **Public Services:** Provides links to authoritative resources on topics like climate change, agriculture, and biodiversity. | ||
| - **Git Helper:** Generates a shell script with the necessary Git commands to create a branch, commit, and push changes. | ||
| - **Scam Tracker:** Analyzes a URL for common signs of being a scam or phishing site. | ||
| - **Automation:** Generates example scripts and checklists for specialized domains like robotics, aerospace, and automotive. | ||
| - **Astronaut:** Provides sample astronaut-related checklists and example drone control scripts. | ||
| - **Medical Information:** Provides a search link for a medical query on an authoritative website, with a strong disclaimer that it is not medical advice. | ||
|
|
||
| ## How to Use | ||
|
|
||
| ### Software Engineer | ||
| The Software Engineer agent can generate two types of code: | ||
| - **To build a website:** Use a simple, indented syntax to define the components of a website. | ||
| - **To generate a script:** Ask for a script in plain language, e.g., `a python script to print hello world`. | ||
|
|
||
| ### Debugger | ||
| The Debugger agent can analyze code in two ways: | ||
| 1. **Paste Code:** Paste your HTML or CSS code directly into the large text area. | ||
| 2. **Use a GitHub URL:** Paste the URL of a public file on GitHub into the smaller URL input field. | ||
|
|
||
| ### System Analyzer | ||
| Enter a full website URL (e.g., `https://example.com`) to scan the page for broken links. | ||
|
|
||
| ### Designer | ||
| The Designer agent can help you with visual assets and animations. | ||
| - **To find images/videos:** Use prompts like `a photo of a sunset` or `a video of the ocean`. | ||
| - **To generate animations:** Use prompts like `a script for a fade in animation`. | ||
| - **To get a color palette:** Use prompts like `suggest a color palette`. | ||
|
|
||
| ### Educator | ||
| Ask any question in the "Educator" text box to get a link to the Google search results. | ||
|
|
||
| ### Cybersecurity Analyst | ||
| Enter a full website URL (e.g., `https://example.com`) in the "Cybersecurity" input field to get a report on its security headers. | ||
|
|
||
| ### Business Developer | ||
| The Business agent can help you with your startup idea. | ||
| - **To generate a business plan:** Enter your startup idea, e.g., `an app for dog walkers`. | ||
| - **To get keyword ideas:** Enter a prompt including the word "keywords", e.g., `keywords for a dog walking app`. | ||
|
|
||
| ### Public Services | ||
| Ask for information on a supported public topic. The agent will return a list of helpful, authoritative links. | ||
| - **Supported topics:** `climate change`, `agriculture`, `biodiversity`. | ||
|
|
||
| ### Git Helper | ||
| The Git Helper provides a safe way to automate pull requests. It generates a script of commands for you to review and run in your own terminal. | ||
|
|
||
| ### Scam Tracker | ||
| Enter a URL in the "Scam Tracker" input field. The agent will analyze it for common red flags and provide a report. | ||
|
|
||
| ### Automation | ||
| The Automation agent provides example scripts and data for specialized, safety-critical domains. **Note: These are for educational purposes only and should not be used in real-world systems.** | ||
| - **To get a robotics script:** Use a prompt like `a robotics script to move forward`. | ||
| - **To get an aerospace checklist:** Use a prompt like `an aerospace pre-flight checklist`. | ||
| - **To get automotive data:** Use a prompt like `sample automotive CAN bus data`. | ||
|
|
||
| ### Astronaut | ||
| The Astronaut agent provides example checklists and scripts for aerospace topics. **Note: These are for educational purposes only and should not be used in real-world systems.** | ||
| - **To get a spacesuit checklist:** Use a prompt like `a spacesuit checklist`. | ||
| - **To get a drone control script:** Use a prompt like `a drone control script`. | ||
|
|
||
| ### Medical Information | ||
| Enter any medical-related query (e.g., `symptoms of a cold`) into the "Medical" input field. The agent will return a search link to an authoritative source. | ||
| - **IMPORTANT:** This agent is **not a doctor**. The information provided is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition. | ||
|
|
||
| ## Setup and Installation | ||
|
|
||
| ### Prerequisites | ||
| - Python 3.x | ||
| - `pip` for installing Python packages | ||
|
|
||
| ### Installation | ||
|
|
||
| 1. **Clone the repository:** | ||
| ```bash | ||
| git clone https://github.com/GYFX35/AI-services.git | ||
| cd AI-services | ||
| ``` | ||
|
|
||
| 2. **Install Python dependencies:** | ||
| ```bash | ||
| pip install -r backend/requirements.txt | ||
| ``` | ||
|
|
||
| ### Running the Application (Development) | ||
|
|
||
| 1. **Start the backend server:** | ||
| ```bash | ||
| python backend/main.py | ||
| ``` | ||
|
|
||
| 2. **Open your web browser:** | ||
| Navigate to `http://127.0.0.1:5000` to access the application. | ||
|
|
||
| ## Deployment (Production) | ||
|
|
||
| This application is ready to be deployed using Docker. | ||
|
|
||
| ### Prerequisites | ||
| - Docker installed and running. | ||
|
|
||
| ### Building the Docker Image | ||
| From the root of the project, run the following command to build the Docker image: | ||
| ```bash | ||
| docker build -t ai-agent . | ||
| ``` | ||
|
|
||
| ### Running the Docker Container | ||
| Once the image is built, you can run the application in a container with this command: | ||
| ```bash | ||
| docker run -p 8000:8000 ai-agent | ||
| ``` | ||
|
|
||
| The application will be available at `http://localhost:8000`. | ||
|
|
||
| ### Deploying to Heroku | ||
|
|
||
| This application is also ready to be deployed to Heroku. | ||
|
|
||
| #### Prerequisites | ||
| - A Heroku account. | ||
| - The Heroku CLI installed and logged in (`heroku login`). | ||
|
|
||
| #### Deployment Steps | ||
|
|
||
| 1. **Create a Heroku app:** | ||
| From the root of the project, run: | ||
| ```bash | ||
| heroku create your-app-name | ||
| ``` | ||
| (Replace `your-app-name` with a unique name for your application). | ||
|
|
||
| 2. **Push to Heroku:** | ||
| Heroku uses Git for deployments. Push your code to the `heroku` remote: | ||
| ```bash | ||
| git push heroku main | ||
| ``` | ||
| Heroku will automatically detect the Python application via the `requirements.txt` file and the `Procfile`, install dependencies, and start the Gunicorn server. | ||
|
|
||
| 3. **Open the application:** | ||
| Once the deployment is complete, you can open your live application in the browser: | ||
| ```bash | ||
| heroku open | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security (dockerfile.security.missing-user): By not specifying a USER, a program in the container may run as 'root'. This is a security hazard. If an attacker can control a process running as root, they may have control over the container. Ensure that the last USER in a Dockerfile is a USER other than 'root'.
Source: opengrep