Projects

You do not construct these classes yourself. The client owns a ProjectManager and exposes it as client.project. Its operations return AiProjectHandle instances, each bound to one project and sharing the client’s connection. The handle wraps the raw AiProject record, documented in Models.

class arango_ai_sdk.projects.ProjectManager(communication, db_name)

Manage projects through the communication layer.

Parameters:
  • communication (Communication) – Shared transport. This namespace calls send_request and nothing else.

  • db_name (str) – Database the created project is stored in. Taken from the client, not from the user of create.

create(project_name, project_type, *, description=None)

Create a project and return it as AiProjectHandle.

Parameters:
  • project_name (str) – Project name.

  • project_type (str) – Project type, e.g. "autograph".

  • description (str, optional) – Optional description. Omitted from the body when not given.

Returns:

A handle for the created project.

Return type:

AiProjectHandle

Raises:

InvalidProjectNameError – The endpoint rejected the project name.

get(project_name)

Get a project and return it as AiProjectHandle.

Parameters:

project_name (str) – Project name.

Returns:

A handle for the requested project.

Return type:

AiProjectHandle

Raises:
class arango_ai_sdk.projects.AiProjectHandle(ai_project, communication)

Stores all project-scoped objects.

The handle holds the AiProject, the communication object and the service objects of the project: autograph and autorag.

Parameters:
  • ai_project (AiProject)

  • communication (Communication)

refresh()

Reload this project from the platform and return the new AiProject.

Every property on this handle reads from that snapshot afterwards, so metadata and model_settings reflect changes made since the handle was created, such as a service being deployed or removed.

Raises:
Return type:

AiProject

property name: str

Return project name stored in this handle.

property project_type: str

Return project type, e.g. "autograph".

property db_name: str

Return database name to which this project belongs.

property description: str | None

Return project description, or None if none was given.

property metadata: GraphRagProjectMetaData | None

Return project metadata describing the project’s services state.

property file_names: list[str]

Return names of the files uploaded to this project.

property model_settings: AutoGraphModelSettings | None

Return durable AutoGraph model and provider configuration.

property project: AiProject

Return raw AiProject object of this handle.

property autograph: AutoGraph

AutoGraph service handle in this project.

property autorag: AutoRagManager

Manager of the retriever services in this project.