v2.2.4

October 29, 2025

Update and manage your agents dynamically during runtime

With access to the AgentOS instance within lifespan functions, you can now modify configurations, add agents, or resync settings after initialization, giving you greater flexibility and control over your AgentOS environment.

from agno.os import AgentOS
from contextlib import asynccontextmanager

@asynccontextmanager
async def lifespan(app, agent_os):
    # Access the AgentOS instance
    # Update configurations dynamically
    agent_os.agents.append(new_agent)
    agent_os.resync(app=app)
    yield

agent_os = AgentOS(
    lifespan=lifespan,
    agents=[agent1]
)


This is useful for runtime configuration updates and dynamic agent management.

View AgentOS reference