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

# Confluence

> ConfluenceTools enable an Agent to retrieve, create, and update Confluence pages and explore spaces.

**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` and `openai` libraries and Confluence credentials. You can obtain an API token by going [here](https://id.atlassian.com/manage-profile/security).

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

```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()],
    markdown=True,
)

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

## Toolkit Params

| Parameter | Type | Default | Description |
| - | - | - | - |
| `username` | `Optional[str]` | `None` | Confluence username. If not provided, uses CONFLUENCE\_USERNAME environment variable. |
| `password` | `Optional[str]` | `None` | Confluence password. If not provided, uses CONFLUENCE\_PASSWORD environment variable. |
| `url` | `Optional[str]` | `None` | Confluence instance URL. If not provided, uses CONFLUENCE\_URL environment variable. |
| `api_key` | `Optional[str]` | `None` | Confluence API key (alternative to password). If not provided, uses CONFLUENCE\_API\_KEY environment variable. |
| `verify_ssl` | `bool` | `True` | Whether to verify SSL certificates when making requests. |

## 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. |

You can use `include_tools` or `exclude_tools` to modify the list of tools the agent has access to. Learn more about [selecting tools](https://agno-v2.mintlify.site/tools/selecting-tools.md).

## Developer Resources

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.