Skip to content

Commit 7f39402

Browse files
committed
Merge branch 'refs/heads/main' into sql_tool
2 parents da14a29 + 343712a commit 7f39402

169 files changed

Lines changed: 8449 additions & 1688 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
pip install tox
3232
3333
- name: Run tests with tox
34-
run: tox
34+
run: tox -m quick # quick runs all 3.12 tests and then combines coverage
3535

3636
- name: Upload coverage to Codecov
3737
uses: codecov/codecov-action@v5

.github/workflows/python-testing.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
python-version: [3.10,3.11,3.12]
28+
python-version: ["3.10","3.11","3.12"] # versions need to be strings
2929

3030
steps:
3131
- uses: actions/checkout@v2
3232
- name: Set up Python
33-
uses: actions/setup-python@v2
33+
uses: actions/setup-python@v5
3434
with:
35-
python-version: '3.11' # Use a default Python version for running tox
35+
python-version: ${{ matrix.python-version }}
3636
- name: Install tox
3737
run: pip install tox
38+
- name: Install tox-gh-actions
39+
run: pip install tox-gh-actions # allows tox to get the current python version
3840
- name: Run tests with tox
39-
run: tox
41+
run: tox # we can't pass arguments to tox when using tox-gh-actions, so all frameworks happen in one run

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,13 @@ ex/
175175
**/ex/
176176
cookiecutter.json
177177

178+
tests/tmp
179+
178180
examples/tests/
179181
examples/tests/**/*
180182

181183
uv.lock
182184
.DS_Store
183185

186+
.python-version
187+

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
recursive-include agentstack/templates *
2+
recursive-include agentstack/frameworks/templates *
23
recursive-include agentstack/_tools *
34
include agentstack.json .env .env.example

README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@ agentstack init <project_name>
2727
AgentStack scaffolds your _agent stack_ - the tech stack that collectively is your agent
2828

2929
<p align='center'>
30-
<img src='https://github.com/AgentOps-AI/AgentStack/blob/7b40e53bf7300f69e3291c62d5b45e46ff818245/docs/images/the_agent_stack.png?raw=true' width='600' alt='agentstack init'>
30+
<img src='https://github.com/AgentOps-AI/AgentStack/blob/main/docs/images/the_agent_stack.png?raw=true' width='600' alt='agentstack init'>
3131
</p>
3232

33+
### Currently Supported Providers
34+
- **LLMs**: Most all notable LLMs and providers are supported via LiteLLM or LangChain
35+
- **Framework**: Currently supported frameworks include CrewAI, LangGraph, OpenAI Swarms and LlamaStack
36+
- Roadmap: Pydantic AI, Eliza, AG2 and Autogen
37+
- **Tools**: Maintaining the largest repository of framework-agnostic tools! All tools listed [here](https://docs.agentstack.sh/tools/community)
38+
- **Observability**: AgentOps baked in by default with first-tier support
39+
3340
### Get Started Immediately
3441

3542
You **don't** need to install or configure tools like LangChain or LlamaIndex.<br>
@@ -44,7 +51,7 @@ Create a project, and you're good to go.
4451
To create a new agent project, run:
4552

4653
```sh
47-
pip install agentstack
54+
uv pip install agentstack
4855
agentstack init <project_name>
4956
```
5057

@@ -56,10 +63,17 @@ Once the initialization is done, you can open your project folder:
5663

5764
```sh
5865
cd <your_agent_project>
66+
uv pip install
67+
```
68+
69+
then run the default agent!
70+
71+
```sh
72+
agentstack run
5973
```
6074

6175
### Templates
62-
Additionally, pre-built templates are available as a shortcut to building your project. [View the available templates]().
76+
Additionally, pre-built templates are available as a shortcut to building your project. [View the available templates](https://docs.agentstack.sh/templates).
6377

6478
## Building Agent Functionality
6579

@@ -101,33 +115,36 @@ Runs the agent project in development mode.<br>
101115

102116
- **No Lock-In:** You can customize your setup at any time. AgentStack is designed to make it easy to get the components you need running right off the bat; it's up to you what to do next.
103117

118+
- **Provider Agnosticism:** AgentStack is designed to be provider agnostic in all ways. This means especially that the framework layer of your agent stack should be interoperable with every other layer. Frameworks must still be supported by AgentStack. See supported frameworks above.
119+
104120
AgentStack is not designed to be a low-code solution to building agents. Instead it is a great head-start for starting an agent project from scratch.
105121

106122
## Roadmap
107123

108-
### Framework Agnosticism
109-
110-
Development of AgentStack is being done primarily on [CrewAI](https://crewai.com). We will soon be working to make AgentStack fully framework-agnostic, meaning that any supported multi-agent framework can be used for your project.
111-
112124
### Tools
113-
- Core Tools built by AgentStack
125+
- More [core tools](https://docs.agentstack.sh/tools/core) built by AgentStack
114126
- Preferred partners in the package directly
115127
- Community partner tools added through external repositories
116128

129+
### New Stack Layers
130+
- Prompting layer (DSPy)
131+
- Eval Layer
132+
- UI layer
133+
117134
### Other Features
118135
- Generated testing
119136
- Integrated benchmarking
120137
- Easy integration of tools for browsing, RAG, and more.
121138
- A fast interactive test runner with built-in support for coverage reporting.
122-
- A live development server that warns about common mistakes.
123-
- A build script to bundle your project for production.
139+
- A live development server that warns about common mistakes (in progress).
140+
- A build script to bundle your project for production (in progress).
124141

125142
## License
126143

127144
AgentStack is open source software [licensed as MIT](LICENSE).
128145

129146
## How to Contribute
130147

131-
AgentStack is a new project built by passionate AI agent developers! We'd love help making this tool better. Easy first issues are available, create new issues with feature ideas, or chat with us on our [Discord](https://discord.gg/JdWkh9tgTQ).
148+
AgentStack is a new project built by passionate AI agent developers! We'd love help making this tool better. Easy first issues are available, create new issues with feature ideas, or chat with us on our [Discord](https://discord.gg/JdWkh9tgTQ). Make sure you read our contributor documentation to familiarize yourself with the project at [How to Contribute](https://docs.agentstack.sh/contributing/how-to-contribute).
132149

133150
If you are an Agent Tool developer, feel free to create an issue or even a PR to add your tool to AgentStack.

agentstack/__init__.py

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,46 @@
99
from pathlib import Path
1010
from agentstack import conf
1111
from agentstack.utils import get_framework
12+
from agentstack.agents import get_agent, get_all_agents, get_all_agent_names
13+
from agentstack.tasks import get_task, get_all_tasks, get_all_task_names
1214
from agentstack.inputs import get_inputs
1315
from agentstack import frameworks
1416

1517
___all___ = [
16-
"conf",
17-
"tools",
18-
"get_tags",
19-
"get_framework",
20-
"get_inputs",
18+
"conf",
19+
"agent",
20+
"task",
21+
"tools",
22+
"get_tags",
23+
"get_framework",
24+
"get_agent",
25+
"get_all_agents",
26+
"get_all_agent_names",
27+
"get_task",
28+
"get_all_tasks",
29+
"get_all_task_names",
30+
"get_inputs",
2131
]
2232

33+
def agent(func):
34+
"""
35+
The `agent` decorator is used to mark a method that implements an Agent.
36+
"""
37+
def wrap(*args, **kwargs):
38+
"""Does not alter the function's behavior; this is just a marker."""
39+
return func(*args, **kwargs)
40+
return wrap
41+
42+
43+
def task(func):
44+
"""
45+
The `task` decorator is used to mark a method that implements a Task.
46+
"""
47+
def wrap(*args, **kwargs):
48+
"""Does not alter the function's behavior; this is just a marker."""
49+
return func(*args, **kwargs)
50+
return wrap
51+
2352

2453
def get_tags() -> list[str]:
2554
"""

agentstack/_tools/__init__.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ class ToolConfig(pydantic.BaseModel):
3333
@classmethod
3434
def from_tool_name(cls, name: str) -> 'ToolConfig':
3535
path = TOOLS_DIR / name / TOOLS_CONFIG_FILENAME
36-
if not os.path.exists(path): # TODO raise exceptions and handle message/exit in cli
37-
print(term_color(f'No known agentstack tool: {name}', 'red'))
38-
sys.exit(1)
36+
if not os.path.exists(path):
37+
raise ValidationError(f'No known agentstack tool: {name}')
3938
return cls.from_json(path)
4039

4140
@classmethod
@@ -44,11 +43,10 @@ def from_json(cls, path: Path) -> 'ToolConfig':
4443
try:
4544
return cls(**data)
4645
except pydantic.ValidationError as e:
47-
# TODO raise exceptions and handle message/exit in cli
48-
print(term_color(f"Error validating tool config JSON: \n{path}", 'red'))
46+
error_str = "Error validating tool config:\n"
4947
for error in e.errors():
50-
print(f"{' '.join([str(loc) for loc in error['loc']])}: {error['msg']}")
51-
sys.exit(1)
48+
error_str += f"{' '.join([str(loc) for loc in error['loc']])}: {error['msg']}\n"
49+
raise ValidationError(f"Error loading tool from {path}.\n{error_str}")
5250

5351
@property
5452
def type(self) -> type:

agentstack/_tools/composio/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"find_actions_by_tags"
1313
],
1414
"dependencies": [
15-
"composio>=1.0.0"
15+
"composio-core>=0.6.0"
1616
],
1717
"cta": "!!! Composio provides 150+ tools. Additional setup is required in agentstack/tools/composio/__init__.py"
1818
}

agentstack/_tools/file_read/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"category": "computer-control",
44
"tools": ["read_file"],
55
"description": "Read contents of files",
6-
"url": "https://github.com/AgentOps-AI/AgentStack/tree/main/agentstack/tools/file_read",
6+
"url": "https://docs.agentstack.sh/tools/tool/file_read",
77
"dependencies": []
88
}

agentstack/_tools/neon/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"dependencies": [
99
"neon-api>=0.1.5",
10-
"psycopg2-binary"
10+
"psycopg2-binary==2.9.10"
1111
],
1212
"tools": ["create_database", "execute_sql_ddl", "run_sql_query"],
1313
"cta": "Create an API key at https://www.neon.tech"

0 commit comments

Comments
 (0)