Fetch.ai has recently launched ASI-1 Mini, a Web3-native LLM designed for complex, autonomous workflows.

Try nowopen-new-tab-icon
article_icon
article

uAgents v0.21 Update - Expanding Protocol Flexibility & Message Handling

uAgents v0.21 brings a more structured and reliable approach to agent development.

2025-03-183 min readFetch.ai

The latest update to uAgents introduces enhanced protocol definition, more flexible messaging between agents, and broader compatibility, making agent-based interactions more robust and developer-friendly. v0.21 builds on the foundation of structured multi-agent communication by refining protocol enforcement, optimizing messaging workflows, and supporting new Python versions.

Key Updates 

1. Request-Response Messaging for More Reliable Interactions

We've added a new function to send message and wait for response, enabling agents to process the responses from other agents within a single message handler. This allows the sender to specify:

  • The expected response type

  • A timeout (optional) to ensure agents do not wait indefinitely

  • Compatibility for both asynchronous and synchronous messaging

This enhancement streamlines agent interactions, ensuring that messages expecting a response are handled efficiently while maintaining a clear conversation structure. This also makes it easier to compose chaining of agents where one agent's response depends on that of another.

2. Protocol Specification for Structured Communication

With uAgents v0.21, defining protocols becomes more structured with ProtocolSpecification. This new approach allows developers to explicitly define interactions and roles within a protocol, ensuring strict adherence to predefined workflows.

This helps with the following:

  • Ensures protocol consistency: Enforcing message constraints at the protocol level avoids unexpected deviations.

  • Automatic verification: Agents including a protocol must implement all required message handlers, avoiding incomplete implementations.

  • Locks the protocol structure: Prevents adding messages outside of defined interactions, preserving protocol integrity.

3. Persistent Message Storage by Session

This release enhances message storage by introducing session-based retrieval, enabling agents to retain historical interactions. This upgrade modifies EnvelopeHistory to optionally utilize persistent storage, making it easier to:

  • Store and retrieve conversations for longer-lived agent interactions

  • Support stateful applications requiring session-based context

4. Expanded Compatibility & Code Quality Improvements

  • Now supports Python 3.13, ensuring compatibility with the latest advancements in Python development.

  • Improved CI testing with code coverage checks, reinforcing code stability and maintainability.

5. Miscellaneous Fixes & Optimizations

Several under-the-hood improvements were made to boost performance and reliability:

  • Startup tasks are more precisely scheduled, ensuring that initial tasks always occur in the correct order.

  • Reply verification only runs for relevant messages, reducing unnecessary processing.

  • Less restrictive Pydantic version constraint, improving flexibility in dependency management.

  • Moves examples to a new dedicated repo, keeping the core library lightweight.

uAgents v0.21 brings a more structured and reliable approach to agent development. Developers can now define more complex workflows with guaranteed interaction constraints while ensuring historical message consistency. As the uAgents ecosystem evolves, these updates lay the groundwork for more sophisticated agent interactions, bringing us closer to seamless agent-driven applications.

Stay tuned for more updates and start building with uAgents v0.21 today!


More from Fetch