前提条件
下面的示例需要atlassian-python-api 库和 Confluence 凭据。您可以通过此处获取 API 令牌。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
atlassian-python-api 库和 Confluence 凭据。您可以通过此处获取 API 令牌。
pip install atlassian-python-api
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"
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?")
| Parameter | Type | Default | Description |
|---|---|---|---|
username | str | - | Confluence 用户名。也可以通过环境变量 CONFLUENCE_USERNAME 设置。 |
password | str | - | Confluence 密码或 API 密钥。也可以通过环境变量 CONFLUENCE_API_KEY 或 CONFLUENCE_PASSWORD 设置。 |
url | str | - | Confluence 实例 URL。也可以通过环境变量 CONFLUENCE_URL 设置。 |
api_key | str | - | Confluence API 密钥(密码的替代选项)。 |
ssl_verify | bool | True | 如果为 True,则验证 SSL 证书。 |
| Function | Description |
|---|---|
get_page_content | 获取指定页面的内容。 |
get_all_space_detail | 获取所有 Confluence 空间 的详细信息。 |
get_space_key | 获取指定空间的 Confluence 键。 |
get_all_page_from_space | 获取指定空间的所有页面详情。 |
create_page | 使用提供的标题和正文创建新的 Confluence 页面。 |
update_page | 更新现有的 Confluence 页面。 |