From 03e1c07d48687d27e341a56312f06ca4a58ddc8a Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 3 Jan 2025 14:53:58 +0000 Subject: [PATCH 1/6] tool add docs --- CONTRIBUTING.md | 13 +------------ agentstack/update.py | 2 +- docs/contributing/adding-tools.mdx | 1 + 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5cbd7ec..85853997 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,18 +27,7 @@ The best place to engage in conversation about your contribution is in the Issue ## Adding Tools If you're reading this section, you probably have a product that AI agents can use as a tool. We're glad you're here! -Adding tools is easy once you understand the project structure. A few things need to be done for a tool to be considered completely supported: - -1. Modify `agentstack/tools/tools.json` - - Add your tool and relevant information to this file as appropriate. -2. Create a config for your tool - - As an example, look at `mem0.json` - - AgentStack uses this to know what code to insert where. Follow the structure to add your tool. -3. Create your implementation for each framework - - In `agentstack/templates//tools`, you'll see other implementations of tools. - - Build your tool implementation for that framework. This file will be inserted in the user's project. - - The tools that are exported from this file should be listed in the tool's config json. -4. Manually test your tool integration by running `agentstack tools add ` and ensure it behaves as expected. +Adding tools is easy once you understand the project structure. Our documentation for adding tools is available on our hosted docs [here](https://docs.agentstack.sh/contributing/adding-tools). ## Before creating your PR Be sure that you are opening a PR using a branch other than `main` on your fork. This enables us diff --git a/agentstack/update.py b/agentstack/update.py index 8a01792f..5099b282 100644 --- a/agentstack/update.py +++ b/agentstack/update.py @@ -112,7 +112,7 @@ def check_for_updates(update_requested: bool = False): if not update_requested and not should_update(): return - print("Checking for updates...\n") + print("Checking for updates...") try: latest_version: Version = get_latest_version(AGENTSTACK_PACKAGE) diff --git a/docs/contributing/adding-tools.mdx b/docs/contributing/adding-tools.mdx index 73791ddd..53c42b94 100644 --- a/docs/contributing/adding-tools.mdx +++ b/docs/contributing/adding-tools.mdx @@ -20,6 +20,7 @@ Adding tools is easy once you understand the project structure. A few things nee Manually test your tool integration by running `agentstack tools add ` and ensure it behaves as expected. + This must be done within an AgentStack project. To create your test project, run `agentstack init test_proj`, then `cd` into the project and try adding your tool. From 562e1b6f3d87157a782c9b8a1b953aa222e77be6 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 3 Jan 2025 14:57:49 +0000 Subject: [PATCH 2/6] remove gh message --- .github/workflows/mintlify-check.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/mintlify-check.yml b/.github/workflows/mintlify-check.yml index 2ba11b99..9516a933 100644 --- a/.github/workflows/mintlify-check.yml +++ b/.github/workflows/mintlify-check.yml @@ -35,16 +35,4 @@ jobs: else echo "Documentation build failed!" exit 1 - fi - - - name: Comment on PR if build fails - if: failure() - uses: actions/github-script@v7 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '❌ Mintlify documentation build failed. Please check the build logs for details.' - }) \ No newline at end of file + fi \ No newline at end of file From d6f2d8a10f1a8d5c6e26c091a3dfd1657e9f83ad Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 3 Jan 2025 15:08:28 +0000 Subject: [PATCH 3/6] dont use npm cache --- .github/workflows/mintlify-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/mintlify-check.yml b/.github/workflows/mintlify-check.yml index 9516a933..31444792 100644 --- a/.github/workflows/mintlify-check.yml +++ b/.github/workflows/mintlify-check.yml @@ -18,7 +18,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18' - cache: 'npm' - name: Install Mintlify run: npm install -g mintlify From 6c433826b7834226c186cfd37e9f9713bea73b94 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 3 Jan 2025 15:12:05 +0000 Subject: [PATCH 4/6] remove broken link --- .github/workflows/mintlify-check.yml | 3 ++- docs/development.mdx | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mintlify-check.yml b/.github/workflows/mintlify-check.yml index 31444792..a125c6ce 100644 --- a/.github/workflows/mintlify-check.yml +++ b/.github/workflows/mintlify-check.yml @@ -25,7 +25,8 @@ jobs: - name: Build documentation run: | cd docs - mintlify build + mintlify broken-links + mintlify dev - name: Check build status run: | diff --git a/docs/development.mdx b/docs/development.mdx index 0ba0c593..b8fb9d3d 100644 --- a/docs/development.mdx +++ b/docs/development.mdx @@ -92,6 +92,4 @@ Repeat step 3. Try navigating to the root of your device and delete the ~/.mintlify folder. Then run `mintlify dev` again. - - -Curious about what changed in a CLI version? [Check out the CLI changelog.](/changelog/command-line) + \ No newline at end of file From 983318c5fd2c1f4a8d015f4c6c1d4ae1a2500b82 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 3 Jan 2025 16:38:10 +0000 Subject: [PATCH 5/6] use dev better --- .github/workflows/mintlify-check.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mintlify-check.yml b/.github/workflows/mintlify-check.yml index a125c6ce..abaf0b98 100644 --- a/.github/workflows/mintlify-check.yml +++ b/.github/workflows/mintlify-check.yml @@ -22,17 +22,17 @@ jobs: - name: Install Mintlify run: npm install -g mintlify - - name: Build documentation + - name: Test documentation run: | cd docs - mintlify broken-links - mintlify dev - - - name: Check build status - run: | - if [ $? -eq 0 ]; then - echo "Documentation build successful!" + # If mintlify dev has errors, it will exit with status 1 + # If it starts successfully, kill it after 5 seconds + timeout 5s mintlify dev || exit_status=$? + if [ $exit_status -eq 124 ]; then + # timeout exit code 124 means the process was killed after starting successfully + echo "Mintlify dev started successfully!" + exit 0 else - echo "Documentation build failed!" + echo "Mintlify dev failed to start" exit 1 fi \ No newline at end of file From 9f791792e66fdb3eaaf1283f6a3943a8ba5e002f Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Fri, 3 Jan 2025 16:42:29 +0000 Subject: [PATCH 6/6] better action message --- .github/workflows/mintlify-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mintlify-check.yml b/.github/workflows/mintlify-check.yml index abaf0b98..377f6e8d 100644 --- a/.github/workflows/mintlify-check.yml +++ b/.github/workflows/mintlify-check.yml @@ -30,9 +30,9 @@ jobs: timeout 5s mintlify dev || exit_status=$? if [ $exit_status -eq 124 ]; then # timeout exit code 124 means the process was killed after starting successfully - echo "Mintlify dev started successfully!" + echo "Documentation built successfully!" exit 0 else - echo "Mintlify dev failed to start" + echo "Documentation failed to build! Try running `mintlify dev` from the docs dir locally" exit 1 fi \ No newline at end of file