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.
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
Convert web content to text before ingesting
Convert web content to text before ingesting
Fetch pages with
requests, httpx, or a scraper, then pass the extracted text as a knowledge string.Prefer local files for documents
Prefer local files for documents
Save PDFs and docs locally and pass the path —
Knowledge.add(path) reads and chunks them for you.Check logs if a source seems missing
Check logs if a source seems missing
A skipped URL logs a warning; if answers lack a source you expected, confirm it was a file or text, not a URL.
Related
Knowledge Base
Chunking, embedding, and search options.
RAG
Retrieval-augmented generation patterns.

