Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

Read and write to a directory of markdown files. The provider exposes two tools: query_wiki for reading, update_wiki for writing. With a Git backend, writes auto-commit and push.
from os import getenv
from agno.agent import Agent
from agno.context.wiki import WikiContextProvider
from agno.context.wiki.backend import GitBackend

wiki = WikiContextProvider(
    backend=GitBackend(
        repo_url="https://github.com/org/wiki.git",
        branch="main",
        github_token=getenv("GITHUB_TOKEN"),
    )
)

await wiki.asetup()

agent = Agent(
    model=...,
    tools=wiki.get_tools(),
)

await agent.arun("Add a page about our deployment process")
await wiki.aclose()

Backends

Auto-commits and pushes changes.
from os import getenv
from agno.context.wiki.backend import GitBackend

backend = GitBackend(
    repo_url="https://github.com/org/wiki.git",
    branch="main",
    github_token=getenv("GITHUB_TOKEN"),
)
wiki = WikiContextProvider(backend=backend)

Configuration

ParameterTypeDefaultDescription
backendWikiBackendrequiredGitBackend or FileSystemBackend.
idstr"wiki"Tools become query_<id> and update_<id>.
webContextBackendNoneOptional web backend for ingestion (fetch URL → write page).
modelModelNoneModel for sub-agents.
readboolTrueExpose query_wiki.
writeboolTrueExpose update_wiki.

Tools Exposed

ToolDescription
query_wikiSearch pages, read content, list structure.
update_wikiCreate pages, edit content. Auto-commits with Git backend.

Web Ingestion

Add a web backend to let the agent fetch URLs and write them as wiki pages:
from agno.context.web import ExaBackend

wiki = WikiContextProvider(
    backend=GitBackend(...),
    web=ExaBackend(),
)

# Agent can now: "Add this article to the wiki: https://..."

Lifecycle Management

WikiContextProvider with GitBackend requires setup/teardown:
await wiki.asetup()   # Clone repo
try:
    # Use the provider
finally:
    await wiki.aclose()

Example queries

QueryWhat happens
”What do we have documented about authentication?”Searches wiki content
”Create a page about the new API endpoints”Creates markdown file, commits
”Update the deployment guide with the new steps”Edits file, commits

Resources

File Tools Reference

Underlying file operations

Cookbook Example

Git-backed wiki example