Skip to main content
Agent(knowledge=...) accepts local file paths and plain text — URLs are not ingested and are skipped with a warning.

What Each Source Does

_process_knowledge inspects every item and routes it by type.
Agent(knowledge=["https://..."]) does not fetch the URL. It logs:
Only the scheme and host are logged — credentials and query strings are redacted.

Fetch, Then Pass Text

Fetch the page yourself and pass the text as a knowledge source.
Knowledge.add(url) used directly also does not fetch URLs — it raises NotImplementedError("URL processing not yet implemented"). Use the fetch-then-text recipe above for both the Agent and direct-Knowledge paths.

Best Practices

Fetch pages with requests, httpx, or a scraper, then pass the extracted text as a knowledge string.
Save PDFs and docs locally and pass the path — Knowledge.add(path) reads and chunks them for you.
A skipped URL logs a warning; if answers lack a source you expected, confirm it was a file or text, not a URL.

Knowledge Base

Chunking, embedding, and search options.

RAG

Retrieval-augmented generation patterns.