Skip to content
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

improve template arg to accept remote and local json files #129

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bmacer
Copy link
Contributor

@bmacer bmacer commented Dec 11, 2024

📥 Pull Request

📘 Description
Addresses #90

  • Accept a local .json file as a template
  • Accept a remote https file as a template
  • Check for existence of these files, with decent error messages
  • Improve error messaging when using built-in template

🧪 Testing

Remote file doesn't exist:

agentstack init --template=https://raw.githubusercontent.com/AgentOps-AI/AgentStack/refs/heads/main/agentstack/templates/proj_templates/research2.json
Failed to fetch template data from https://raw.githubusercontent.com/AgentOps-AI/AgentStack/refs/heads/main/agentstack/templates/proj_templates/research2.json

Local file doesn't exist:

agentstack init --template=local-template-file-doesnt-exist.json
Template file does not exist: /Users/bmacer/Desktop/home/agentstack/newAgentStack/AgentStack/local-template-file-doesnt-exist.json

Remote file does exist:

agentstack init --template=https://raw.githubusercontent.com/AgentOps-AI/AgentStack/refs/heads/main/agentstack/templates/proj_templates/research.json

🚀 AgentStack project generated successfully!

  Next, run:
    cd research
    python -m venv .venv
    source .venv/bin/activate
    poetry install

  Add agents and tasks with:
    `agentstack generate agent/task <name>`

  Run your agent with:
    agentstack run

  Run `agentstack quickstart` or `agentstack docs` for next steps.

🔨 Tool perplexity added to agentstack project successfully

Local file does exist:

agentstack init --template=system_analyzer.json

🚀 AgentStack project generated successfully!

  Next, run:
    cd system_analyzer
    python -m venv .venv
    source .venv/bin/activate
    poetry install

  Add agents and tasks with:
    `agentstack generate agent/task <name>`

  Run your agent with:
    agentstack run

  Run `agentstack quickstart` or `agentstack docs` for next steps.

🔨 Tool directory_search added to agentstack project successfully
🔨 Tool file_read added to agentstack project successfully
🔨 Tool code_interpreter added to agentstack project successfully

Built-in template does exist:

python -m agentstack.main init --template=content_creator

🚀 AgentStack project generated successfully!

  Next, run:
    cd content_creator
    python -m venv .venv
    source .venv/bin/activate
    poetry install

  Add agents and tasks with:
    `agentstack generate agent/task <name>`

  Run your agent with:
    agentstack run

  Run `agentstack quickstart` or `agentstack docs` for next steps.

🔨 Tool perplexity added to agentstack project successfully

Built-in template doesn't exist:

agentstack init --template=template-doesnt-exist
No known built-in template: template-doesnt-exist
Available built-in templates:
content_creator
research
system_analyzer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant