stirrup 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stirrup/__init__.py +2 -0
- stirrup/clients/chat_completions_client.py +0 -3
- stirrup/clients/litellm_client.py +20 -11
- stirrup/clients/utils.py +6 -1
- stirrup/constants.py +6 -2
- stirrup/core/agent.py +206 -57
- stirrup/core/cache.py +479 -0
- stirrup/core/models.py +53 -7
- stirrup/prompts/base_system_prompt.txt +1 -1
- stirrup/skills/__init__.py +24 -0
- stirrup/skills/skills.py +145 -0
- stirrup/tools/__init__.py +2 -0
- stirrup/tools/calculator.py +1 -1
- stirrup/tools/code_backends/base.py +7 -0
- stirrup/tools/code_backends/docker.py +16 -4
- stirrup/tools/code_backends/e2b.py +32 -13
- stirrup/tools/code_backends/local.py +16 -4
- stirrup/tools/finish.py +1 -1
- stirrup/tools/user_input.py +130 -0
- stirrup/tools/web.py +1 -0
- stirrup/utils/logging.py +24 -0
- {stirrup-0.1.1.dist-info → stirrup-0.1.3.dist-info}/METADATA +36 -16
- stirrup-0.1.3.dist-info/RECORD +36 -0
- {stirrup-0.1.1.dist-info → stirrup-0.1.3.dist-info}/WHEEL +1 -1
- stirrup-0.1.1.dist-info/RECORD +0 -32
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: stirrup
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: The lightweight foundation for building agents
|
|
5
5
|
Keywords: ai,agent,llm,openai,anthropic,tools,framework
|
|
6
6
|
Author: Artificial Analysis, Inc.
|
|
@@ -54,7 +54,7 @@ Requires-Dist: e2b-code-interpreter>=2.3.0 ; extra == 'e2b'
|
|
|
54
54
|
Requires-Dist: litellm>=1.79.3 ; extra == 'litellm'
|
|
55
55
|
Requires-Dist: mcp>=1.9.0 ; extra == 'mcp'
|
|
56
56
|
Requires-Python: >=3.12
|
|
57
|
-
Project-URL: Documentation, https://artificialanalysis.
|
|
57
|
+
Project-URL: Documentation, https://stirrup.artificialanalysis.ai
|
|
58
58
|
Project-URL: Homepage, https://github.com/ArtificialAnalysis/Stirrup
|
|
59
59
|
Project-URL: Repository, https://github.com/ArtificialAnalysis/Stirrup
|
|
60
60
|
Provides-Extra: all
|
|
@@ -65,7 +65,7 @@ Provides-Extra: mcp
|
|
|
65
65
|
Description-Content-Type: text/markdown
|
|
66
66
|
|
|
67
67
|
<div align="center">
|
|
68
|
-
<a href="">
|
|
68
|
+
<a href="https://stirrup.artificialanalysis.ai">
|
|
69
69
|
<picture>
|
|
70
70
|
<img alt="Stirrup" src="https://github.com/ArtificialAnalysis/Stirrup/blob/048653717d8662b0b81d152a037995af1c926afc/assets/stirrup-banner.png?raw=true" width="700">
|
|
71
71
|
</picture>
|
|
@@ -79,7 +79,7 @@ Description-Content-Type: text/markdown
|
|
|
79
79
|
<p align="center">
|
|
80
80
|
<a href="https://pypi.python.org/pypi/stirrup"><img src="https://img.shields.io/pypi/v/stirrup" alt="PyPI version" /></a> <!--
|
|
81
81
|
--><a href="https://github.com/ArtificialAnalysis/Stirrup/blob/main/LICENSE"><img src="https://img.shields.io/github/license/ArtificialAnalysis/Stirrup" alt="License" /></a> <!--
|
|
82
|
-
--><a href="https://artificialanalysis.
|
|
82
|
+
--><a href="https://stirrup.artificialanalysis.ai"><img src="https://img.shields.io/badge/MkDocs-4F46E5?logo=materialformkdocs&logoColor=fff" alt="MkDocs" /></a>
|
|
83
83
|
</p>
|
|
84
84
|
|
|
85
85
|
|
|
@@ -96,6 +96,7 @@ Stirrup is a lightweight framework, or starting point template, for building age
|
|
|
96
96
|
- Code execution (local, Docker container, E2B sandbox)
|
|
97
97
|
- MCP client
|
|
98
98
|
- Document input and output
|
|
99
|
+
- **Skills system:** Extend agent capabilities with modular, domain-specific instruction packages
|
|
99
100
|
- **Flexible tool execution:** A generic `Tool` class allows easy tool definition and extension
|
|
100
101
|
- **Context management:** Automatically summarizes conversation history when approaching context limits
|
|
101
102
|
- **Flexible provider support:** Pre-built support for OpenAI-compatible APIs and LiteLLM, or bring your own client
|
|
@@ -105,16 +106,16 @@ Stirrup is a lightweight framework, or starting point template, for building age
|
|
|
105
106
|
|
|
106
107
|
```bash
|
|
107
108
|
# Core framework
|
|
108
|
-
|
|
109
|
+
pip install stirrup # or: uv add stirrup
|
|
109
110
|
|
|
110
111
|
# With all optional components
|
|
111
|
-
|
|
112
|
+
pip install 'stirrup[all]' # or: uv add 'stirrup[all]'
|
|
112
113
|
|
|
113
114
|
# Individual extras
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
pip install 'stirrup[litellm]' # or: uv add 'stirrup[litellm]'
|
|
116
|
+
pip install 'stirrup[docker]' # or: uv add 'stirrup[docker]'
|
|
117
|
+
pip install 'stirrup[e2b]' # or: uv add 'stirrup[e2b]'
|
|
118
|
+
pip install 'stirrup[mcp]' # or: uv add 'stirrup[mcp]'
|
|
118
119
|
```
|
|
119
120
|
|
|
120
121
|
## Quick Start
|
|
@@ -160,6 +161,24 @@ if __name__ == "__main__":
|
|
|
160
161
|
|
|
161
162
|
> **Note:** This example uses OpenRouter. Set `OPENROUTER_API_KEY` in your environment before running. Web search requires a `BRAVE_API_KEY`. The agent will still work without it, but web search will be unavailable.
|
|
162
163
|
|
|
164
|
+
## Full Customization
|
|
165
|
+
|
|
166
|
+
For using Stirrup as a foundation for your own fully customized agent, you can clone and import Stirrup locally:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Clone the repository
|
|
170
|
+
git clone https://github.com/ArtificialAnalysis/Stirrup.git
|
|
171
|
+
cd stirrup
|
|
172
|
+
|
|
173
|
+
# Install in editable mode
|
|
174
|
+
pip install -e . # or: uv venv && uv pip install -e .
|
|
175
|
+
|
|
176
|
+
# Or with all optional dependencies
|
|
177
|
+
pip install -e '.[all]' # or: uv venv && uv pip install -e '.[all]'
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
See the [Full Customization guide](https://stirrup.artificialanalysis.ai/extending/full-customization/) for more details.
|
|
181
|
+
|
|
163
182
|
## How It Works
|
|
164
183
|
|
|
165
184
|
- **`Agent`** - Configures and runs the agent loop until a finish tool is called or max turns reached
|
|
@@ -188,6 +207,7 @@ agent = Agent(client=client, name="deepseek_agent")
|
|
|
188
207
|
### LiteLLM (Anthropic, Google, etc.)
|
|
189
208
|
|
|
190
209
|
```python
|
|
210
|
+
# Ensure LiteLLM is added with: pip install 'stirrup[litellm]' # or: uv add 'stirrup[litellm]'
|
|
191
211
|
# Create LiteLLM client for Anthropic Claude
|
|
192
212
|
# See https://docs.litellm.ai/docs/providers for all supported providers
|
|
193
213
|
client = LiteLLMClient(
|
|
@@ -202,7 +222,7 @@ agent = Agent(
|
|
|
202
222
|
)
|
|
203
223
|
```
|
|
204
224
|
|
|
205
|
-
See [LiteLLM Example](https://artificialanalysis.
|
|
225
|
+
See [LiteLLM Example](https://stirrup.artificialanalysis.ai/examples/#litellm-multi-provider-support) or [Deepseek Example](https://stirrup.artificialanalysis.ai/examples/#openai-compatible-apis-deepseek-vllm-ollama) for complete examples.
|
|
206
226
|
|
|
207
227
|
## Default Tools
|
|
208
228
|
|
|
@@ -285,14 +305,14 @@ agent = Agent(
|
|
|
285
305
|
|
|
286
306
|
## Next Steps
|
|
287
307
|
|
|
288
|
-
- [Getting Started](https://artificialanalysis.
|
|
289
|
-
- [Core Concepts](https://artificialanalysis.
|
|
290
|
-
- [Examples](https://artificialanalysis.
|
|
291
|
-
- [Creating Tools](https://artificialanalysis.
|
|
308
|
+
- [Getting Started](https://stirrup.artificialanalysis.ai/getting-started/) - Installation and first agent tutorial
|
|
309
|
+
- [Core Concepts](https://stirrup.artificialanalysis.ai/concepts/) - Understand Agent, Tools, and Sessions
|
|
310
|
+
- [Examples](https://stirrup.artificialanalysis.ai/examples/) - Working examples for common patterns
|
|
311
|
+
- [Creating Tools](https://stirrup.artificialanalysis.ai/guides/tools/) - Build your own tools
|
|
292
312
|
|
|
293
313
|
## Documentation
|
|
294
314
|
|
|
295
|
-
Full documentation: [artificialanalysis.github.io/Stirrup](https://artificialanalysis.
|
|
315
|
+
Full documentation: [artificialanalysis.github.io/Stirrup](https://stirrup.artificialanalysis.ai)
|
|
296
316
|
|
|
297
317
|
Build and serve locally:
|
|
298
318
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
stirrup/__init__.py,sha256=4p5Rw7f_wdxVu1FJTgJROe0aTlnc8tOsainBEzDRGEY,1905
|
|
2
|
+
stirrup/clients/__init__.py,sha256=oO8VMHmbUhoxFyC0JLQs_kUFNSRlvTj5xz0FgzBb98E,405
|
|
3
|
+
stirrup/clients/chat_completions_client.py,sha256=P0VOGFQcfLIVf7zCGYbopQDjNVEJlpeLBeGvB87sQQg,7390
|
|
4
|
+
stirrup/clients/litellm_client.py,sha256=2ZrZKKAEV2dEFs6ze4qBl3it5VwiGH8s7wHVuHdw-uY,5507
|
|
5
|
+
stirrup/clients/utils.py,sha256=Z_8KiENDZVD9fChUm7PA-RLhvoChswHVQsjrHXlIfkg,5684
|
|
6
|
+
stirrup/constants.py,sha256=WpVPm2jRN2AqYMyoMYeJimiggoquP7M3IrcHNpduFF4,644
|
|
7
|
+
stirrup/core/__init__.py,sha256=ReBVl7B9h_FNkZ77vCx2xlfuK1JuQ0yTSXrEgc4tONU,39
|
|
8
|
+
stirrup/core/agent.py,sha256=2KxjuCy3scLRc59habPSZyYDCHL9a9--UcdFKYV-86w,56907
|
|
9
|
+
stirrup/core/cache.py,sha256=lAbbBJzgYInewoBBPMzNooroU2Q7JbF21riggfdIDa8,16697
|
|
10
|
+
stirrup/core/exceptions.py,sha256=CzLVAi7Ns-t9BWSkqQUCB7ypVHAesV2s4a09-i0NXyQ,213
|
|
11
|
+
stirrup/core/models.py,sha256=qMmpecRIl8sKdUePtoVChKA3rBHxzG8lI4ZvuLFHNzo,22553
|
|
12
|
+
stirrup/prompts/__init__.py,sha256=e4bpTktBaFPuO_bIW5DelGNWtT6_NIUqnD2lRv8n89I,796
|
|
13
|
+
stirrup/prompts/base_system_prompt.txt,sha256=D_UlDWEnG2yaPCMFrE7IqMHI8VCzi4BZ-GnuL3qs5q4,288
|
|
14
|
+
stirrup/prompts/message_summarizer.txt,sha256=uQoTxreMuC42rTGSZmoH1Dnj06WrEQb0gLkDvVMhosQ,1173
|
|
15
|
+
stirrup/prompts/message_summarizer_bridge.txt,sha256=sWbfnHtI6RWemBIyQsnqHMGpnU-E6FTbfUC6rvkEHLY,372
|
|
16
|
+
stirrup/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
stirrup/skills/__init__.py,sha256=BEcmdSskfBzx_QK4eKXECucndIKRjHXzzwwwsaez8k4,700
|
|
18
|
+
stirrup/skills/skills.py,sha256=qhA3HI55kaRqLyvn_56Cs71833Xacg-8qP7muHrwruE,4282
|
|
19
|
+
stirrup/tools/__init__.py,sha256=l8bKHZwPBZfBPgxQfLzOKyyzdfoF86NrgdmxhjYW09s,2790
|
|
20
|
+
stirrup/tools/calculator.py,sha256=Cckt-8TtltxtuyY_Hh0wOr8efUzBZzg7rG4dBpvpuRM,1293
|
|
21
|
+
stirrup/tools/code_backends/__init__.py,sha256=O3Rs76r0YcQ27voTrx_zuhIEFawK3b1TQdKi70MORG8,987
|
|
22
|
+
stirrup/tools/code_backends/base.py,sha256=5mQxbHoOvtTdiF1y1aVe4csodaCOGvHaVN5viRnUlUE,17250
|
|
23
|
+
stirrup/tools/code_backends/docker.py,sha256=Xx4aBZ1uXVznP0qV4tXL2PMMs-8QEPw1bIPvgPasEGk,30281
|
|
24
|
+
stirrup/tools/code_backends/e2b.py,sha256=4I5Aqas-4PVhYgMhIAQh3xcwl_0kGiUpo64UU9-awfE,14921
|
|
25
|
+
stirrup/tools/code_backends/local.py,sha256=snzbWHnZkVu1ibLLRyRVmi6U9-8407_A0sKbdDNyTe4,19600
|
|
26
|
+
stirrup/tools/finish.py,sha256=zdljSs77zMVkA2AGUfV05QmeLxz6JrwJF_ar02yvsVA,950
|
|
27
|
+
stirrup/tools/mcp.py,sha256=4wWYae95y8Bs7e36hHwnxRfVVj0PABrsRStw492lLaw,18749
|
|
28
|
+
stirrup/tools/user_input.py,sha256=XwK14FvRQly3vGwgNzPVGoSXfbco0WWaSVpTDyjV09E,4508
|
|
29
|
+
stirrup/tools/view_image.py,sha256=zazCpZMtLOD6lplLPYGNQ8JeYfc0oUDJoUUyVAp3AMU,3126
|
|
30
|
+
stirrup/tools/web.py,sha256=B-zp5i1WhjOOMAlYtnvU3N5hNYnJYm8qVXAtNx_ZaRw,12292
|
|
31
|
+
stirrup/utils/__init__.py,sha256=4kcuExrphSXqgxRgu1q8_Z6Rrb9aAZpIo4Xq4S9Twuk,230
|
|
32
|
+
stirrup/utils/logging.py,sha256=48rCzv7B15jiVM1JlKzwTSnGodbqGSKLlsZi9xRMmVM,35045
|
|
33
|
+
stirrup/utils/text.py,sha256=3lGlcXFzQ-Mclsbu7wJciG3CcHvQ_Sk98tqOZxYLlGw,479
|
|
34
|
+
stirrup-0.1.3.dist-info/WHEEL,sha256=KSLUh82mDPEPk0Bx0ScXlWL64bc8KmzIPNcpQZFV-6E,79
|
|
35
|
+
stirrup-0.1.3.dist-info/METADATA,sha256=EyJEJTRFzLoSXnkBPauFvskBgMwJDJ8O2Vm8HdJPdsI,12862
|
|
36
|
+
stirrup-0.1.3.dist-info/RECORD,,
|
stirrup-0.1.1.dist-info/RECORD
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
stirrup/__init__.py,sha256=Dol0Uui-gBslpplfEUrgxkqqJWr1ucZJej5finNvCeI,1869
|
|
2
|
-
stirrup/clients/__init__.py,sha256=oO8VMHmbUhoxFyC0JLQs_kUFNSRlvTj5xz0FgzBb98E,405
|
|
3
|
-
stirrup/clients/chat_completions_client.py,sha256=p_EeXqRuo6mWnzgMhy22SWdHE6_OXIRyABvCKgHdnu4,7586
|
|
4
|
-
stirrup/clients/litellm_client.py,sha256=J-HDv7ZZTkNYC-aeSNyd7xTDd_5r8DEeXOPz9eQMC7A,4985
|
|
5
|
-
stirrup/clients/utils.py,sha256=Yyeh6unQSvqgDTDhjpD5DoRu_wP_nWfsNv9DGXQwgo8,5452
|
|
6
|
-
stirrup/constants.py,sha256=h3NzsePJ4FKpImTpV5xtFeJarKb67jR_6n89tNOkQYs,523
|
|
7
|
-
stirrup/core/__init__.py,sha256=ReBVl7B9h_FNkZ77vCx2xlfuK1JuQ0yTSXrEgc4tONU,39
|
|
8
|
-
stirrup/core/agent.py,sha256=8nHlcyh5Ji3_vXSH6dPbKvFCV7Q7cmnJcSaj0Sy-zto,49158
|
|
9
|
-
stirrup/core/exceptions.py,sha256=CzLVAi7Ns-t9BWSkqQUCB7ypVHAesV2s4a09-i0NXyQ,213
|
|
10
|
-
stirrup/core/models.py,sha256=ONiCFC9NcoeArX4629n9s5FNLi02ynqZRiCxJbzhr1Q,21061
|
|
11
|
-
stirrup/prompts/__init__.py,sha256=e4bpTktBaFPuO_bIW5DelGNWtT6_NIUqnD2lRv8n89I,796
|
|
12
|
-
stirrup/prompts/base_system_prompt.txt,sha256=KZ2_JhJ91u4oMqRZvhuAp99nb6ZkXkJdVbIRN6drVME,348
|
|
13
|
-
stirrup/prompts/message_summarizer.txt,sha256=uQoTxreMuC42rTGSZmoH1Dnj06WrEQb0gLkDvVMhosQ,1173
|
|
14
|
-
stirrup/prompts/message_summarizer_bridge.txt,sha256=sWbfnHtI6RWemBIyQsnqHMGpnU-E6FTbfUC6rvkEHLY,372
|
|
15
|
-
stirrup/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
stirrup/tools/__init__.py,sha256=ohyeMvXb6oURiAyoHi0VmC9ksZSRyGleT341VNzHCy4,2714
|
|
17
|
-
stirrup/tools/calculator.py,sha256=JkuGmGZJtaKbC4vHVrIph4aTjlGcFMhhv5MB1ntqgv4,1278
|
|
18
|
-
stirrup/tools/code_backends/__init__.py,sha256=O3Rs76r0YcQ27voTrx_zuhIEFawK3b1TQdKi70MORG8,987
|
|
19
|
-
stirrup/tools/code_backends/base.py,sha256=Nx0tTDX4GKoBWQK2F953vSsFgWCcOd_1WNtYCA4FG4o,17021
|
|
20
|
-
stirrup/tools/code_backends/docker.py,sha256=xtQmAwGkXc9jKlrN2ydYn66HpQ8cQW1b-4bTmN87S4U,29616
|
|
21
|
-
stirrup/tools/code_backends/e2b.py,sha256=1V52m1pQ4uBjGRL9iBeJik2beWURLupODCFtAtng9sE,13696
|
|
22
|
-
stirrup/tools/code_backends/local.py,sha256=6KOn-4aoySHVElitqWX5yN_WDrpJkQlsgSif2q0hYi8,18903
|
|
23
|
-
stirrup/tools/finish.py,sha256=K_NxwOwdvncT2QTua2A_8lZ9MwK4WQQ5FL2gdUrE29c,936
|
|
24
|
-
stirrup/tools/mcp.py,sha256=4wWYae95y8Bs7e36hHwnxRfVVj0PABrsRStw492lLaw,18749
|
|
25
|
-
stirrup/tools/view_image.py,sha256=zazCpZMtLOD6lplLPYGNQ8JeYfc0oUDJoUUyVAp3AMU,3126
|
|
26
|
-
stirrup/tools/web.py,sha256=2yfBJsu8GgFI7Oh1dFlXwNaXth6WQfGpbJFU-rV-yuI,12261
|
|
27
|
-
stirrup/utils/__init__.py,sha256=4kcuExrphSXqgxRgu1q8_Z6Rrb9aAZpIo4Xq4S9Twuk,230
|
|
28
|
-
stirrup/utils/logging.py,sha256=3Li6MhjLJWwaXHDZ06EjgW42XDL6V3ZDt9rccV_ZYZ4,34292
|
|
29
|
-
stirrup/utils/text.py,sha256=3lGlcXFzQ-Mclsbu7wJciG3CcHvQ_Sk98tqOZxYLlGw,479
|
|
30
|
-
stirrup-0.1.1.dist-info/WHEEL,sha256=xDCZ-UyfvkGuEHPeI7BcJzYKIZzdqN8A8o1M5Om8IyA,79
|
|
31
|
-
stirrup-0.1.1.dist-info/METADATA,sha256=_E3BOVwTTtN5WzXOmcBWuE5KyjkeZx403X76OMksOh8,12132
|
|
32
|
-
stirrup-0.1.1.dist-info/RECORD,,
|