diff --git a/.github/workflows/test-notebooks.yml b/.github/workflows/test-notebooks.yml
index e7fb8ea9..406a7351 100644
--- a/.github/workflows/test-notebooks.yml
+++ b/.github/workflows/test-notebooks.yml
@@ -1,11 +1,22 @@
name: Test Notebooks
on:
- pull_request_target: # Allows manual triggering from PR UI
push:
branches:
- main
- paths-ignore:
- - 'docs/**'
+ paths:
+ - "agentops/**"
+ - "examples/**"
+ - "tests/**"
+ - ".github/workflows/test-notebooks.yml"
+ pull_request_target:
+ branches:
+ - main
+ paths:
+ - "agentops/**"
+ - "examples/**"
+ - "tests/**"
+ - ".github/workflows/test-notebooks.yml"
+ workflow_dispatch:
jobs:
test-notebooks:
runs-on: ubuntu-latest
@@ -38,7 +49,8 @@ jobs:
exit_code=0
exclude_notebooks=(
- "./examples/crew/job_posting.ipynb"
+ "./examples/crew/job_posting.ipynb",
+ "./examples/demos/agentchat_agentops.ipynb"
)
for notebook in $(find . -name '*.ipynb'); do
diff --git a/examples/README.md b/examples/README.md
index 7bc75c15..34270b96 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -1,5 +1,20 @@
# AgentOps Examples
+
+
+[AgentOps](https://agentops.ai/?=autogen) provides session replays, metrics, and monitoring for AI agents.
+
+At a high level, AgentOps gives you the ability to monitor LLM calls, costs, latency, agent failures, multi-agent interactions, tool usage, session-wide statistics, and more. For more info, check out the [AgentOps Repo](https://github.com/AgentOps-AI/agentops).
+
+### Overview Dashboard
+
+
+### Session Replays
+
+
+### Session Drilldown
+
+
## Quickstart
- [Single LLM](./openai-gpt.ipynb)
- [Recording Events](./recording-events.ipynb)
diff --git a/examples/autogen/AgentChat.ipynb b/examples/autogen/AgentChat.ipynb
index 10b2b51e..4de700ab 100644
--- a/examples/autogen/AgentChat.ipynb
+++ b/examples/autogen/AgentChat.ipynb
@@ -6,12 +6,10 @@
"id": "bb6538d8-2a5d-4a99-b2c1-7130963e4f7b",
"metadata": {},
"source": [
- "# Adding AgentOps to an existing Autogen service\n",
- "\n",
+ "# AutoGen Chat Example\n",
+ "\n",
"\n",
- "To get started, you'll need to install the AgentOps package and [set an API key](app.agentops.ai).\n",
- "\n",
- "AgentOps automatically configures itself when it's initialized meaning your agent run data will be tracked and logged to your AgentOps account right away."
+ "AgentOps automatically configures itself when it's initialized meaning your agent run data will be tracked and logged to your AgentOps dashboard right away."
]
},
{
@@ -53,7 +51,9 @@
"import agentops\n",
"import os\n",
"from dotenv import load_dotenv\n",
- "from IPython.core.error import StdinNotImplementedError"
+ "from IPython.core.error import (\n",
+ " StdinNotImplementedError,\n",
+ ") # only needed by AgentOps testing automation"
]
},
{
@@ -61,7 +61,13 @@
"id": "70b502a2",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -84,7 +90,7 @@
"outputs": [],
"source": [
"# When initializing AgentOps, you can pass in optional tags to help filter sessions\n",
- "agentops.init(AGENTOPS_API_KEY, default_tags=[\"simple-autogen-example\"])\n",
+ "agentops.init(api_key=AGENTOPS_API_KEY, default_tags=[\"simple-autogen-example\"])\n",
"\n",
"print(\"AgentOps is now running. You can view your session in the link above\")"
]
@@ -104,6 +110,14 @@
"* Errors"
]
},
+ {
+ "cell_type": "markdown",
+ "id": "e875dd0c",
+ "metadata": {},
+ "source": [
+ "# Simple Chat Example"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
@@ -113,7 +127,11 @@
"source": [
"# Define model, openai api key, tags, etc in the agent configuration\n",
"config_list = [\n",
- " {\"model\": \"gpt-4-turbo\", \"api_key\": OPENAI_API_KEY, \"tags\": [\"gpt-4\", \"tool\"]}\n",
+ " {\n",
+ " \"model\": \"gpt-4-turbo\",\n",
+ " \"api_key\": OPENAI_API_KEY,\n",
+ " \"tags\": [\"agentchat-example\", \"chat\"],\n",
+ " }\n",
"]\n",
"\n",
"# Create the agent that uses the LLM.\n",
@@ -161,7 +179,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/autogen/MathAgent.ipynb b/examples/autogen/MathAgent.ipynb
index 00b247c8..bf542594 100644
--- a/examples/autogen/MathAgent.ipynb
+++ b/examples/autogen/MathAgent.ipynb
@@ -6,8 +6,8 @@
"id": "bb6538d8-2a5d-4a99-b2c1-7130963e4f7b",
"metadata": {},
"source": [
- "# Adding AgentOps to an existing Autogen service\n",
- "\n",
+ "# AutoGen Tool Example\n",
+ "\n",
"\n",
"To get started, you'll need to install the AgentOps package and [set an API key](app.agentops.ai).\n",
"\n",
@@ -54,7 +54,10 @@
"from autogen import ConversableAgent, register_function\n",
"import agentops\n",
"import os\n",
- "from dotenv import load_dotenv"
+ "from dotenv import load_dotenv\n",
+ "from IPython.core.error import (\n",
+ " StdinNotImplementedError,\n",
+ ") # only needed by AgentOps testing automation"
]
},
{
@@ -62,7 +65,13 @@
"id": "24f8bd70",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -105,16 +114,12 @@
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "2962d990-f7ef-43d8-ba09-d29bd8356d9f",
+ "cell_type": "markdown",
+ "id": "dc592637",
"metadata": {},
- "outputs": [],
"source": [
- "# Define model, openai api key, tags, etc in the agent configuration\n",
- "config_list = [\n",
- " {\"model\": \"gpt-4-turbo\", \"api_key\": OPENAI_API_KEY, \"tags\": [\"gpt-4\", \"tool\"]}\n",
- "]"
+ "# Tool Example\n",
+ "AgentOps tracks when Autogen agents use tools. You can find more information on this example in [tool-use.ipynb](https://github.com/microsoft/autogen/blob/main/website/docs/tutorial/tool-use.ipynb)"
]
},
{
@@ -124,6 +129,15 @@
"metadata": {},
"outputs": [],
"source": [
+ "# Define model, openai api key, tags, etc in the agent configuration\n",
+ "config_list = [\n",
+ " {\n",
+ " \"model\": \"gpt-4-turbo\",\n",
+ " \"api_key\": OPENAI_API_KEY,\n",
+ " \"tags\": [\"mathagent-example\", \"tool\"],\n",
+ " }\n",
+ "]\n",
+ "\n",
"Operator = Literal[\"+\", \"-\", \"*\", \"/\"]\n",
"\n",
"\n",
@@ -174,7 +188,13 @@
")\n",
"\n",
"# Let the assistant start the conversation. It will end when the user types \"exit\".\n",
- "user_proxy.initiate_chat(assistant, message=\"What is (1423 - 123) / 3 + (32 + 23) * 5?\")\n",
+ "try:\n",
+ " user_proxy.initiate_chat(\n",
+ " assistant, message=\"What is (1423 - 123) / 3 + (32 + 23) * 5?\"\n",
+ " )\n",
+ "except StdinNotImplementedError:\n",
+ " # This is only necessary for AgentOps testing automation which is headless and will not have user input\n",
+ " print(\"Stdin not implemented. Skipping initiate_chat\")\n",
"\n",
"agentops.end_session(\"Success\")"
]
@@ -187,7 +207,7 @@
"You can see your run in action at [app.agentops.ai](app.agentops.ai). In this example, the AgentOps dashboard will show:\n",
"\n",
"* Agents talking to each other\n",
- "* Each use of the calculator tool\n",
+ "* Each use of the `calculator` tool\n",
"* Each call to OpenAI for LLM use"
]
}
diff --git a/examples/cohere/cohere_example.ipynb b/examples/cohere/cohere_example.ipynb
index 96ff01d6..1c54fbfd 100644
--- a/examples/cohere/cohere_example.ipynb
+++ b/examples/cohere/cohere_example.ipynb
@@ -47,7 +47,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -144,7 +150,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/crew/job_posting.ipynb b/examples/crew/job_posting.ipynb
index f10c43fb..eb3faaaa 100644
--- a/examples/crew/job_posting.ipynb
+++ b/examples/crew/job_posting.ipynb
@@ -7,6 +7,13 @@
"First let's install the required packages"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Crew Job Posting"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
@@ -41,7 +48,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -258,7 +271,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/crew/markdown_validator.ipynb b/examples/crew/markdown_validator.ipynb
index 6723e5f6..bd1f7a1b 100644
--- a/examples/crew/markdown_validator.ipynb
+++ b/examples/crew/markdown_validator.ipynb
@@ -65,7 +65,13 @@
"id": "0e307923",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -298,7 +304,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/autogen/agentchat_agentops.ipynb b/examples/demos/agentchat_agentops.ipynb
similarity index 89%
rename from examples/autogen/agentchat_agentops.ipynb
rename to examples/demos/agentchat_agentops.ipynb
index b4dc2134..7b0d7b18 100644
--- a/examples/autogen/agentchat_agentops.ipynb
+++ b/examples/demos/agentchat_agentops.ipynb
@@ -15,7 +15,7 @@
"id": "a447802c88c8a240",
"metadata": {},
"source": [
- "\n",
+ "\n",
"\n",
"[AgentOps](https://agentops.ai/?=autogen) provides session replays, metrics, and monitoring for AI agents.\n",
"\n",
@@ -28,10 +28,10 @@
"metadata": {},
"source": [
"### Overview Dashboard\n",
- "\n",
+ "\n",
"\n",
"### Session Replays\n",
- ""
+ ""
]
},
{
@@ -80,7 +80,9 @@
"metadata": {},
"outputs": [],
"source": [
- "from autogen import ConversableAgent, UserProxyAgent, config_list_from_json\n",
+ "from autogen import ConversableAgent, UserProxyAgent\n",
+ "from typing import Annotated, Literal\n",
+ "from autogen import ConversableAgent, register_function\n",
"import agentops\n",
"import os\n",
"from os import environ\n",
@@ -95,7 +97,13 @@
"id": "22ef3e34",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -193,16 +201,6 @@
"agentops.end_session(\"Success\")"
]
},
- {
- "cell_type": "markdown",
- "id": "2217ed0f930cfcaa",
- "metadata": {},
- "source": [
- "You can view data on this run at [app.agentops.ai](https://app.agentops.ai). \n",
- "\n",
- "The dashboard will display LLM events for each message sent by each agent, including those made by the human user."
- ]
- },
{
"cell_type": "markdown",
"id": "cbd689b0f5617013",
@@ -234,11 +232,9 @@
},
"outputs": [],
"source": [
- "from typing import Annotated, Literal\n",
- "\n",
- "from autogen import ConversableAgent, config_list_from_json, register_function\n",
- "\n",
- "agentops.start_session(tags=[\"autogen-tool-example\"])\n",
+ "config_list = [\n",
+ " {\"model\": \"gpt-4-turbo\", \"api_key\": OPENAI_API_KEY, \"tags\": [\"gpt-4\", \"tool\"]}\n",
+ "]\n",
"\n",
"Operator = Literal[\"+\", \"-\", \"*\", \"/\"]\n",
"\n",
@@ -256,8 +252,6 @@
" raise ValueError(\"Invalid operator\")\n",
"\n",
"\n",
- "config_list = config_list_from_json(env_or_file=\"OAI_CONFIG_LIST\")\n",
- "\n",
"# Create the agent that uses the LLM.\n",
"assistant = ConversableAgent(\n",
" name=\"Assistant\",\n",
diff --git a/examples/langchain/langchain_examples.ipynb b/examples/langchain/langchain_examples.ipynb
index ba1c1e9b..361064c6 100644
--- a/examples/langchain/langchain_examples.ipynb
+++ b/examples/langchain/langchain_examples.ipynb
@@ -53,7 +53,8 @@
"import os\n",
"from langchain_openai import ChatOpenAI\n",
"from langchain.agents import tool, AgentExecutor, create_openai_tools_agent\n",
- "from dotenv import load_dotenv"
+ "from dotenv import load_dotenv\n",
+ "from langchain_core.prompts import ChatPromptTemplate"
]
},
{
@@ -91,7 +92,13 @@
"collapsed": false
},
"source": [
- "Next, we'll grab our two API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -107,7 +114,9 @@
},
"outputs": [],
"source": [
- "load_dotenv()"
+ "load_dotenv()\n",
+ "AGENTOPS_API_KEY = os.environ.get(\"AGENTOPS_API_KEY\")\n",
+ "OPENAI_API_KEY = os.environ.get(\"OPENAI_API_KEY\")"
]
},
{
@@ -119,7 +128,11 @@
"source": [
"This is where AgentOps comes into play. Before creating our LLM instance via Langchain, first we'll create an instance of the AO LangchainCallbackHandler. After the handler is initialized, a session will be recorded automatically.\n",
"\n",
- "Pass in your API key, and optionally any tags to describe this session for easier lookup in the AO dashboard."
+ "Pass in your API key, and optionally any tags to describe this session for easier lookup in the AO dashboard.\n",
+ "\n",
+ "agentops_handler = AgentOpsLangchainCallbackHandler(\n",
+ " api_key=AGENTOPS_API_KEY, default_tags=[\"Langchain Example\"]\n",
+ ")\n"
]
},
{
@@ -135,15 +148,6 @@
},
"outputs": [],
"source": [
- "from langchain_core.prompts import ChatPromptTemplate\n",
- "\n",
- "AGENTOPS_API_KEY = os.environ.get(\"AGENTOPS_API_KEY\")\n",
- "OPENAI_API_KEY = os.environ.get(\"OPENAI_API_KEY\")\n",
- "\n",
- "agentops_handler = AgentOpsLangchainCallbackHandler(\n",
- " api_key=AGENTOPS_API_KEY, default_tags=[\"Langchain Example\"]\n",
- ")\n",
- "\n",
"llm = ChatOpenAI(\n",
" openai_api_key=OPENAI_API_KEY, callbacks=[agentops_handler], model=\"gpt-3.5-turbo\"\n",
")\n",
@@ -397,7 +401,7 @@
"collapsed": false
},
"source": [
- "Next, we'll grab our two API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll grab our two API keys."
]
},
{
@@ -717,7 +721,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/litellm/litellm_example.ipynb b/examples/litellm/litellm_example.ipynb
index 9cde2d32..adaf8d52 100644
--- a/examples/litellm/litellm_example.ipynb
+++ b/examples/litellm/litellm_example.ipynb
@@ -63,7 +63,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -134,7 +140,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/multi_agent_example.ipynb b/examples/multi_agent_example.ipynb
index bc705d46..ccd8a1aa 100644
--- a/examples/multi_agent_example.ipynb
+++ b/examples/multi_agent_example.ipynb
@@ -68,7 +68,13 @@
"id": "6a65f091",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
diff --git a/examples/multi_agent_groq_example.ipynb b/examples/multi_agent_groq_example.ipynb
index c86e83aa..300a4ac6 100644
--- a/examples/multi_agent_groq_example.ipynb
+++ b/examples/multi_agent_groq_example.ipynb
@@ -69,7 +69,13 @@
"id": "d614aaf3",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
diff --git a/examples/multi_session_llm.ipynb b/examples/multi_session_llm.ipynb
index a13cd65e..87c980bb 100644
--- a/examples/multi_session_llm.ipynb
+++ b/examples/multi_session_llm.ipynb
@@ -60,7 +60,13 @@
"id": "c1da7e59",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
diff --git a/examples/multion/Autonomous_web_browsing.ipynb b/examples/multion/Autonomous_web_browsing.ipynb
index 407a5bd2..d44329b7 100644
--- a/examples/multion/Autonomous_web_browsing.ipynb
+++ b/examples/multion/Autonomous_web_browsing.ipynb
@@ -59,7 +59,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -230,7 +236,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/multion/Sample_browsing_agent.ipynb b/examples/multion/Sample_browsing_agent.ipynb
index 7c3a68d0..c8224716 100644
--- a/examples/multion/Sample_browsing_agent.ipynb
+++ b/examples/multion/Sample_browsing_agent.ipynb
@@ -56,7 +56,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -185,7 +191,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/multion/Step_by_step_web_browsing.ipynb b/examples/multion/Step_by_step_web_browsing.ipynb
index be06d2d6..e39cb4f9 100644
--- a/examples/multion/Step_by_step_web_browsing.ipynb
+++ b/examples/multion/Step_by_step_web_browsing.ipynb
@@ -58,7 +58,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -228,7 +234,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/multion/Webpage_data_retrieval.ipynb b/examples/multion/Webpage_data_retrieval.ipynb
index 417522a1..aa70806d 100644
--- a/examples/multion/Webpage_data_retrieval.ipynb
+++ b/examples/multion/Webpage_data_retrieval.ipynb
@@ -54,7 +54,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -134,7 +140,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/openai-gpt.ipynb b/examples/openai-gpt.ipynb
index eafb40e1..37e58348 100644
--- a/examples/openai-gpt.ipynb
+++ b/examples/openai-gpt.ipynb
@@ -61,7 +61,13 @@
"collapsed": false
},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -283,7 +289,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,
diff --git a/examples/recording-events.ipynb b/examples/recording-events.ipynb
index 49ce3698..6b9bb46f 100644
--- a/examples/recording-events.ipynb
+++ b/examples/recording-events.ipynb
@@ -59,7 +59,13 @@
"id": "985ed1da",
"metadata": {},
"source": [
- "Next, we'll grab our API keys. You can use dotenv like below or however else you like to load environment variables"
+ "Next, we'll set our API keys. There are several ways to do this, the code below is just the most foolproof way for the purposes of this notebook. It accounts for both users who use environment variables and those who just want to set the API Key here in this notebook.\n",
+ "\n",
+ "[Get an AgentOps API key](https://agentops.ai/settings/projects)\n",
+ "\n",
+ "1. Create an environment variable in a .env file or other method. By default, the AgentOps `init()` function will look for an environment variable named `AGENTOPS_API_KEY`. Or...\n",
+ "\n",
+ "2. Replace `` below and pass in the optional `api_key` parameter to the AgentOps `init(api_key=...)` function. Remember not to commit your API key to a public repo!"
]
},
{
@@ -254,7 +260,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.12.3"
+ "version": "3.12.5"
}
},
"nbformat": 4,