代码
cookbook/tools/confluence_tools.py
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("有多少个空间以及它们的名字是什么?")
agent.print_response(
"'LLM 空间' 中的页面内容是什么?"
)
agent.print_response("'LLM' 空间的所有页面名称是什么?")
agent.print_response("能在 'LLM' 空间创建一个名为 'TESTING' 的新页面吗?")
用法
设置您的 API 凭证
export CONFLUENCE_API_TOKEN=xxx
export CONFLUENCE_SITE_URL=xxx
export CONFLUENCE_USERNAME=xxx
export OPENAI_API_KEY=xxx