# Gmail OpenAI Agent Pack
Create an OpenAI agent pre-loaded with a tool to interact with Gmail. The tool used is the [Gmail LlamaHub tool](https://llamahub.ai/l/tools-gmail).
## CLI Usage
You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:
```bash
llamaindex-cli download-llamapack GmailOpenAIAgentPack --download-dir ./gmail_pack
```
You can then inspect the files at `./gmail_pack` and use them as a template for your own project!
## Code Usage
You can download the pack to a the `./gmail_pack` directory:
```python
from llama_index.core.llama_pack import download_llama_pack
# download and install dependencies
GmailOpenAIAgentPack = download_llama_pack(
"GmailOpenAIAgentPack", "./gmail_pack"
)
gmail_agent_pack = GmailOpenAIAgentPack()
```
From here, you can use the pack, or inspect and modify the pack in `./gmail_pack`.
The `run()` function is a light wrapper around `agent.chat()`.
```python
response = gmail_agent_pack.run("What is my most recent email?")
```
You can also use modules individually.
```python
# Use the agent
agent = gmail_agent_pack.agent
response = agent.chat("What is my most recent email?")
# Use the tool spec in another agent
from llama_index.core.agent import ReActAgent
tool_spec = gmail_agent_pack.tool_spec
agent = ReActAgent.from_tools(tool_spec.to_tool_lost())
```
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-packs-gmail-openai-agent",
"maintainer": "logan-markewich",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "math, research, science",
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/4e/36/9af02a5a10bb3053aa511e13c09377b438d636254c773d3a90f897d9b514/llama_index_packs_gmail_openai_agent-0.3.0.tar.gz",
"platform": null,
"description": "# Gmail OpenAI Agent Pack\n\nCreate an OpenAI agent pre-loaded with a tool to interact with Gmail. The tool used is the [Gmail LlamaHub tool](https://llamahub.ai/l/tools-gmail).\n\n## CLI Usage\n\nYou can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:\n\n```bash\nllamaindex-cli download-llamapack GmailOpenAIAgentPack --download-dir ./gmail_pack\n```\n\nYou can then inspect the files at `./gmail_pack` and use them as a template for your own project!\n\n## Code Usage\n\nYou can download the pack to a the `./gmail_pack` directory:\n\n```python\nfrom llama_index.core.llama_pack import download_llama_pack\n\n# download and install dependencies\nGmailOpenAIAgentPack = download_llama_pack(\n \"GmailOpenAIAgentPack\", \"./gmail_pack\"\n)\n\ngmail_agent_pack = GmailOpenAIAgentPack()\n```\n\nFrom here, you can use the pack, or inspect and modify the pack in `./gmail_pack`.\n\nThe `run()` function is a light wrapper around `agent.chat()`.\n\n```python\nresponse = gmail_agent_pack.run(\"What is my most recent email?\")\n```\n\nYou can also use modules individually.\n\n```python\n# Use the agent\nagent = gmail_agent_pack.agent\nresponse = agent.chat(\"What is my most recent email?\")\n\n# Use the tool spec in another agent\nfrom llama_index.core.agent import ReActAgent\n\ntool_spec = gmail_agent_pack.tool_spec\nagent = ReActAgent.from_tools(tool_spec.to_tool_lost())\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index packs gmail_openai_agent integration",
"version": "0.3.0",
"project_urls": null,
"split_keywords": [
"math",
" research",
" science"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4a66ed1d6e1c37d29406902707236db15158bf9aeca4cf5e50c31b5c954522e",
"md5": "9c24cd81f56a295915b54a5a76a8565b",
"sha256": "a3df7f5a1d280b99986b3fd840e6619eb4661ca9407189e82639a52491b9c727"
},
"downloads": -1,
"filename": "llama_index_packs_gmail_openai_agent-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9c24cd81f56a295915b54a5a76a8565b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 2756,
"upload_time": "2024-11-18T02:01:30",
"upload_time_iso_8601": "2024-11-18T02:01:30.788434Z",
"url": "https://files.pythonhosted.org/packages/e4/a6/6ed1d6e1c37d29406902707236db15158bf9aeca4cf5e50c31b5c954522e/llama_index_packs_gmail_openai_agent-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4e369af02a5a10bb3053aa511e13c09377b438d636254c773d3a90f897d9b514",
"md5": "82916b5cccb42ae92895534b66094a2c",
"sha256": "0f5029c96ac9160284f199ce31e6a4b535055a0f3754bda87385fd3c521cfea4"
},
"downloads": -1,
"filename": "llama_index_packs_gmail_openai_agent-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "82916b5cccb42ae92895534b66094a2c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 2434,
"upload_time": "2024-11-18T02:01:32",
"upload_time_iso_8601": "2024-11-18T02:01:32.251609Z",
"url": "https://files.pythonhosted.org/packages/4e/36/9af02a5a10bb3053aa511e13c09377b438d636254c773d3a90f897d9b514/llama_index_packs_gmail_openai_agent-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-18 02:01:32",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-packs-gmail-openai-agent"
}