Download Latest Version v8.0.0 source code.zip (928.2 kB)
Home / v6.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-10-22 2.6 kB
v6.0.0 source code.tar.gz 2026-10-22 368.9 kB
v6.0.0 source code.zip 2026-10-22 502.0 kB
Totals: 3 Items   873.5 kB 0

Highlights

This is a major release because it changes two public APIs (see Migrating below).

Persistent memory. BaseMemory is now async, so it can be backed by a real database:

  • SqliteMessageHistory and PostgresMessageHistory, available with any feature that pulls in sqlx (postgres, sqlite-vec, sqlite-vss). They create the table on first use; use without_migration() if you manage the schema yourself.
  • TokenBufferMemory trims the history to a token budget.

See examples/persistent_memory.rs. Thanks to @appflowy for [#316], which this builds on.

One tool-call type for every provider. OpenAI, Claude, Ollama and Bedrock now return tool calls as GenerateResult.tool_calls: Vec<ToolCall> (id, name, arguments), so there's no provider-specific JSON to parse. OpenAiToolAgent uses it, so the same agent works on all four.

Wikipedia tool. WikipediaQuery searches Wikipedia and returns article summaries, in any language edition (thanks @imlucas, [#330]).

Migrating from 5.x

Memory: the methods are async and return Result<_, MemoryError>:

:::rust
// before
let history = memory.messages();
memory.add_user_message("hi");
// after
let history = memory.messages().await?;
memory.add_user_message(&"hi").await?;

If you have your own BaseMemory, add #[async_trait] and update the signatures. MemoryError converts into ChainError and AgentError, so ? works inside chains and agents.

GenerateResult has a new tool_calls field. If you build one yourself (e.g. in a custom LLM), add ..Default::default():

:::rust
GenerateResult { generation, tokens, ..Default::default() }

generation still holds the tool calls as the same JSON array as before, so code that parses it keeps working.

What's Changed

  • feat(memory)!: async BaseMemory, token buffer, SQLite/Postgres history by @Abraxas-365 in [#346] (builds on [#316] by @appflowy)
  • feat(llm)!: provider-neutral ToolCall on GenerateResult by @Abraxas-365 in [#347]
  • feat(tools): Wikipedia tool by @imlucas in [#330]
  • chore: release v6.0.0 in [#348]

Notes

  • Fixed along the way: if a model answered with a bare [], the tools agent used to loop until max_iterations. That's now a final answer.
  • SQLite history is tested in-memory in CI. The Postgres tests are #[ignore]d and need a database (PG_MEMORY_TEST_URL). Redis/Mongo backends aren't there yet; issues and PRs welcome.

Full Changelog: https://github.com/Abraxas-365/langchain-rust/compare/v5.2.0...v6.0.0

Source: README.md, updated 2026-10-22