Skip to content

Commit f57501f

Browse files
committed
Merge branch 'main' into devin/1734735936-add-weaviate-tool
2 parents de1577f + 71fc741 commit f57501f

130 files changed

Lines changed: 10251 additions & 874 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codecov.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Codecov
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'agentstack/**/*.py'
9+
pull_request:
10+
branches:
11+
- main
12+
paths:
13+
- 'agentstack/**/*.py'
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.11
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install tox
32+
33+
- name: Run tests with tox
34+
run: tox
35+
36+
- name: Upload coverage to Codecov
37+
uses: codecov/codecov-action@v5
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
files: ./coverage.xml
41+
flags: unittests
42+
name: codecov-umbrella
43+
fail_ci_if_error: true

.github/workflows/deploy.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,43 @@ jobs:
1818
python-version: '3.9'
1919

2020
- name: Install dependencies
21-
run: pip install build twine
21+
run: pip install build twine toml
2222

2323
- name: Build the package
2424
run: python -m build
2525

26+
- name: Check version matches
27+
run: |
28+
import toml
29+
import os
30+
import sys
31+
32+
# Read pyproject.toml
33+
with open('pyproject.toml', 'r') as f:
34+
pyproject = toml.load(f)
35+
36+
# Get version from pyproject.toml
37+
project_version = pyproject['project']['version']
38+
39+
# Get release tag (strip 'v' prefix if present)
40+
github_ref = os.environ['GITHUB_REF']
41+
tag_version = github_ref.split('/')[-1]
42+
if tag_version.startswith('v'):
43+
tag_version = tag_version[1:]
44+
45+
print(f"pyproject.toml version: {project_version}")
46+
print(f"Release tag version: {tag_version}")
47+
48+
# Compare versions
49+
if project_version != tag_version:
50+
print("Version mismatch!")
51+
print(f"pyproject.toml version ({project_version}) does not match")
52+
print(f"release tag version ({tag_version})")
53+
sys.exit(1)
54+
55+
print("Versions match!")
56+
shell: python
57+
2658
- name: Upload to PyPI
2759
env:
2860
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Mintlify Documentation Check
2+
on:
3+
pull_request:
4+
paths:
5+
- 'docs/**' # Only trigger on changes to docs directory
6+
- 'mint.json' # Also trigger on mintlify config changes
7+
8+
jobs:
9+
build-docs:
10+
name: Build Documentation
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
22+
- name: Install Mintlify
23+
run: npm install -g mintlify
24+
25+
- name: Test documentation
26+
run: |
27+
cd docs
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
35+
else
36+
echo "Documentation failed to build! Try running `mintlify dev` from the docs dir locally"
37+
exit 1
38+
fi

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ cython_debug/
162162
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163163
.idea/
164164

165+
# aider
166+
.aider*
167+
168+
# VSCode
169+
.vscode
170+
165171
# AgentStack
172+
.agentstack*
166173
example_project/
167174
ex/
168175
**/ex/
@@ -171,5 +178,6 @@ cookiecutter.json
171178
examples/tests/
172179
examples/tests/**/*
173180

181+
uv.lock
174182
.DS_Store
175183

CONTRIBUTING.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ First of all, __thank you__ for your interest in contributing to AgentStack! Eve
33

44
Our vision is to build the defacto CLI for quickly spinning up an AI Agent project. We want to be the [create-react-app](https://create-react-app.dev/) of agents. Our inspiration also includes the oh-so-convenient [Angular CLI](https://v17.angular.io/cli).
55

6+
### Exclusive Contributor Sticker
7+
AgentStack contributors all receive a free sticker pack including an exclusive holographic sticker only available to contributors to the project :)
8+
9+
Once your PR is merge, fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLSfvBEnsT8nsQleonJHoWQtHuhbsgUJ0a9IjOqeZbMGkga2NtA/viewform?usp=sf_link) and I'll send your sticker pack out ASAP! <3
10+
611
## How to Help
712

813
Grab an issue from the [issues tab](https://github.com/AgentOps-AI/AgentStack/issues)! Plenty are labelled "Good First Issue". Fork the repo and create a PR when ready!
@@ -12,28 +17,17 @@ The best place to engage in conversation about your contribution is in the Issue
1217
## Setup
1318

1419
1. Clone the repo
15-
2. `poetry install`
16-
3. `pip install -e .[dev,test]`
17-
- This will install the CLI locally and in editable mode so you can use `agentstack <command>` to test your latest changes
20+
`git clone https://github.com/AgentOps-AI/AgentStack.git`
21+
`cd AgentStack`
22+
2. Install agentstack as an edtiable project and set it up for development and testing
23+
`pip install -e .[dev,test]`
24+
This will install the CLI locally and in editable mode so you can use `agentstack <command>` to test your latest changes
1825

19-
## Project Structure
20-
TODO
2126

2227
## Adding Tools
2328
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!
2429

25-
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:
26-
27-
1. Modify `agentstack/tools/tools.json`
28-
- Add your tool and relevant information to this file as appropriate.
29-
2. Create a config for your tool
30-
- As an example, look at `mem0.json`
31-
- AgentStack uses this to know what code to insert where. Follow the structure to add your tool.
32-
3. Create your implementation for each framework
33-
- In `agentstack/templates/<framework>/tools`, you'll see other implementations of tools.
34-
- Build your tool implementation for that framework. This file will be inserted in the user's project.
35-
- The tools that are exported from this file should be listed in the tool's config json.
36-
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).
3731

3832
## Before creating your PR
3933
Be sure that you are opening a PR using a branch other than `main` on your fork. This enables us
@@ -59,4 +53,33 @@ pre-commit install
5953
```
6054

6155
## Tests
62-
HAHAHAHAHAHAHA good one
56+
CLI tests are a bit hacky, so we are not tracking coverage.
57+
That said, _some_ testing is required for any new functionality added by a PR.
58+
59+
Tests MUST pass to have your PR merged. We _will not_ allow main to be in a failing state, so if your tests are failing, this is your problem to fix.
60+
61+
### Run tests locally
62+
Install the testing requirements
63+
```bash
64+
pip install 'agentstack[test]'
65+
```
66+
67+
Then run tests in all supported python versions with
68+
```bash
69+
tox
70+
```
71+
72+
## Need Help?
73+
If you're reading this, we're very thankful you wanted to contribute! I understand it can be a little overwhelming to
74+
get up to speed on a project like this and we are here to help!
75+
76+
### Open a draft PR
77+
While we can't promise to write code for you, if you're stuck or need advice/help, open a draft PR and explain what you were trying to build and where you're stuck! Chances are, one of us have the context needed to help you get unstuck :)
78+
79+
### Chat on our Discord
80+
We have an active [Discord server](https://discord.gg/JdWkh9tgTQ) with contributors and AgentStack users! There is a channel just for contributors on there. Feel free to drop a message explaining what you're trying to build and why you're stuck. Someone from our team should reply soon!
81+
82+
# Thank You!
83+
The team behind AgentStack believe that the barrier to entry for building agents is far too high right now! We believe that this technology can be streamlined and made more accessible. If you're here, you likely feel the same! Any contribution is appreciated.
84+
85+
If you're looking for work, we are _always_ open to hiring passionate engineers of all skill levels! While closing issues cannot guarantee an offer, we've found that engineers who contribute to our open source repo are some of the best we could ever hope to find via recruiters! Be active in the community and let us know you're interested in joining the team!

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
recursive-include agentstack/templates *
2-
recursive-include agentstack/tools *
2+
recursive-include agentstack/_tools *
33
include agentstack.json .env .env.example

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AgentStack [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/release/python-3100/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1+
# AgentStack [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/release/python-3100/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![python-testing](https://github.com/agentops-ai/agentstack/actions/workflows/python-testing.yml/badge.svg) ![mypy](https://github.com/agentops-ai/agentstack/actions/workflows/mypy.yml/badge.svg) [![codecov.io](https://codecov.io/github/agentops-ai/agentstack/coverage.svg?branch=master)](https://codecov.io/github/agentops-ai/agentstack>?branch=master)
22

33
<img alt="Logo" align="right" src="https://raw.githubusercontent.com/bboynton97/agentstack-docs/3491fe490ea535e7def74c83182dfa8dcfb1f562/logo/dark-sm.svg" width="20%" />
44

@@ -24,9 +24,10 @@ pip install agentstack
2424
agentstack init <project_name>
2525
```
2626

27+
AgentStack scaffolds your _agent stack_ - the tech stack that collectively is your agent
2728

2829
<p align='center'>
29-
<img src='https://raw.githubusercontent.com/agentops-ai/agentstack/main/stack.png' width='600' alt='agentstack init'>
30+
<img src='https://github.com/AgentOps-AI/AgentStack/blob/7b40e53bf7300f69e3291c62d5b45e46ff818245/docs/images/the_agent_stack.png?raw=true' width='600' alt='agentstack init'>
3031
</p>
3132

3233
### Get Started Immediately

agentstack/__init__.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""
2-
This it the beginning of the agentstack public API.
2+
This it the beginning of the agentstack public API.
33
44
Methods that have been imported into this file are expected to be used by the
5-
end user inside of their project.
5+
end user inside of their project.
66
"""
7+
78
from typing import Callable
89
from pathlib import Path
910
from agentstack import conf
@@ -12,11 +13,11 @@
1213
from agentstack import frameworks
1314

1415
___all___ = [
15-
"conf",
16-
"tools",
17-
"get_tags",
18-
"get_framework",
19-
"get_inputs",
16+
"conf",
17+
"tools",
18+
"get_tags",
19+
"get_framework",
20+
"get_inputs",
2021
]
2122

2223

@@ -29,14 +30,15 @@ def get_tags() -> list[str]:
2930

3031
class ToolLoader:
3132
"""
32-
Provides the public interface for accessing tools, wrapped in the
33-
framework-specific callable format.
34-
33+
Provides the public interface for accessing tools, wrapped in the
34+
framework-specific callable format.
35+
3536
Get a tool's callables by name with `agentstack.tools[tool_name]`
3637
Include them in your agent's tool list with `tools = [*agentstack.tools[tool_name], ]`
3738
"""
39+
3840
def __getitem__(self, tool_name: str) -> list[Callable]:
3941
return frameworks.get_tool_callables(tool_name)
4042

41-
tools = ToolLoader()
4243

44+
tools = ToolLoader()

0 commit comments

Comments
 (0)