Skip to content

Commit 019f2dd

Browse files
committed
add examples
0 parents  commit 019f2dd

Some content is hidden

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

61 files changed

+3387
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.venv
2+
venv
3+
.env
4+
.idea
5+
.vscode
6+
.DS_Store
7+
**/__pycache__/
8+
swarmzero.db
9+
swarmzero-data
10+
.
11+
.anima/

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[![Twitter Follow](https://img.shields.io/twitter/follow/SwarmZeroAI?style=social)](https://twitter.com/SwarmZeroAI)
2+
[![](https://dcbadge.limes.pink/api/server/vnJvW4wZp9)](https://discord.gg/vnJvW4wZp9)
3+
4+
[![Website](https://img.shields.io/badge/website-swarmzero.ai-fdb022?style=for-the-badge)](https://swarmzero.ai)
5+
[![Doc](https://img.shields.io/badge/docs-docs.swarmzero.ai-fdb022?style=for-the-badge)](https://docs.swarmzero.ai)
6+
7+
![](./assets/logo_dark.png)
8+
9+
# examples
10+
Examples of how AI Agents and Swarms can be built on SwarmZero
11+
12+
https://swarmzero.ai

agents/dune_agent/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MODEL=gpt-4-turbo-preview
2+
OPENAI_API_KEY=
3+
DUNE_API_KEY=

agents/dune_agent/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Dune Agent
2+
This Dune Agent enables you to search for indexes and crypto narratives using the DUNE API, providing updated market data. You can access detailed insights into the ALPHA, Beta, and Gamma Indexes, as well as Daily, Weekly, Monthly, and Quarterly Crypto Narratives. This offers comprehensive and timely information on the latest crypto trends.
3+
4+
Source: https://dune.com/dyorcrypto/relative-strength-crypto-narrative
5+
6+
Built with [SwarmZero SDK](https://github.com/swarmzero/swarmzero).
7+
8+
9+
## Project Requirements
10+
- Python >= 3.11
11+
12+
## Setup
13+
- Create a new file called .env
14+
- Copy the contents of [.env.example](.env.example) into your new .env file
15+
- API keys for third party tools are not provided.
16+
- `OPENAI_API_KEY` from OpenAI
17+
18+
You can use other LLMs, in which case you can add a corresponding API key
19+
- `ANTHROPIC_API_KEY` from Anthropic
20+
- `MISTRAL_API_KEY` from Mistral
21+
- [All models supplied by Ollama](https://ollama.com/library)
22+
- Create a virtual Python environment
23+
```
24+
$ python -m venv ./venv
25+
```
26+
- Activate the Python virtual env.
27+
- Windows:
28+
- In cmd.exe: `venv\Scripts\activate.bat`
29+
- In PowerShell: `venv\Scripts\Activate.ps1`
30+
- Unix: `source venv/bin/activate`
31+
- Install dependencies.
32+
```
33+
$ pip install -r requirements.txt
34+
```
35+
36+
## Usage
37+
- Run it
38+
```
39+
(venv) $ python main.py
40+
```
41+
42+
43+
## Testing
44+
- Install the dev dependencies:
45+
```
46+
(venv) $ pip install -r requirements-dev.txt
47+
```
48+
- Run the test suite
49+
```
50+
$ pytest
51+
```
52+
- Run tests for a specific module
53+
```
54+
$ pytest tests/path/to/test_module.py
55+
```
56+
- Run with verbose output:
57+
```
58+
$ pytest -v
59+
```
60+
- Run with a detailed output of each test (including print statements):
61+
```
62+
$ pytest -s
63+
```
64+
65+
## More
66+
- Powered by [SwarmZero](https://swarmzero.ai).

0 commit comments

Comments
 (0)