# TasksToolkit

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/tasks/toolkit/TasksToolkit)

Toolkit for interacting with Google Tasks.

This toolkit provides tools for creating, listing, updating,
deleting, and retrieving tasks from Google Tasks.

## Signature

```python
TasksToolkit()
```

## Description

**Setup:**

Install ``langchain-google-community`` and set up Google authentication.

.. code-block:: bash

    pip install -U langchain-google-community

You'll need to enable the Google Tasks API and set up credentials.

**Instantiation:**

.. code-block:: python

from langchain_google_community import TasksToolkit

toolkit = TasksToolkit()

**Tools:**

.. code-block:: python

tools = toolkit.get_tools()
# Returns: [TasksCreateTask, TasksListTasks, TasksUpdateTask,
#           TasksDeleteTask, TasksGetTask]

**Use within an agent:**

.. code-block:: python

from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent

llm = ChatOpenAI(model="gpt-4o-mini")
agent_executor = create_react_agent(llm, tools)

example_query = "Create a task to review the quarterly report"
events = agent_executor.stream(
    {"messages": [("user", example_query)]},
    stream_mode="values",
)
for event in events:
    event["messages"][-1].pretty_print()

!!! warning "Security"
This toolkit contains tools that can read and modify the state of a
service. For example, it can create, update, and delete tasks
on behalf of the associated account.

See [Security Policy](https://docs.langchain.com/oss/python/security-policy)
for more information.

## Extends

- `BaseToolkit`

## Properties

- `api_resource`
- `model_config`

## Methods

- [`get_tools()`](https://reference.langchain.com/python/langchain-google-community/tasks/toolkit/TasksToolkit/get_tools)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/982e4015b249de8b9ba1e787746d8cc1f6d6b790/libs/community/langchain_google_community/tasks/toolkit.py#L28)