Skip to content

Releases: strands-labs/ai-functions

v0.2.0a1

08 Apr 01:21
43e7c7d

Choose a tag to compare

v0.2.0a1 Pre-release
Pre-release

What's New

This release adds support for persistent, optimizable memory parameters in
agentic workflows, enabling a form of natural-language backpropagation through
agent execution graphs – analogous to how PyTorch or JAX optimize parameters
through a computation graph.

Computation Graph

A new ai_function.trace() method builds a graph of all function calls and
memory accesses, enabling a backward pass from output feedback to the parameters
that produced it. Intermediate Result nodes can be passed across multiple AI
Function calls to build multi-agent graphs, and optimizers can walk the graph to
automatically distribute feedback to the right agent and parameters.

Optimizer

A pluggable Optimizer base class for feedback propagation. This release ships
with a TextGrad-inspired implementation that walks the graph backward
node-by-node, using an LLM to distribute feedback to leaf parameters and
consolidate updates into the memory backend.

Memory Backends

A pluggable MemoryBackend base class for storing memory parameters (strings,
lists, code, ...) and automatically tracking memory accesses in the computation
graph. This release ships with two implementations:

  • JSONMemoryBackend: file-based, backed by TinyDB
  • AgentCoreMemoryBackend: backed by Amazon Bedrock AgentCore

Backends can also expose parameters as agent tools, letting the agent decide
dynamically when and what to retrieve — all accesses remain tracked in the graph.

Procedural Parameters

A special Procedural parameter type stores reusable Python functions distilled
from the agent's execution trace, allowing subsequent runs to reuse proven code
rather than regenerating it from scratch, analogous to JIT compilation for
agentic logic.

Other Improvements

  • Improved typing with separate SyncAIFunction and AsyncAIFunction classes
    and ParamSpec generics
  • Migrated template engine to tstr
  • Added graph visualization utilities (show_graph)

Examples

See the updated docs/tutorial.md for documentation of new features. See examples/memory_*.py for end-to-end examples covering optimization, list parameters, tool-based memory access, procedural parameters, and AgentCore integration.

Notes

This is an alpha release. APIs may change before 0.2.0 stable.

v0.1.0

23 Feb 17:56

Choose a tag to compare

AI Functions - Functions that think, validate, and self-correct. Welc…