Skip to content

Commit d0d47e4

Browse files
authored
Merge pull request #187 from AgentOps-AI/tool-add-docs-clarify
tool add docs
2 parents c29d6a2 + 9f79179 commit d0d47e4

5 files changed

Lines changed: 14 additions & 38 deletions

File tree

.github/workflows/mintlify-check.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,21 @@ jobs:
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version: '18'
21-
cache: 'npm'
2221

2322
- name: Install Mintlify
2423
run: npm install -g mintlify
2524

26-
- name: Build documentation
25+
- name: Test documentation
2726
run: |
2827
cd docs
29-
mintlify build
30-
31-
- name: Check build status
32-
run: |
33-
if [ $? -eq 0 ]; then
34-
echo "Documentation build successful!"
28+
# If mintlify dev has errors, it will exit with status 1
29+
# If it starts successfully, kill it after 5 seconds
30+
timeout 5s mintlify dev || exit_status=$?
31+
if [ $exit_status -eq 124 ]; then
32+
# timeout exit code 124 means the process was killed after starting successfully
33+
echo "Documentation built successfully!"
34+
exit 0
3535
else
36-
echo "Documentation build failed!"
36+
echo "Documentation failed to build! Try running `mintlify dev` from the docs dir locally"
3737
exit 1
38-
fi
39-
40-
- name: Comment on PR if build fails
41-
if: failure()
42-
uses: actions/github-script@v7
43-
with:
44-
script: |
45-
github.rest.issues.createComment({
46-
issue_number: context.issue.number,
47-
owner: context.repo.owner,
48-
repo: context.repo.repo,
49-
body: '❌ Mintlify documentation build failed. Please check the build logs for details.'
50-
})
38+
fi

CONTRIBUTING.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,7 @@ The best place to engage in conversation about your contribution is in the Issue
2727
## Adding Tools
2828
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!
2929

30-
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:
31-
32-
1. Modify `agentstack/tools/tools.json`
33-
- Add your tool and relevant information to this file as appropriate.
34-
2. Create a config for your tool
35-
- As an example, look at `mem0.json`
36-
- AgentStack uses this to know what code to insert where. Follow the structure to add your tool.
37-
3. Create your implementation for each framework
38-
- In `agentstack/templates/<framework>/tools`, you'll see other implementations of tools.
39-
- Build your tool implementation for that framework. This file will be inserted in the user's project.
40-
- The tools that are exported from this file should be listed in the tool's config json.
41-
4. Manually test your tool integration by running `agentstack tools add <your_tool>` and ensure it behaves as expected.
30+
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).
4231

4332
## Before creating your PR
4433
Be sure that you are opening a PR using a branch other than `main` on your fork. This enables us

agentstack/update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def check_for_updates(update_requested: bool = False):
112112
if not update_requested and not should_update():
113113
return
114114

115-
print("Checking for updates...\n")
115+
print("Checking for updates...")
116116

117117
try:
118118
latest_version: Version = get_latest_version(AGENTSTACK_PACKAGE)

docs/contributing/adding-tools.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Adding tools is easy once you understand the project structure. A few things nee
2020
</Step>
2121
<Step title="Test your tool">
2222
Manually test your tool integration by running `agentstack tools add <your_tool>` and ensure it behaves as expected.
23+
<Note>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.</Note>
2324
</Step>
2425
<Step title="Open a PR to add your tool to the next release">
2526
</Step>

docs/development.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,4 @@ Repeat step 3.
9292
Try navigating to the root of your device and delete the ~/.mintlify folder.
9393
Then run `mintlify dev` again.
9494
</Accordion>
95-
</AccordionGroup>
96-
97-
Curious about what changed in a CLI version? [Check out the CLI changelog.](/changelog/command-line)
95+
</AccordionGroup>

0 commit comments

Comments
 (0)