Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs authored Jan 1, 2025
2 parents 2846757 + e499e47 commit 5a81293
Show file tree
Hide file tree
Showing 18 changed files with 589 additions and 192 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/codecov.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/python-testing.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# :: Use nektos/act to run this locally
# :: Example:
# :: `act push -j python-tests --matrix python-version:3.10 --container-architecture linux/amd64`
name: Python Tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'agentops/**/*.py'
- 'agentops/**/*.ipynb'
- 'tests/**/*.py'
- 'tests/**/*.ipynb'
pull_request:
branches:
- main
paths:
- 'agentops/**/*.py'
- 'agentops/**/*.ipynb'
- 'tests/**/*.py'
- 'tests/**/*.ipynb'

jobs:
python-tests:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Setup UV
uses: astral-sh/setup-uv@v5
continue-on-error: true
with:
python-version: ${{ matrix.python-version }}
cache-prefix: uv-${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"

- name: Install dependencies
run: |
uv sync --group test --group dev
- name: Run tests with coverage
timeout-minutes: 10
run: |
uv run -m pytest tests/ -v --cov=agentops --cov-report=xml
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AGENTOPS_API_KEY: ${{ secrets.AGENTOPS_API_KEY }}
PYTHONUNBUFFERED: "1"

# Only upload coverage report for python3.11
- name: Upload coverage to Codecov
if: ${{matrix.python-version == '3.11'}}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true # Should we?
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,36 @@ AgentOps provides support for Llama Stack Python Client(>=0.0.53), allowing you
- [AgentOps integration example 2](https://github.com/AgentOps-AI/agentops/pull/530/files/65a5ab4fdcf310326f191d4b870d4f553591e3ea#diff-6688ff4fb7ab1ce7b1cc9b8362ca27264a3060c16737fb1d850305787a6e3699)
- [Official Llama Stack Python Client](https://github.com/meta-llama/llama-stack-client-python)

### SwarmZero AI 🐝

Track and analyze SwarmZero agents with full observability. Set an `AGENTOPS_API_KEY` in your environment and initialize AgentOps to get started.

- [SwarmZero](https://swarmzero.ai) - Advanced multi-agent framework
- [AgentOps integration example](https://docs.agentops.ai/v1/integrations/swarmzero)
- [SwarmZero AI integration example](https://docs.swarmzero.ai/examples/ai-agents/build-and-monitor-a-web-search-agent)
- [SwarmZero AI - AgentOps documentation](https://docs.swarmzero.ai/sdk/observability/agentops)
- [Official SwarmZero Python SDK](https://github.com/swarmzero/swarmzero)

<details>
<summary>Installation</summary>

```bash
pip install swarmzero
pip install agentops
```

```python
from dotenv import load_dotenv
load_dotenv()

import agentops
agentops.init(<INSERT YOUR API KEY HERE>)

from swarmzero import Agent, Swarm
# ...
```
</details>

## Time travel debugging 🔮

<div style="justify-content: center">
Expand Down Expand Up @@ -746,6 +776,7 @@ Check out our growth in the community:
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/162546372?s=40&v=4" width="20" height="20" alt=""> &nbsp; [BasedHardware](https://github.com/BasedHardware) / [Omi](https://github.com/BasedHardware/Omi) | 2723 |
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/454862?s=40&v=4" width="20" height="20" alt=""> &nbsp; [MervinPraison](https://github.com/MervinPraison) / [PraisonAI](https://github.com/MervinPraison/PraisonAI) | 2007 |
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/140554352?s=40&v=4" width="20" height="20" alt=""> &nbsp; [AgentOps-AI](https://github.com/AgentOps-AI) / [Jaiqu](https://github.com/AgentOps-AI/Jaiqu) | 272 |
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/173542722?s=48&v=4" width="20" height="20" alt=""> &nbsp; [swarmzero](https://github.com/swarmzero) / [swarmzero](https://github.com/swarmzero/swarmzero) | 195 |
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/3074263?s=40&v=4" width="20" height="20" alt=""> &nbsp; [strnad](https://github.com/strnad) / [CrewAI-Studio](https://github.com/strnad/CrewAI-Studio) | 134 |
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/18406448?s=40&v=4" width="20" height="20" alt=""> &nbsp; [alejandro-ao](https://github.com/alejandro-ao) / [exa-crewai](https://github.com/alejandro-ao/exa-crewai) | 55 |
|<img class="avatar mr-2" src="https://avatars.githubusercontent.com/u/64493665?s=40&v=4" width="20" height="20" alt=""> &nbsp; [tonykipkemboi](https://github.com/tonykipkemboi) / [youtube_yapper_trapper](https://github.com/tonykipkemboi/youtube_yapper_trapper) | 47 |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import inspect
import pprint
import sys
from typing import Any, AsyncGenerator, Dict, Optional, List
from typing import Any, AsyncGenerator, Dict, Optional, List, Union
import logging
from typing import Union

from agentops.event import LLMEvent, ErrorEvent, ToolEvent
from agentops.session import Session
Expand Down
3 changes: 1 addition & 2 deletions agentops/llms/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from packaging.version import Version, parse

from agentops.llms.llama_stack_client import LlamaStackClientProvider

from ..log_config import logger

from .providers.cohere import CohereProvider
Expand All @@ -16,6 +14,7 @@
from .providers.anthropic import AnthropicProvider
from .providers.mistral import MistralProvider
from .providers.ai21 import AI21Provider
from .providers.llama_stack_client import LlamaStackClientProvider
from .providers.taskweaver import TaskWeaverProvider

original_func = {}
Expand Down
4 changes: 3 additions & 1 deletion agentops/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,9 @@ def _update_session(self) -> None:
"""Update session state on the server"""
if not self.is_running:
return
with self._lock: # TODO: Determine whether we really need to lock here: are incoming calls coming from other threads?

# TODO: Determine whether we really need to lock here: are incoming calls coming from other threads?
with self._lock:
payload = {"session": self.__dict__}

try:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"v1/integrations/ollama",
"v1/integrations/openai",
"v1/integrations/rest",
"v1/integrations/swarmzero",
"v1/integrations/taskweaver",
"v1/integrations/xai"
]
Expand Down
4 changes: 4 additions & 0 deletions docs/v1/examples/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ mode: "wide"
Create a REST server that performs and observes agent tasks
</Card>

<Card title="SwarmZero" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/swarmzero/swarmzero_logo.png?raw=true" alt="SwarmZero" />} iconType="image" href="/v1/integrations/swarmzero">
SwarmZero multi-agent framework for AI Agents and AI Swarms with AgentOps support
</Card>

<Card title="TaskWeaver" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/microsoft/microsoft_logo.svg?raw=true" alt="TaskWeaver" />} iconType="image" href="/v1/integrations/taskweaver">
First class support for Microsoft TaskWeaver
</Card>
Expand Down
Loading

0 comments on commit 5a81293

Please sign in to comment.