Multi tenancy support

We have a SaaS platform, where each tenant’s data is stored in a different postgresql schema. Since the scheme is defined when creating the storage object, we will have to create the storage & agent object for every request.

Is there any broader interest to specify this while calling the run method?

We are interested in collaborating in this feature if there are more folks who need this.

Hi @navin, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.
If it’s urgent, please let us know. We appreciate your patience!

Hi @navin
Just to make sure I understand, the tenant’s table schema is created for each run. And the agent should access that schema I assume?

@Dirk For each run the schema can set using two options

  1. search search_path to “schema”
  2. db.connection(execution_options={“schema_translate_map”: {None: schema}})

Actual table creation, that happens when the the first time agent runs similar to how it’s handled today. Most production setup will actually abstract out table creation process as an alembic migration, which is what we have done.

Sorry I don’t fully understand the feature, but it is more important that it makes sense for your use-case, which it does! And yes welcome collaboration on features!