Runtime error in the example of 'agent with knowledge'

i’m following ‘your first agents’ section in the user guide
All went well, but when i try the ‘agent with knowledge’ code i get
RuntimeError: lance error: LanceError(Arrow): Arrow error: C Data interface error: Invalid: ListType can only be casted to FixedSizeListType if the lists are all the expected size.. Detail: Python exception: Traceback (most recent call last)
The stack trace is below
Any help would be appreciated
here is the full stack trace:
File “/home/shai/make-developers-brighter/experiments/agno_experiments/agno_agent_with_knowledge.py”, line 57, in
agent.knowledge.load(recreate=False)
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/agno/knowledge/agent.py”, line 133, in load
self.vector_db.insert(documents=documents_to_load, filters=filters)
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/agno/vectordb/lancedb/lance_db.py”, line 254, in insert
self.table.add(data)
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/lancedb/table.py”, line 1995, in add
LOOP.run(
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/lancedb/background_loop.py”, line 25, in run
return asyncio.run_coroutine_threadsafe(future, self.loop).result()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/concurrent/futures/_base.py”, line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/concurrent/futures/_base.py”, line 401, in __get_result
raise self._exception
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/lancedb/table.py”, line 3144, in add
await self._inner.add(data, mode or “append”)
RuntimeError: lance error: LanceError(Arrow): Arrow error: C Data interface error: Invalid: ListType can only be casted to FixedSizeListType if the lists are all the expected size.. Detail: Python exception: Traceback (most recent call last):
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/lancedb/table.py”, line 285, in gen
yield pa.Table.from_batches([batch]).cast(reordered_schema).to_batches()[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “pyarrow/table.pxi”, line 4725, in pyarrow.lib.Table.cast
File “pyarrow/table.pxi”, line 593, in pyarrow.lib.ChunkedArray.cast
File “/home/shai/virtual_ens/3.12/lib/python3.12/site-packages/pyarrow/compute.py”, line 410, in cast
return call_function(“cast”, [arr], options, memory_pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “pyarrow/_compute.pyx”, line 612, in pyarrow._compute.call_function
File “pyarrow/_compute.pyx”, line 407, in pyarrow._compute.Function.call
File “pyarrow/error.pxi”, line 155, in pyarrow.lib.pyarrow_internal_check_status
File “pyarrow/error.pxi”, line 92, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: ListType can only be casted to FixedSizeListType if the lists are all the expected size.
, /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lance-datafusion-0.26.0/src/utils.rs:49:31

seems like i needed to delete the lancedb and then i passed this error.
also small suggestion:

knowledge = UrlKnowledge(
    urls=["https://docs.agno.com/introduction/agents.md"],
    vector_db=LanceDb(
        uri="/tmp/lancedb", # <--- add a slash before tmp (it is missing in the docs)
        table_name="agno_docs",
        search_type=SearchType.hybrid,
        # Use OpenAI for embeddings
        # embedder=OpenAIEmbedder(id="text-embedding-3-small", dimensions=1536),
        embedder=open_ai_embedder
    ),
)

Hi @shai
thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.If it’s urgent, please let us know. We appreciate your patience!

@shai Thanks for pointing it out about the docs. Why did you have to delete the lancedb? Is it something on us that we could fix?

it is a good question about lancedb
i saw this comment in your code of the knowledge agent:
if name == “main”: # Load the knowledge base, comment out after first run # Set recreate to True to recreate the knowledge base if needed

which is kind of confusing and adds friction to onboarding.

Thanks for your feedback- I have shared it with the team!