Skip to main content
NiadraAG2(conversation) gives middleware (for the Agent’s middleware= list) and tools. Python only. This is the adapter for AG2 1.x (pip install ag2), the community continuation of AutoGen; for Microsoft’s line, AutoGen’s successor is the Agent Framework, with an adapter of its own.

Install

The five primitives

Minimal example

The same code is in examples/ag2_agent.py.

Agent memory

NiadraAG2(conversation, agent_memory=True) puts the agent’s own notes before the customer’s context and adds the two tools. See Agent memory.

Limits

  • Works with Niadra and AsyncNiadra conversations.
  • Nothing here stops the agent: with Niadra slow or down, it runs without the pack and a tool answers that the history is unavailable.
  • An AutoGen 0.4 agent (the older line) uses the kit’s tools and conversation.context() directly; there is no adapter of its own.
  • Tested against ag2 1.1.0 with the model replaced by a fake and Niadra on the emulator.

Next steps

Microsoft Agent Framework

the context provider of Microsoft’s line.

History navigation

the three tools the agent receives.