

Agentopsは、開発者がAIエージェントの構築、評価、監視を支援します。プロトタイプから生産まで。
| リプレイ分析とデバッグ | ステップバイステップエージェント実行グラフ |
| ? LLMコスト管理 | LLM Foundationモデルプロバイダーとのトラック支出 |
| ?エージェントベンチマーク | エージェントを1,000回以上の回避に対してテストします |
| ?コンプライアンスとセキュリティ | 一般的な迅速な噴射とデータ除去のエクスプロイトを検出します |
| ?フレームワーク統合 | Crewai、Autogen、&Langchainとのネイティブ統合 |
pip install agentopsAgentOpsクライアントを初期化し、すべてのLLMコールで自動的に分析を取得します。
APIキーを取得します
import agentops
# Beginning of your program (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
...
# End of program
agentops . end_session ( 'Success' )すべてのセッションはAgentopsのダッシュボードで見ることができます






エージェント、ツール、および機能に強力な観察可能性を追加して、できるだけ少ないコードで追加します。一度に1行に1行。
ドキュメントを参照してください
# Automatically associate all Events with the agent that originated them
from agentops import track_agent
@ track_agent ( name = 'SomeCustomName' )
class MyAgent :
... # Automatically create ToolEvents for tools that agents will use
from agentops import record_tool
@ record_tool ( 'SampleToolName' )
def sample_tool (...):
... # Automatically create ActionEvents for other functions.
from agentops import record_action
@ agentops . record_action ( 'sample function being record' )
def sample_function (...):
... # Manually record any other Events
from agentops import record , ActionEvent
record ( ActionEvent ( "received_user_input" )) 2行のコードのみで観測可能性のある乗組員エージェントを構築します。環境にAGENTOPS_API_KEYを設定するだけで、乗組員はagentopsダッシュボードで自動監視を受けます。
pip install ' crewai[agentops] 'コードの2行のみで、オートゲンエージェントに完全な観測可能性と監視を追加します。環境にAGENTOPS_API_KEYを設定し、 agentops.init()を呼び出します
Agentopsは、Langchainを使用して構築されたアプリケーションでシームレスに機能します。ハンドラーを使用するには、Langchainをオプションの依存関係としてインストールします。
pip install agentops[langchain]ハンドラーを使用するには、インポートしてセットします
import os
from langchain . chat_models import ChatOpenAI
from langchain . agents import initialize_agent , AgentType
from agentops . partners . langchain_callback_handler import LangchainCallbackHandler
AGENTOPS_API_KEY = os . environ [ 'AGENTOPS_API_KEY' ]
handler = LangchainCallbackHandler ( api_key = AGENTOPS_API_KEY , tags = [ 'Langchain Example' ])
llm = ChatOpenAI ( openai_api_key = OPENAI_API_KEY ,
callbacks = [ handler ],
model = 'gpt-3.5-turbo' )
agent = initialize_agent ( tools ,
llm ,
agent = AgentType . CHAT_ZERO_SHOT_REACT_DESCRIPTION ,
verbose = True ,
callbacks = [ handler ], # You must pass in a callback handler to record your agent
handle_parsing_errors = True )Asyncハンドラーを含む詳細については、Langchainの例ノートブックをご覧ください。
Cohereのファーストクラスのサポート(> = 5.4.0)。これは生きた統合です。追加の機能が必要な場合は、不一致で私たちにメッセージを送ってください!
pip install cohere import cohere
import agentops
# Beginning of program's code (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
co = cohere . Client ()
chat = co . chat (
message = "Is it pronounced ceaux-hear or co-hehray?"
)
print ( chat )
agentops . end_session ( 'Success' ) import cohere
import agentops
# Beginning of program's code (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
co = cohere . Client ()
stream = co . chat_stream (
message = "Write me a haiku about the synergies between Cohere and AgentOps"
)
for event in stream :
if event . event_type == "text-generation" :
print ( event . text , end = '' )
agentops . end_session ( 'Success' )人類のPython SDK(> = 0.32.0)で構築されたトラックエージェント。
pip install anthropic import anthropic
import agentops
# Beginning of program's code (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
client = anthropic . Anthropic (
# This is the default and can be omitted
api_key = os . environ . get ( "ANTHROPIC_API_KEY" ),
)
message = client . messages . create (
max_tokens = 1024 ,
messages = [
{
"role" : "user" ,
"content" : "Tell me a cool fact about AgentOps" ,
}
],
model = "claude-3-opus-20240229" ,
)
print ( message . content )
agentops . end_session ( 'Success' )ストリーミング
import anthropic
import agentops
# Beginning of program's code (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
client = anthropic . Anthropic (
# This is the default and can be omitted
api_key = os . environ . get ( "ANTHROPIC_API_KEY" ),
)
stream = client . messages . create (
max_tokens = 1024 ,
model = "claude-3-opus-20240229" ,
messages = [
{
"role" : "user" ,
"content" : "Tell me something cool about streaming agents" ,
}
],
stream = True ,
)
response = ""
for event in stream :
if event . type == "content_block_delta" :
response += event . delta . text
elif event . type == "message_stop" :
print ( " n " )
print ( response )
print ( " n " )async
import asyncio
from anthropic import AsyncAnthropic
client = AsyncAnthropic (
# This is the default and can be omitted
api_key = os . environ . get ( "ANTHROPIC_API_KEY" ),
)
async def main () -> None :
message = await client . messages . create (
max_tokens = 1024 ,
messages = [
{
"role" : "user" ,
"content" : "Tell me something interesting about async agents" ,
}
],
model = "claude-3-opus-20240229" ,
)
print ( message . content )
await main ()人類のPython SDK(> = 0.32.0)で構築されたトラックエージェント。
pip install mistralai同期
from mistralai import Mistral
import agentops
# Beginning of program's code (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
client = Mistral (
# This is the default and can be omitted
api_key = os . environ . get ( "MISTRAL_API_KEY" ),
)
message = client . chat . complete (
messages = [
{
"role" : "user" ,
"content" : "Tell me a cool fact about AgentOps" ,
}
],
model = "open-mistral-nemo" ,
)
print ( message . choices [ 0 ]. message . content )
agentops . end_session ( 'Success' )ストリーミング
from mistralai import Mistral
import agentops
# Beginning of program's code (i.e. main.py, __init__.py)
agentops . init ( < INSERT YOUR API KEY HERE > )
client = Mistral (
# This is the default and can be omitted
api_key = os . environ . get ( "MISTRAL_API_KEY" ),
)
message = client . chat . stream (
messages = [
{
"role" : "user" ,
"content" : "Tell me something cool about streaming agents" ,
}
],
model = "open-mistral-nemo" ,
)
response = ""
for event in message :
if event . data . choices [ 0 ]. finish_reason == "stop" :
print ( " n " )
print ( response )
print ( " n " )
else :
response += event . text
agentops . end_session ( 'Success' )async
import asyncio
from mistralai import Mistral
client = Mistral (
# This is the default and can be omitted
api_key = os . environ . get ( "MISTRAL_API_KEY" ),
)
async def main () -> None :
message = await client . chat . complete_async (
messages = [
{
"role" : "user" ,
"content" : "Tell me something interesting about async agents" ,
}
],
model = "open-mistral-nemo" ,
)
print ( message . choices [ 0 ]. message . content )
await main ()非同期ストリーミング
import asyncio
from mistralai import Mistral
client = Mistral (
# This is the default and can be omitted
api_key = os . environ . get ( "MISTRAL_API_KEY" ),
)
async def main () -> None :
message = await client . chat . stream_async (
messages = [
{
"role" : "user" ,
"content" : "Tell me something interesting about async streaming agents" ,
}
],
model = "open-mistral-nemo" ,
)
response = ""
async for event in message :
if event . data . choices [ 0 ]. finish_reason == "stop" :
print ( " n " )
print ( response )
print ( " n " )
else :
response += event . text
await main ()AgentopsはLitellm(> = 1.3.1)のサポートを提供し、同じ入力/出力形式を使用して100以上のLLMを呼び出すことができます。
pip install litellm # Do not use LiteLLM like this
# from litellm import completion
# ...
# response = completion(model="claude-3", messages=messages)
# Use LiteLLM like this
import litellm
...
response = litellm . completion ( model = "claude-3" , messages = messages )
# or
response = await litellm . acompletion ( model = "claude-3" , messages = messages )Agentopsは、LLMAINDEXを使用して構築されたアプリケーションでシームレスに動作します。LLAMAINDEXは、LLMSを使用してコンテキストを構築した生成AIアプリケーションを構築するためのフレームワークです。
pip install llama-index-instrumentation-agentopsハンドラーを使用するには、インポートしてセットします
from llama_index . core import set_global_handler
# NOTE: Feel free to set your AgentOps environment variables (e.g., 'AGENTOPS_API_KEY')
# as outlined in the AgentOps documentation, or pass the equivalent keyword arguments
# anticipated by AgentOps' AOClient as **eval_params in set_global_handler.
set_global_handler ( "agentops" )詳細については、LlamainDexドキュメントをご覧ください。

試してみてください!
(近日公開!)
| プラットフォーム | ダッシュボード | 回避 |
|---|---|---|
| python sdk | ✅マルチセッションとクロスセッションメトリック | customカスタム評価メトリック |
| ?評価ビルダーAPI | customカスタムイベントタグトラッキング | エージェントスコアカード |
| ✅javascript/typescript sdk | ✅セッションリプレイ | 評価プレイグラウンド +リーダーボード |
| パフォーマンステスト | 環境 | LLMテスト | 推論と実行テスト |
|---|---|---|---|
| ✅イベントレイテンシ分析 | 非定常環境テスト | LLM非決定的関数検出 | ?無限のループと再帰的思考検出 |
| Agentエージェントワークフロー実行価格 | マルチモーダル環境 | ?トークンはオーバーフローフラグを制限します | 誤った推論検出 |
| ?サクセスバリデーター(外部) | 実行コンテナ | コンテキスト制限オーバーフローフラグ | 生成コードバリデーター |
| エージェントコントローラー/スキルテスト | ✅ハニーポットと迅速な噴射検出(PromptArmor) | API請求書の追跡 | エラーブレークポイント分析 |
| 情報コンテキスト制約テスト | 反エージェントの障害物(すなわちキャプチャ) | CI/CD統合チェック | |
| 回帰テスト | マルチエージェントフレームワークの視覚化 |
適切なツールがなければ、AIエージェントは遅く、高価で、信頼できません。私たちの使命は、エージェントをプロトタイプから制作に導くことです。これがAgentopsが際立っている理由です:
Agentopsは、エージェントの観測性、テスト、監視を簡単にするように設計されています。
コミュニティでの成長をご覧ください。
| リポジトリ | 星 |
|---|---|
| geekan / metagpt | 42787 |
| run-llama / llama_index | 34446 |
| CREWAIINC / CREWAI | 18287 |
| ラクダイ /ラクダ | 5166 |
| Superagent-Ai / Superagent | 5050 |
| Iyaja / llama-fs | 4713 |
| basedhardware / omi | 2723 |
| MervinPraison / Praisonai | 2007年 |
| agentops-ai / jaique | 272 |
| strnad / crewai-studio | 134 |
| Alejandro-ao / exa-crewai | 55 |
| tonykipkemboi / youtube_yapper_trapper | 47 |
| セスコースト /カバーレッタービルダー | 27 |
| Bhancockio / chatgpt4o分析 | 19 |
| BreakString / Agent_Story_Book_Workflow | 14 |
| マルチオン /マルチパイソン | 13 |
Nicolas VuillamyによってGithub依存者INFOを使用して生成されました