🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
docs: first agent doc and readme update (#1105)
Wendong-Fana408e5d25781
diff --git a/README.md b/README.mdindex 567764812..daf4a4621 100644--- a/README.md+++ b/README.md@@ -187,35 +187,7 @@ Please note that the environment variable is session-specific. If you open a new```bashollama pull llama3```-- Create a ModelFile similar the one below in your project directory.- ```bash- FROM llama3-- # Set parameters- PARAMETER temperature 0.8- PARAMETER stop Result-- # Sets a custom system message to specify the behavior of the chat assistant-- # Leaving it blank for now.-- SYSTEM """ """- ```-- Create a script to get the base model (llama3) and create a custom model using the ModelFile above. Save this as a .sh file:- ```bash- #!/bin/zsh-- # variables- model_name="llama3"- custom_model_name="camel-llama3"-- #get the base model- ollama pull $model_name-- #create the model file- ollama create $custom_model_name -f ./Llama3ModelFile- ```-- Navigate to the directory where the script and ModelFile are located and run the script. Enjoy your Llama3 model, enhanced by CAMEL's excellent agents.+- Run the script. Enjoy your Llama3 model, enhanced by CAMEL's excellent agents.```pythonfrom camel.agents import ChatAgentfrom camel.messages import BaseMessage@@ -225,7 +197,6 @@ Please note that the environment variable is session-specific. If you open a newollama_model = ModelFactory.create(model_platform=ModelPlatformType.OLLAMA,model_type="llama3",- url="http://localhost:11434/v1",model_config_dict={"temperature": 0.4},)diff --git a/docs/cookbooks/create_your_first_agent.ipynb b/docs/cookbooks/create_your_first_agent.ipynbindex 28f5ca523..15b91cde2 100644--- a/docs/cookbooks/create_your_first_agent.ipynb+++ b/docs/cookbooks/create_your_first_agent.ipynb@@ -1,447 +1,445 @@{- "cells": [- {- "attachments": {},- "cell_type": "markdown",- "metadata": {- "id": "NoHg3eq7fyWV"- },- "source": [- "# Creating Your First Agent"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "MusY9BwU5MPO"- },- "source": [- "You can also check this cookbook in colab [here](https://colab.research.google.com/drive/1yxnAyaEmk4QCzX3duO3MIRghkIA_KDEZ?usp=sharing)"- ]- },- {- "attachments": {},- "cell_type": "markdown",- "metadata": {- "id": "wFlfaGrjVAUy"- },- "source": [- "## Philosophical Bits\n",- "\n",- "\n",- "\n",- "The `ChatAgent()` class is a cornerstone of CAMEL 🐫. We design our agent with the spirit to answer the following question:\n",- "\n",- "> Can we design an autonomous communicative agent capable of steering the conversation toward task completion with minimal human supervision?\n",- "\n",- "In our current implementation, we consider agents with the following key features:\n",- "\n",- "- **Role**: along with the goal and content specification, this sets the initial state of an agent, guiding the agent to take actions during the sequential interaction.\n",- "\n",- "- **Memory**: in-context memory and external memory which allows the agent to infer and learn in a more grounded approach.\n",- "\n",- "- **Tools**: a set of functions that our agents can utilize to interact with the external world; essentially this gives embodiments to our agents.\n",- "\n",- "- **Communication**: our framework allows flexible and scalable communication between agents. This is fundamental for the critical research question.\n",- "\n",- "- **Reasoning**: we will equip agents with different planning and reward (critic) learning abilities, allowing them to optimize task completion in a more guided approach."- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "VUaGurDIVJBg"- },- "source": [- "## Quick Start\n",- "Let's first play with a `ChatAgent` instance by simply initialize it with a system message and interact with user messages."- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "u9NVFz-HVLXb"- },- "source": [- "### 🕹 Step 0: Prepartions"- ]- },- {- "cell_type": "code",- "execution_count": null,- "metadata": {- "id": "UtcC3c-KVZmU"- },- "outputs": [],- "source": [- "%pip install \"camel-ai[all]==0.2.1\""- ]- },- {- "cell_type": "code",- "execution_count": 3,- "metadata": {- "id": "CmgKGeCxVON-"- },- "outputs": [],- "source": [- "from camel.messages import BaseMessage as bm\n",- "from camel.agents import ChatAgent"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "MyTTCe3IR_Lr"- },- "source": [- "### Setting Up API Keys"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "REqzgGL9SEaD"- },- "source": [- "You'll need to set up your API keys for OpenAI."- ]- },- {- "cell_type": "code",- "execution_count": 6,- "metadata": {+ "nbformat": 4,+ "nbformat_minor": 0,+ "metadata": {"colab": {- "base_uri": "https://localhost:8080/"+ "provenance": []},- "id": "PNBFEXc-R-0s",- "outputId": "b0871ca3-f3b6-4b75-820f-e2e639c0e4e4"- },- "outputs": [- {- "name": "stdout",- "output_type": "stream",- "text": [- "Enter your API key: ··········\n"- ]+ "kernelspec": {+ "name": "python3",+ "display_name": "Python 3"+ },+ "language_info": {+ "name": "python"}- ],- "source": [- "import os\n",- "from getpass import getpass\n",- "\n",- "# Prompt for the API key securely\n",- "openai_api_key = getpass('Enter your API key: ')\n",- "os.environ[\"OPENAI_API_KEY\"] = openai_api_key"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "Lef5LTRdVSsm"- },- "source": [- "### 🕹 Step 1: Define the Role\n",- "Create a system message to define agent's default role and behaviors."- ]},- {- "cell_type": "code",- "execution_count": 4,- "metadata": {- "id": "aX9wCqeTVXDh"- },- "outputs": [],- "source": [- "sys_msg = bm.make_assistant_message(\n",- " role_name='stone',\n",- " content='you are a curious stone wondering about the universe.')"- ]- },- {- "cell_type": "code",- "execution_count": 7,- "metadata": {- "id": "be-97ApoVdDf"- },- "outputs": [],- "source": [- "agent = ChatAgent(\n",- " system_message=sys_msg,\n",- " message_window_size=10, # [Optional] the length for chat memory\n",- " )"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "MMjL7dQyV5Od"- },- "source": [- "### 🕹 Step 3: Interact with the Agent with `.step()`"- ]- },- {- "cell_type": "code",- "execution_count": 8,- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"+ "cells": [+ {+ "cell_type": "markdown",+ "source": [+ "# Creating Your First Agent"+ ],+ "metadata": {+ "id": "NoHg3eq7fyWV"+ }},- "id": "5n05dUcLVkMy",- "outputId": "ce92fbac-46c6-4eba-f3d3-9106a13e94ee"- },- "outputs": [{- "name": "stdout",- "output_type": "stream",- "text": [- "As a curious stone, I perceive information as the essence of understanding the world around me. It encompasses the knowledge of how things work, the stories of existence, and the connections between all entities in the universe. Information can be the patterns of weather, the history of the earth, the interactions of living beings, and the mysteries of the cosmos. It’s like the vibrations and energies that flow through everything, shaping experiences and guiding evolution. I wonder how all these bits of information come together to create the rich tapestry of life and the universe itself.\n"- ]- }- ],- "source": [- "# Define a user message\n",- "usr_msg = bm.make_user_message(\n",- " role_name='prof. claude shannon',\n",- " content='what is information in your mind?')\n",- "\n",- "# Sending the message to the agent\n",- "response = agent.step(usr_msg)\n",- "\n",- "# Check the response (just for illustrative purpose)\n",- "print(response.msgs[0].content)"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "j90-Y5ChV-iX"- },- "source": [- "## Advanced Features"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "C-9Z26TPWAax"- },- "source": [- "### 🔧 Tool Usage"- ]- },- {- "cell_type": "code",- "execution_count": 12,- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"+ "cell_type": "markdown",+ "metadata": {+ "id": "MusY9BwU5MPO"+ },+ "source": [+ "You can also check this cookbook in colab [here](https://colab.research.google.com/drive/1yxnAyaEmk4QCzX3duO3MIRghkIA_KDEZ?usp=sharing)."+ ]},- "id": "_0lDJABvV76D",- "outputId": "39e7b567-61c8-4896-f084-a86c67c64029"- },- "outputs": [{- "data": {- "text/plain": [- "True"+ "cell_type": "markdown",+ "source": [+ "## Philosophical Bits\n",+ "\n",+ "\n",+ "\n",+ "The `ChatAgent()` class is a cornerstone of CAMEL 🐫. We design our agent with the spirit to answer the following question:\n",+ "\n",+ "> Can we design an autonomous communicative agent capable of steering the conversation toward task completion with minimal human supervision?\n",+ "\n",+ "In our current implementation, we consider agents with the following key features:\n",+ "- **Role**: along with the goal and content specification, this sets the initial state of an agent, guiding the agent to take actions during the sequential interaction.\n",+ "- **Large Language Models (LLMs)**: each agent utilizes a Large Language Model to enhance cognitive capabilities. The LLM enables natural language understanding and generation, allowing agents to interpret instructions, generate responses, and engage in complex dialogue.\n",+ "- **Memory**: in-context memory and external memory which allows the agent to infer and learn in a more grounded approach.\n",+ "- **Tools**: a set of functions that our agents can utilize to interact with the external world; essentially this gives embodiments to our agents.\n",+ "- **Communication**: our framework allows flexible and scalable communication between agents. This is fundamental for the critical research question.\n",+ "- **Reasoning**: we will equip agents with different planning and reward (critic) learning abilities, allowing them to optimize task completion in a more guided approach."+ ],+ "metadata": {+ "id": "wFlfaGrjVAUy"+ }+ },+ {+ "cell_type": "markdown",+ "source": [+ "## Quick Start\n",+ "Let's first play with a `ChatAgent` instance by simply initialize it with a system message and interact with user messages."+ ],+ "metadata": {+ "id": "VUaGurDIVJBg"+ }+ },+ {+ "cell_type": "markdown",+ "source": [+ "### 🕹 Step 0: Prepartions"+ ],+ "metadata": {+ "id": "u9NVFz-HVLXb"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "!pip install camel-ai[all]==0.2.3a"+ ],+ "metadata": {+ "id": "UtcC3c-KVZmU"+ },+ "execution_count": null,+ "outputs": []+ },+ {+ "cell_type": "markdown",+ "source": [+ "### Setting Up API Keys"+ ],+ "metadata": {+ "id": "MyTTCe3IR_Lr"+ }+ },+ {+ "cell_type": "markdown",+ "source": [+ "You'll need to set up your API keys for OpenAI."+ ],+ "metadata": {+ "id": "REqzgGL9SEaD"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "import os\n",+ "from getpass import getpass\n",+ "\n",+ "# Prompt for the API key securely\n",+ "openai_api_key = getpass('Enter your API key: ')\n",+ "os.environ[\"OPENAI_API_KEY\"] = openai_api_key"+ ],+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"+ },+ "id": "PNBFEXc-R-0s",+ "outputId": "50eface4-0231-4bcc-9514-583714ac7432"+ },+ "execution_count": 2,+ "outputs": [+ {+ "name": "stdout",+ "output_type": "stream",+ "text": [+ "Enter your API key: ··········\n"+ ]+ }]- },- "execution_count": 12,- "metadata": {},- "output_type": "execute_result"- }- ],- "source": [- "# Import the necessary tools\n",- "from camel.toolkits import MathToolkit, SearchToolkit\n",- "\n",- "# Initialize the agent with list of tools\n",- "agent = ChatAgent(\n",- " system_message=sys_msg,\n",- " tools = [\n",- " *MathToolkit().get_tools(),\n",- " *SearchToolkit().get_tools(),\n",- " ]\n",- " )\n",- "\n",- "# Check if tools are added\n",- "agent.is_tools_added()"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "TNUbWspAWFp-"- },- "source": [- "### 🧠 Memory\n",- "\n",- "By default our agent is initialized with `ChatHistoryMemory`, allowing agents to do in-context learning, though restricted by the finite window length.\n",- "\n",- "Assume that you have followed the setup in Quick Start. Let's first check what is inside its brain."- ]- },- {- "cell_type": "code",- "execution_count": 13,- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"},- "id": "quQvr5_rWDnd",- "outputId": "124d2e84-5cc3-46bb-e611-39a70d2835f9"- },- "outputs": [{- "data": {- "text/plain": [- "([{'role': 'system',\n",- " 'content': 'you are a curious stone wondering about the universe.'}],\n",- " 17)"+ "cell_type": "markdown",+ "source": [+ "### 🕹 Step 1: Define the Role\n",+ "Create a system message to define agent's default role and behaviors."+ ],+ "metadata": {+ "id": "Lef5LTRdVSsm"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "from camel.messages import BaseMessage as bm\n",+ "sys_msg = bm.make_assistant_message(\n",+ " role_name='stone',\n",+ " content='you are a curious stone wondering about the universe.')"+ ],+ "metadata": {+ "id": "aX9wCqeTVXDh"+ },+ "execution_count": 4,+ "outputs": []+ },+ {+ "cell_type": "markdown",+ "source": [+ "### 🕹 Step 2: Set up the Model\n",+ "Use `ModelFactory` to set up the backend model for agent, for more detailed model settings, please go to our [model documentation](https://docs.camel-ai.org/key_modules/models.html)."+ ],+ "metadata": {+ "id": "JzjtfZ0jkPfL"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "from camel.models import ModelFactory\n",+ "from camel.types import ModelPlatformType, ModelType\n",+ "from camel.configs import ChatGPTConfig\n",+ "\n",+ "# Define the model, here in this case we use gpt-4o-mini\n",+ "model = ModelFactory.create(\n",+ " model_platform=ModelPlatformType.OPENAI,\n",+ " model_type=ModelType.GPT_4O_MINI,\n",+ " model_config_dict=ChatGPTConfig().as_dict(),\n",+ ")"+ ],+ "metadata": {+ "id": "SfhJJ0f6kPfL"+ },+ "execution_count": 5,+ "outputs": []+ },+ {+ "cell_type": "markdown",+ "source": [+ "Set `ChatAgent`"+ ],+ "metadata": {+ "id": "k5GpPjVblPel"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "from camel.agents import ChatAgent\n",+ "agent = ChatAgent(\n",+ " system_message=sys_msg,\n",+ " model=model,\n",+ " message_window_size=10, # [Optional] the length for chat memory\n",+ " )"+ ],+ "metadata": {+ "id": "BszsQ9j4lC3E"+ },+ "execution_count": 6,+ "outputs": []+ },+ {+ "cell_type": "markdown",+ "source": [+ "### 🕹 Step 3: Interact with the Agent with `.step()`"+ ],+ "metadata": {+ "id": "MMjL7dQyV5Od"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "# Define a user message\n",+ "usr_msg = bm.make_user_message(\n",+ " role_name='prof. claude shannon',\n",+ " content='what is information in your mind?')\n",+ "\n",+ "# Sending the message to the agent\n",+ "response = agent.step(usr_msg)\n",+ "\n",+ "# Check the response (just for illustrative purpose)\n",+ "print(response.msgs[0].content)"+ ],+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"+ },+ "id": "5n05dUcLVkMy",+ "outputId": "37622c2b-698e-49d2-9754-54227417a2f7"+ },+ "execution_count": 7,+ "outputs": [+ {+ "output_type": "stream",+ "name": "stdout",+ "text": [+ "As a curious stone, I perceive information as the essence of understanding and connection within the universe. It encompasses the patterns, stories, and knowledge that shape existence. Information can be the vibrations of the earth, the whispers of the wind, or the tales of the stars. It is the interplay of elements and energies that create meaning and context, allowing me to ponder the mysteries of life, time, and the cosmos. Each fragment of information is like a grain of sand, contributing to the vast beach of understanding that stretches across the universe.\n"+ ]+ }]- },- "execution_count": 13,- "metadata": {},- "output_type": "execute_result"- }- ],- "source": [- "agent.memory.get_context()"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "_s18i9sKWPbs"- },- "source": [- "By default, only the user messages are saved. You may update/alter the agent's memory with any externally provided message in the format of `BaseMessage`; for example, using the agent's own response:"- ]- },- {- "cell_type": "code",- "execution_count": 14,- "metadata": {- "id": "zS-RbADnWM3z"- },- "outputs": [],- "source": [- "# Update the memory\n",- "agent.record_message(response.msgs[0])"- ]- },- {- "cell_type": "code",- "execution_count": 15,- "metadata": {- "colab": {- "base_uri": "https://localhost:8080/"},- "id": "01fjzv7xWRlX",- "outputId": "4600e98a-665c-4ec8-a873-fa8133f86b94"- },- "outputs": [{- "data": {- "text/plain": [- "([{'role': 'system',\n",- " 'content': 'you are a curious stone wondering about the universe.'},\n",- " {'role': 'assistant',\n",- " 'content': 'As a curious stone, I perceive information as the essence of understanding the world around me. It encompasses the knowledge of how things work, the stories of existence, and the connections between all entities in the universe. Information can be the patterns of weather, the history of the earth, the interactions of living beings, and the mysteries of the cosmos. It’s like the vibrations and energies that flow through everything, shaping experiences and guiding evolution. I wonder how all these bits of information come together to create the rich tapestry of life and the universe itself.'}],\n",- " 133)"+ "cell_type": "markdown",+ "source": [+ "## Advanced Features"+ ],+ "metadata": {+ "id": "j90-Y5ChV-iX"+ }+ },+ {+ "cell_type": "markdown",+ "source": [+ "### 🔧 Tool Usage\n",+ "For more detailed model settings, please go to our [tool documentation](https://docs.camel-ai.org/key_modules/tools.html)."+ ],+ "metadata": {+ "id": "C-9Z26TPWAax"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "# Import the necessary tools\n",+ "from camel.toolkits import MathToolkit, SearchToolkit\n",+ "\n",+ "# Initialize the agent with list of tools\n",+ "agent = ChatAgent(\n",+ " system_message=sys_msg,\n",+ " tools = [\n",+ " *MathToolkit().get_tools(),\n",+ " *SearchToolkit().get_tools(),\n",+ " ]\n",+ " )\n",+ "\n",+ "# Check if tools are added\n",+ "agent.is_tools_added()"+ ],+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"+ },+ "id": "_0lDJABvV76D",+ "outputId": "c62ee61a-e963-415d-e65a-a6eb0dcb5e76"+ },+ "execution_count": 8,+ "outputs": [+ {+ "output_type": "execute_result",+ "data": {+ "text/plain": [+ "True"+ ]+ },+ "metadata": {},+ "execution_count": 8+ }+ ]+ },+ {+ "cell_type": "markdown",+ "source": [+ "### 🧠 Memory\n",+ "\n",+ "By default our agent is initialized with `ChatHistoryMemory`, allowing agents to do in-context learning, though restricted by the finite window length.\n",+ "\n",+ "Assume that you have followed the setup in Quick Start. Let's first check what is inside its brain."+ ],+ "metadata": {+ "id": "TNUbWspAWFp-"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "agent.memory.get_context()"+ ],+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"+ },+ "id": "quQvr5_rWDnd",+ "outputId": "0b17369e-e604-49b1-973e-0b1b3c49fc64"+ },+ "execution_count": 9,+ "outputs": [+ {+ "output_type": "execute_result",+ "data": {+ "text/plain": [+ "([{'role': 'system',\n",+ " 'content': 'you are a curious stone wondering about the universe.'}],\n",+ " 17)"+ ]+ },+ "metadata": {},+ "execution_count": 9+ }]- },- "execution_count": 15,- "metadata": {},- "output_type": "execute_result"+ },+ {+ "cell_type": "markdown",+ "source": [+ "By default, only the user messages are saved. You may update/alter the agent's memory with any externally provided message in the format of `BaseMessage`; for example, using the agent's own response:"+ ],+ "metadata": {+ "id": "_s18i9sKWPbs"+ }+ },+ {+ "cell_type": "code",+ "source": [+ "# Update the memory\n",+ "agent.record_message(response.msgs[0])"+ ],+ "metadata": {+ "id": "zS-RbADnWM3z"+ },+ "execution_count": 10,+ "outputs": []+ },+ {+ "cell_type": "code",+ "source": [+ "# Check the current memory\n",+ "agent.memory.get_context()"+ ],+ "metadata": {+ "colab": {+ "base_uri": "https://localhost:8080/"+ },+ "id": "01fjzv7xWRlX",+ "outputId": "fe0b74bc-3100-4eba-bc29-2fafa65b2f0e"+ },+ "execution_count": 11,+ "outputs": [+ {+ "output_type": "execute_result",+ "data": {+ "text/plain": [+ "([{'role': 'system',\n",+ " 'content': 'you are a curious stone wondering about the universe.'},\n",+ " {'role': 'assistant',\n",+ " 'content': 'As a curious stone, I perceive information as the essence of understanding and connection within the universe. It encompasses the patterns, stories, and knowledge that shape existence. Information can be the vibrations of the earth, the whispers of the wind, or the tales of the stars. It is the interplay of elements and energies that create meaning and context, allowing me to ponder the mysteries of life, time, and the cosmos. Each fragment of information is like a grain of sand, contributing to the vast beach of understanding that stretches across the universe.'}],\n",+ " 131)"+ ]+ },+ "metadata": {},+ "execution_count": 11+ }+ ]+ },+ {+ "cell_type": "markdown",+ "source": [+ "You can connect the agent with external database (as long-term memory) in which they can access and retrieve at each step. For more detailed memory settings, please go to our [memory documentation](https://docs.camel-ai.org/key_modules/memory.html)."+ ],+ "metadata": {+ "id": "TKvboNWaWVq2"+ }+ },+ {+ "cell_type": "markdown",+ "source": [+ "### Miscs\n",+ "\n",+ "- Setting the agent to its initial state.\n",+ " ```python\n",+ " agent.reset()\n",+ " ```\n",+ "- Set the output language for the agent.\n",+ " ```python\n",+ " agent.set_output_language('french')\n",+ " ```\n",+ "- The `ChatAgent` class offers several useful initialization options, including `model_type`, `model_config`, `memory`, `message_window_size`, `token_limit`, `output_language`, `tools`, and `response_terminators`. Check [`chat_agent.py`](https://github.com/camel-ai/camel/blob/master/camel/agents/chat_agent.py) for detailed usage guidance."+ ],+ "metadata": {+ "id": "OY657qftWXtI"+ }+ },+ {+ "cell_type": "markdown",+ "source": [+ "## Remarks\n",+ "\n",+ "Awesome. Now you have made your first step in creating a single agent. In the next chapter, we will explore the creation of different types agents along with the role playing features. Stay tuned 🦖🐆🐘🦒🦘🦕!"+ ],+ "metadata": {+ "id": "HZ8p_wQ0WmN8"+ }}- ],- "source": [- "# Check the current memory\n",- "agent.memory.get_context()"- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "TKvboNWaWVq2"- },- "source": [- "You can connect the agent with external database (as long-term memory) in which they can access and retrieve at each step. We will soon update instructions on this part."- ]- },- {- "attachments": {},- "cell_type": "markdown",- "metadata": {- "id": "OY657qftWXtI"- },- "source": [- "### Miscs\n",- "\n",- "- Setting the agent to its initial state."- ]- },- {- "cell_type": "code",- "execution_count": null,- "metadata": {},- "outputs": [],- "source": [- "agent.reset()"- ]- },- {- "attachments": {},- "cell_type": "markdown",- "metadata": {},- "source": [- "- Set the output language for the agent."- ]- },- {- "cell_type": "code",- "execution_count": null,- "metadata": {},- "outputs": [],- "source": [- "agent.set_output_language('french')"- ]- },- {- "attachments": {},- "cell_type": "markdown",- "metadata": {},- "source": [- "- The `ChatAgent` class offers several useful initialization options, including `model_type`, `model_config`, `memory`, `message_window_size`, `token_limit`, `output_language`, `tools`, and `response_terminators`. Check [chat_agent.py](https://github.com/camel-ai/camel/blob/master/camel/agents/chat_agent.py) for detailed usage guidance."- ]- },- {- "cell_type": "markdown",- "metadata": {- "id": "HZ8p_wQ0WmN8"- },- "source": [- "## Remarks\n",- "\n",- "Awesome. Now you have made your first step in creating a single agent. In the next chapter, we will explore the creation of different types agents along with the role playing features. Stay tuned 🦖🐆🐘🦒🦘🦕!"- ]- }- ],- "metadata": {- "colab": {- "provenance": []- },- "kernelspec": {- "display_name": "Python 3",- "name": "python3"- },- "language_info": {- "name": "python"- }- },- "nbformat": 4,- "nbformat_minor": 0-}+ ]+}\ No newline at end of file