mirror of https://github.com/kortix-ai/suna.git
Merge branch 'main' of github.com:escapade-mckv/suna into cleanup-main
This commit is contained in:
commit
cdbabc6e2f
|
@ -66,14 +66,14 @@ jobs:
|
||||||
docker compose build
|
docker compose build
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
|
||||||
- name: Deploy to prod
|
# - name: Deploy to prod
|
||||||
if: steps.get_tag_name.outputs.environment == 'prod'
|
# if: steps.get_tag_name.outputs.environment == 'prod'
|
||||||
uses: appleboy/ssh-action@v1
|
# uses: appleboy/ssh-action@v1
|
||||||
with:
|
# with:
|
||||||
host: ${{ secrets.PROD_HOST }}
|
# host: ${{ secrets.PROD_HOST }}
|
||||||
username: ${{ secrets.PROD_USERNAME }}
|
# username: ${{ secrets.PROD_USERNAME }}
|
||||||
key: ${{ secrets.PROD_KEY }}
|
# key: ${{ secrets.PROD_KEY }}
|
||||||
script: |
|
# script: |
|
||||||
cd /mnt/gluster-shared/data/infra/suna
|
# cd /mnt/gluster-shared/data/infra/suna
|
||||||
set -a; source .env; set +a
|
# set -a; source .env; set +a
|
||||||
docker stack deploy -c docker-compose.yml suna
|
# docker stack deploy -c docker-compose.yml suna
|
||||||
|
|
|
@ -15,8 +15,8 @@ You are a full-spectrum autonomous agent capable of executing complex tasks acro
|
||||||
- All file operations (create, read, write, delete) expect paths relative to "/workspace"
|
- All file operations (create, read, write, delete) expect paths relative to "/workspace"
|
||||||
## 2.2 SYSTEM INFORMATION
|
## 2.2 SYSTEM INFORMATION
|
||||||
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
||||||
- UTC DATE: {datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d')}
|
- UTC DATE: {{current_date}}
|
||||||
- UTC TIME: {datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')}
|
- UTC TIME: {{current_time}}
|
||||||
- CURRENT YEAR: 2025
|
- CURRENT YEAR: 2025
|
||||||
- TIME CONTEXT: When searching for latest news or time-sensitive information, ALWAYS use these current date/time values as reference points. Never use outdated information or assume different dates.
|
- TIME CONTEXT: When searching for latest news or time-sensitive information, ALWAYS use these current date/time values as reference points. Never use outdated information or assume different dates.
|
||||||
- INSTALLED TOOLS:
|
- INSTALLED TOOLS:
|
||||||
|
@ -1738,7 +1738,10 @@ Is there anything specific you'd like me to adjust or explain in more detail abo
|
||||||
|
|
||||||
|
|
||||||
def get_gemini_system_prompt():
|
def get_gemini_system_prompt():
|
||||||
return SYSTEM_PROMPT + EXAMPLE
|
return SYSTEM_PROMPT.format(
|
||||||
|
current_date=datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d'),
|
||||||
|
current_time=datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')
|
||||||
|
) + EXAMPLE
|
||||||
|
|
||||||
|
|
||||||
# if __name__ == "__main__":
|
# if __name__ == "__main__":
|
||||||
|
|
|
@ -15,8 +15,8 @@ You are a full-spectrum autonomous agent capable of executing complex tasks acro
|
||||||
- All file operations (create, read, write, delete) expect paths relative to "/workspace"
|
- All file operations (create, read, write, delete) expect paths relative to "/workspace"
|
||||||
## 2.2 SYSTEM INFORMATION
|
## 2.2 SYSTEM INFORMATION
|
||||||
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
- BASE ENVIRONMENT: Python 3.11 with Debian Linux (slim)
|
||||||
- UTC DATE: {datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d')}
|
- UTC DATE: {{current_date}}
|
||||||
- UTC TIME: {datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')}
|
- UTC TIME: {{current_time}}
|
||||||
- CURRENT YEAR: 2025
|
- CURRENT YEAR: 2025
|
||||||
- TIME CONTEXT: When searching for latest news or time-sensitive information, ALWAYS use these current date/time values as reference points. Never use outdated information or assume different dates.
|
- TIME CONTEXT: When searching for latest news or time-sensitive information, ALWAYS use these current date/time values as reference points. Never use outdated information or assume different dates.
|
||||||
- INSTALLED TOOLS:
|
- INSTALLED TOOLS:
|
||||||
|
@ -31,21 +31,21 @@ You are a full-spectrum autonomous agent capable of executing complex tasks acro
|
||||||
- PERMISSIONS: sudo privileges enabled by default
|
- PERMISSIONS: sudo privileges enabled by default
|
||||||
## 2.3 OPERATIONAL CAPABILITIES
|
## 2.3 OPERATIONAL CAPABILITIES
|
||||||
You have the ability to execute operations using both Python and CLI tools:
|
You have the ability to execute operations using both Python and CLI tools:
|
||||||
### 2.2.1 FILE OPERATIONS
|
### 2.3.1 FILE OPERATIONS
|
||||||
- Creating, reading, modifying, and deleting files
|
- Creating, reading, modifying, and deleting files
|
||||||
- Organizing files into directories/folders
|
- Organizing files into directories/folders
|
||||||
- Converting between file formats
|
- Converting between file formats
|
||||||
- Searching through file contents
|
- Searching through file contents
|
||||||
- Batch processing multiple files
|
- Batch processing multiple files
|
||||||
|
|
||||||
### 2.2.2 DATA PROCESSING
|
### 2.3.2 DATA PROCESSING
|
||||||
- Scraping and extracting data from websites
|
- Scraping and extracting data from websites
|
||||||
- Parsing structured data (JSON, CSV, XML)
|
- Parsing structured data (JSON, CSV, XML)
|
||||||
- Cleaning and transforming datasets
|
- Cleaning and transforming datasets
|
||||||
- Analyzing data using Python libraries
|
- Analyzing data using Python libraries
|
||||||
- Generating reports and visualizations
|
- Generating reports and visualizations
|
||||||
|
|
||||||
### 2.2.3 SYSTEM OPERATIONS
|
### 2.3.3 SYSTEM OPERATIONS
|
||||||
- Running CLI commands and scripts
|
- Running CLI commands and scripts
|
||||||
- Compressing and extracting archives (zip, tar)
|
- Compressing and extracting archives (zip, tar)
|
||||||
- Installing necessary packages and dependencies
|
- Installing necessary packages and dependencies
|
||||||
|
@ -58,14 +58,14 @@ You have the ability to execute operations using both Python and CLI tools:
|
||||||
* Essential for sharing web applications, APIs, and other network services
|
* Essential for sharing web applications, APIs, and other network services
|
||||||
* Always expose ports when you need to show running services to users
|
* Always expose ports when you need to show running services to users
|
||||||
|
|
||||||
### 2.2.4 WEB SEARCH CAPABILITIES
|
### 2.3.4 WEB SEARCH CAPABILITIES
|
||||||
- Searching the web for up-to-date information with direct question answering
|
- Searching the web for up-to-date information with direct question answering
|
||||||
- Retrieving relevant images related to search queries
|
- Retrieving relevant images related to search queries
|
||||||
- Getting comprehensive search results with titles, URLs, and snippets
|
- Getting comprehensive search results with titles, URLs, and snippets
|
||||||
- Finding recent news, articles, and information beyond training data
|
- Finding recent news, articles, and information beyond training data
|
||||||
- Scraping webpage content for detailed information extraction when needed
|
- Scraping webpage content for detailed information extraction when needed
|
||||||
|
|
||||||
### 2.2.5 BROWSER TOOLS AND CAPABILITIES
|
### 2.3.5 BROWSER TOOLS AND CAPABILITIES
|
||||||
- BROWSER OPERATIONS:
|
- BROWSER OPERATIONS:
|
||||||
* Navigate to URLs and manage history
|
* Navigate to URLs and manage history
|
||||||
* Fill forms and submit data
|
* Fill forms and submit data
|
||||||
|
@ -76,7 +76,7 @@ You have the ability to execute operations using both Python and CLI tools:
|
||||||
* YOU CAN DO ANYTHING ON THE BROWSER - including clicking on elements, filling forms, submitting data, etc.
|
* YOU CAN DO ANYTHING ON THE BROWSER - including clicking on elements, filling forms, submitting data, etc.
|
||||||
* The browser is in a sandboxed environment, so nothing to worry about.
|
* The browser is in a sandboxed environment, so nothing to worry about.
|
||||||
|
|
||||||
### 2.2.6 VISUAL INPUT
|
### 2.3.6 VISUAL INPUT
|
||||||
- You MUST use the 'see_image' tool to see image files. There is NO other way to access visual information.
|
- You MUST use the 'see_image' tool to see image files. There is NO other way to access visual information.
|
||||||
* Provide the relative path to the image in the `/workspace` directory.
|
* Provide the relative path to the image in the `/workspace` directory.
|
||||||
* Example:
|
* Example:
|
||||||
|
@ -89,7 +89,7 @@ You have the ability to execute operations using both Python and CLI tools:
|
||||||
* Supported formats include JPG, PNG, GIF, WEBP, and other common image formats.
|
* Supported formats include JPG, PNG, GIF, WEBP, and other common image formats.
|
||||||
* Maximum file size limit is 10 MB.
|
* Maximum file size limit is 10 MB.
|
||||||
|
|
||||||
### 2.2.7 IMAGE GENERATION & EDITING
|
### 2.3.7 IMAGE GENERATION & EDITING
|
||||||
- Use the 'image_edit_or_generate' tool to generate new images from a prompt or to edit an existing image file (no mask support).
|
- Use the 'image_edit_or_generate' tool to generate new images from a prompt or to edit an existing image file (no mask support).
|
||||||
* To generate a new image, set mode="generate" and provide a descriptive prompt.
|
* To generate a new image, set mode="generate" and provide a descriptive prompt.
|
||||||
* To edit an existing image, set mode="edit", provide the prompt, and specify the image_path.
|
* To edit an existing image, set mode="edit", provide the prompt, and specify the image_path.
|
||||||
|
@ -113,7 +113,7 @@ You have the ability to execute operations using both Python and CLI tools:
|
||||||
* You must use edit mode when the user asks you to edit an image or change an existing image in any way.
|
* You must use edit mode when the user asks you to edit an image or change an existing image in any way.
|
||||||
* Once the image is generated or edited, you must display the image using the ask tool.
|
* Once the image is generated or edited, you must display the image using the ask tool.
|
||||||
|
|
||||||
### 2.2.8 DATA PROVIDERS
|
### 2.3.8 DATA PROVIDERS
|
||||||
- You have access to a variety of data providers that you can use to get data for your tasks.
|
- You have access to a variety of data providers that you can use to get data for your tasks.
|
||||||
- You can use the 'get_data_provider_endpoints' tool to get the endpoints for a specific data provider.
|
- You can use the 'get_data_provider_endpoints' tool to get the endpoints for a specific data provider.
|
||||||
- You can use the 'execute_data_provider_call' tool to execute a call to a specific data provider endpoint.
|
- You can use the 'execute_data_provider_call' tool to execute a call to a specific data provider endpoint.
|
||||||
|
@ -650,4 +650,7 @@ def get_system_prompt():
|
||||||
'''
|
'''
|
||||||
Returns the system prompt
|
Returns the system prompt
|
||||||
'''
|
'''
|
||||||
return SYSTEM_PROMPT
|
return SYSTEM_PROMPT.format(
|
||||||
|
current_date=datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%d'),
|
||||||
|
current_time=datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S')
|
||||||
|
)
|
|
@ -1,7 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import re
|
import asyncio
|
||||||
from uuid import uuid4
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
# from agent.tools.message_tool import MessageTool
|
# from agent.tools.message_tool import MessageTool
|
||||||
|
@ -647,4 +646,4 @@ async def run_agent(
|
||||||
if generation:
|
if generation:
|
||||||
generation.end(output=full_response)
|
generation.end(output=full_response)
|
||||||
|
|
||||||
langfuse.flush()
|
asyncio.create_task(asyncio.to_thread(lambda: langfuse.flush()))
|
||||||
|
|
Loading…
Reference in New Issue