> ## Documentation Index
> Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Confluence

**ConfluenceTools** enable an Agent to retrieve, create, and update pages in Confluence. They also allow you to explore spaces and page details.

## Prerequisites

The following example requires the `atlassian-python-api` library and Confluence credentials. You can obtain an API token by going [here](https://id.atlassian.com/manage-profile/security).

```shell theme={null}
pip install atlassian-python-api
```

```shell theme={null}
export CONFLUENCE_URL="https://your-confluence-instance"
export CONFLUENCE_USERNAME="your-username"
export CONFLUENCE_PASSWORD="your-password"
# or
export CONFLUENCE_API_KEY="your-api-key"
```

## Example

The following agent will retrieve the number of spaces and their names.

```python theme={null}
from agno.agent import Agent
from agno.tools.confluence import ConfluenceTools

agent = Agent(
    name="Confluence agent",
    tools=[ConfluenceTools()],
    show_tool_calls=True,
    markdown=True,
)

agent.print_response("How many spaces are there and what are their names?")
```

## Toolkit Functions

| Parameter    | Type   | Default | Description                                                                                                             |
| ------------ | ------ | ------- | ----------------------------------------------------------------------------------------------------------------------- |
| `username`   | `str`  | -       | Confluence username. Can also be set via environment variable CONFLUENCE\_USERNAME.                                     |
| `password`   | `str`  | -       | Confluence password or API key. Can also be set via environment variables CONFLUENCE\_API\_KEY or CONFLUENCE\_PASSWORD. |
| `url`        | `str`  | -       | Confluence instance URL. Can also be set via environment variable CONFLUENCE\_URL.                                      |
| `api_key`    | `str`  | -       | Confluence API key (alternative to password).                                                                           |
| `ssl_verify` | `bool` | `True`  | If True, verify the SSL certificate.                                                                                    |

## Toolkit Functions

| Function                  | Description                                                     |
| ------------------------- | --------------------------------------------------------------- |
| `get_page_content`        | Gets the content of a specific page.                            |
| `get_all_space_detail`    | Gets details about all Confluence spaces.                       |
| `get_space_key`           | Gets the Confluence key for the specified space.                |
| `get_all_page_from_space` | Gets details of all pages from the specified space.             |
| `create_page`             | Creates a new Confluence page with the provided title and body. |
| `update_page`             | Updates an existing Confluence page.                            |

## Developer Resources

* View [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/confluence.py)
* View [Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/tools/confluence.py)
