projects
Package github.com/emergent-company/emergent.memory/apps/server/pkg/sdk/projects
The projects client manages Memory projects — the primary unit of organization for graph data, documents, and agents.
Methods
Section titled “Methods”func (c *Client) List(ctx context.Context, opts *ListOptions) ([]Project, error)func (c *Client) Get(ctx context.Context, id string, opts *GetOptions) (*Project, error)func (c *Client) Create(ctx context.Context, req *CreateProjectRequest) (*Project, error)func (c *Client) Update(ctx context.Context, id string, req *UpdateProjectRequest) (*Project, error)func (c *Client) Delete(ctx context.Context, id string) errorfunc (c *Client) ListMembers(ctx context.Context, projectID string) ([]ProjectMember, error)func (c *Client) RemoveMember(ctx context.Context, projectID, userID string) errorKey Types
Section titled “Key Types”Project
Section titled “Project”type Project struct { ID string Name string OrgID string Description string Status string TemplatePack *TemplatePack Stats *ProjectStats CreatedAt time.Time UpdatedAt time.Time}ProjectStats
Section titled “ProjectStats”type ProjectStats struct { ObjectCount int RelationshipCount int DocumentCount int ChunkCount int}ProjectMember
Section titled “ProjectMember”type ProjectMember struct { UserID string ProjectID string Role string JoinedAt time.Time}CreateProjectRequest
Section titled “CreateProjectRequest”type CreateProjectRequest struct { Name string OrgID string Description string}UpdateProjectRequest
Section titled “UpdateProjectRequest”type UpdateProjectRequest struct { Name string Description string Status string}ListOptions
Section titled “ListOptions”type ListOptions struct { OrgID string Limit int Offset int}GetOptions
Section titled “GetOptions”type GetOptions struct { IncludeStats bool}Example
Section titled “Example”// List all projectsprojects, err := client.Projects.List(ctx, &projects.ListOptions{ OrgID: "org_abc123",})
// Get a project with statsproj, err := client.Projects.Get(ctx, "proj_xyz", &projects.GetOptions{ IncludeStats: true,})fmt.Printf("%s: %d objects, %d documents\n", proj.Name, proj.Stats.ObjectCount, proj.Stats.DocumentCount)
// List membersmembers, err := client.Projects.ListMembers(ctx, "proj_xyz")