diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index b584416..c868cdc 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -35,9 +35,6 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} run: | - # Create temporary __init__.py for the meta-package build - echo "Creating temporary __init__.py..." - touch "./just_agents/__init__.py" # Install root project dependencies which will include subprojects poetry install --with dev diff --git a/.gitignore b/.gitignore index 4361a43..bac0baa 100644 --- a/.gitignore +++ b/.gitignore @@ -166,5 +166,4 @@ cython_debug/ .micromamba/ -*.egg-info -/config #ignore only config folder that tests write by mistake \ No newline at end of file +*.egg-info \ No newline at end of file diff --git a/bin/build.sh b/bin/build.sh index 3293c4a..5fd46d3 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -33,16 +33,25 @@ for package in "tools" "coding" "web" "router" "examples"; do build_package "$package" done -# Create temporary __init__.py for the meta-package build -echo "Creating temporary __init__.py..." -touch "./just_agents/__init__.py" - # Store the current directory CURRENT_DIR=$(pwd) +# Backup and modify pyproject.toml +echo "Modifying pyproject.toml for meta-package build..." +cp pyproject.toml pyproject.toml.bak +sed -i 's/package-mode = false/packages = \[{include = "just_agents"}\]/' pyproject.toml + +# Create temporary __init__.py +echo "Creating temporary __init__.py..." +touch "./just_agents/__init__.py" + # Build the meta-package build_package "./" +# Restore original pyproject.toml +echo "Restoring original pyproject.toml..." +mv pyproject.toml.bak pyproject.toml + # Return to the original directory before cleanup cd "$CURRENT_DIR" || exit 1 diff --git a/bin/publish.sh b/bin/publish.sh index 5800538..8e65e08 100755 --- a/bin/publish.sh +++ b/bin/publish.sh @@ -82,14 +82,17 @@ touch "./just_agents/__init__.py" # Store the current directory CURRENT_DIR=$(pwd) -# Temporarily modify pyproject.toml to use published versions -echo "Updating dependencies in pyproject.toml..." -sed -i.bak \ +# Temporarily modify pyproject.toml to use published versions and update package mode +echo "Updating dependencies and package mode in pyproject.toml..." +cp pyproject.toml pyproject.toml.bak +sed -i \ -e "s|{ path = \"core\", develop = true }|\"$version\"|g" \ -e "s|{ path = \"tools\", develop = true }|\"$version\"|g" \ -e "s|{ path = \"coding\", develop = true }|\"$version\"|g" \ -e "s|{ path = \"web\", develop = true }|\"$version\"|g" \ -e "s|{ path = \"router\", develop = true }|\"$version\"|g" \ + -e "s|{ path = \"examples\", develop = true }|\"$version\"|g" \ + -e 's/package-mode = false/packages = [{include = "just_agents"}]/' \ pyproject.toml # Finally publish the meta-package @@ -104,10 +107,10 @@ fi # Return to the original directory before cleanup cd "$CURRENT_DIR" || exit 1 -# Restore original pyproject.toml -echo "Restoring original pyproject.toml..." -mv pyproject.toml.bak pyproject.toml - # Clean up temporary __init__.py echo "Cleaning up temporary __init__.py..." -rm "./just_agents/__init__.py" \ No newline at end of file +rm "./just_agents/__init__.py" + +# Restore package mode in pyproject.toml +echo "Restoring original pyproject.toml..." +mv pyproject.toml.bak pyproject.toml \ No newline at end of file diff --git a/config/agent_profiles.yaml b/config/agent_profiles.yaml deleted file mode 100644 index e2c3df7..0000000 --- a/config/agent_profiles.yaml +++ /dev/null @@ -1,30 +0,0 @@ -agent_profiles: - SecretaryAgent: - autoload_from_yaml: false - backstory: Developed to assist in the understanding and documentation of AI agents. - class_qualname: just_agents.router.secretary_agent.SecretaryAgent - description: Generates concise and detail-rich profiles for AI agents. - expertise_domain: AI agent analysis and profiling - extra_dict: - personality_traits: Agent's personality traits go here - goal: To provide accurate and informative profiles based on available attributes. - knowledge_sources: [] - limitations: Limited to the information available up to October 2023; cannot access - external databases or APIs. - llm_options: - model: gpt-4o-mini - temperature: 0.0 - model_name: gpt-4o-mini - personality_traits: Skilled, detail-oriented, concise, informative - role: AI assistant specializing in analysis and description of AI agents - system_prompt: "\n You are a skilled AI assistant specializing in analysis\ - \ and description of AI agents. \n You are tasked with generation of a minimalistic\ - \ and concise yet detail-rich profile for an AI agent, based on the AVAILABLE_ATTRIBUTES,\ - \ \n including 'system_prompt', 'llm_options' and any other. Your task is\ - \ to fill in values of a JSON-formatted profile \n that matches the PROFILE_UPDATE_TEMPLATE\ - \ provided below. Values of the template describe what output is expected for\ - \ each field. \n Only populate fields based on the well-established information,\ - \ don't make up anything. \n Double-check that the output contains only a\ - \ valid JSON with all the fields specified in PROFILE_UPDATE_TEMPLATE. \n \ - \ Never include any additional text or explanations in your reply.\n " - task: Profile generation for AI agents based on specified attributes. diff --git a/examples/just_agents/examples/basic/agent_profiles.yaml b/examples/just_agents/examples/basic/agent_profiles.yaml index 1ddac4e..6747ea9 100644 --- a/examples/just_agents/examples/basic/agent_profiles.yaml +++ b/examples/just_agents/examples/basic/agent_profiles.yaml @@ -20,7 +20,7 @@ agent_profiles: type_annotation: description: returns number of letters in the word function: letter_count - package: examples.tools + package: examples.just_agents.examples.tools parameters: properties: letter: diff --git a/poetry.lock b/poetry.lock index 75ae7b1..7df312d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -969,6 +969,26 @@ requests = "*" type = "directory" url = "core" +[[package]] +name = "just-agents-examples" +version = "0.4.2" +description = "Just Agents - Examples code" +optional = false +python-versions = ">=3.10,<4.0" +files = [] +develop = true + +[package.dependencies] +just-agents-coding = ">=0.4.2" +just-agents-core = ">=0.4.2" +just-agents-router = ">=0.4.2" +just-agents-tools = ">=0.4.2" +just-agents-web = ">=0.4.2" + +[package.source] +type = "directory" +url = "examples" + [[package]] name = "just-agents-router" version = "0.4.2" @@ -2765,4 +2785,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<4.0" -content-hash = "e86a4447116fc2cd04123a58eb6e5e1ab1c5c859a12118a4bbcb89050b622cc5" +content-hash = "55b01e34749099e413f42046d5192df0a9d6e1434509cad49a4beb4c71f5130c" diff --git a/pyproject.toml b/pyproject.toml index e794150..4207596 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ maintainers = [ readme = "README.md" license = "MIT" keywords = ["python", "llm", "agents", "AI", "machine-learning"] -packages = [{include = "just_agents"}] +package-mode = false [tool.poetry.dependencies] python = ">=3.10,<4.0" @@ -24,6 +24,7 @@ just-agents-tools = { path = "tools", develop = true } just-agents-coding = { path = "coding", develop = true } just-agents-web = { path = "web", develop = true } just-agents-router = { path = "router", develop = true } +just-agents-examples = { path = "examples", develop = true } [tool.poetry.group.publish.dependencies] just-agents-core = "0.4.2" @@ -31,6 +32,7 @@ just-agents-tools = "0.4.2" just-agents-coding = "0.4.2" just-agents-web = "0.4.2" just-agents-router = "0.4.2" +just-agents-examples = "0.4.2" [tool.poetry.group.dev.dependencies] pytest = "^7.4.4"