# 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.workflow import ReActAgent
tool_spec = gmail_agent_pack.tool_spec
agent = ReActAgent(tools=tool_spec.to_tool_lost(), llm=llm)
```
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": null,
"author_email": "Your Name <you@example.com>",
"download_url": "https://files.pythonhosted.org/packages/46/ce/38220c3f9ab3ad037450cd3a35fba74f7a1464e1680df8a9e6d68c19b8ca/llama_index_packs_gmail_openai_agent-0.4.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.workflow import ReActAgent\n\ntool_spec = gmail_agent_pack.tool_spec\nagent = ReActAgent(tools=tool_spec.to_tool_lost(), llm=llm)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "llama-index packs gmail_openai_agent integration",
"version": "0.4.0",
"project_urls": null,
"split_keywords": [
"math",
" research",
" science"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cbc9d381566b17eb17cd905d852b589b00dde2a7bbcc97b5548cd4ccb9e7ab31",
"md5": "fd624a51047c8b5c549e18a2c5fb39ee",
"sha256": "bae02c949e194fd7756460e6ab114997d5e895807edc51fa0e87c06c96f39660"
},
"downloads": -1,
"filename": "llama_index_packs_gmail_openai_agent-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd624a51047c8b5c549e18a2c5fb39ee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 3664,
"upload_time": "2025-07-31T01:22:13",
"upload_time_iso_8601": "2025-07-31T01:22:13.467138Z",
"url": "https://files.pythonhosted.org/packages/cb/c9/d381566b17eb17cd905d852b589b00dde2a7bbcc97b5548cd4ccb9e7ab31/llama_index_packs_gmail_openai_agent-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "46ce38220c3f9ab3ad037450cd3a35fba74f7a1464e1680df8a9e6d68c19b8ca",
"md5": "bc14ac47ef9b86e3acf56c1bbde2cc61",
"sha256": "e0667ce8381d30eac15fbd82da311545fbeb2d037420a9bd6e1814c3ec53a41e"
},
"downloads": -1,
"filename": "llama_index_packs_gmail_openai_agent-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "bc14ac47ef9b86e3acf56c1bbde2cc61",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 3962,
"upload_time": "2025-07-31T01:22:14",
"upload_time_iso_8601": "2025-07-31T01:22:14.192521Z",
"url": "https://files.pythonhosted.org/packages/46/ce/38220c3f9ab3ad037450cd3a35fba74f7a1464e1680df8a9e6d68c19b8ca/llama_index_packs_gmail_openai_agent-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-31 01:22:14",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-packs-gmail-openai-agent"
}