Briefs
Inspect prepared Mind briefs between ideas and generated drafts.
Approve a ready brief, which starts draft generation from its draft prompt
/organizations/{organizationId}/projects/{projectId}/mind/briefs/{briefId}/approveApproves a ready Mind brief and starts draft generation from the brief's canonical draft prompt. The brief must be in 'ready' status.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "default-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const result = await gc.briefs.approveBrief({ organizationId: org.id, projectId: projects[0].id, briefId: "brief-123",});
Reject a ready brief so it never reaches draft generation
/organizations/{organizationId}/projects/{projectId}/mind/briefs/{briefId}/rejectRejects a ready Mind brief so it cannot be used to generate a draft.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const result = await gc.briefs.rejectBrief({ organizationId: org.id, projectId: projects[0].id, briefId: "brief-123", data: { reason: "Does not meet requirements" }});
Get one brief's full paper trail from idea to draft prompt
/organizations/{organizationId}/projects/{projectId}/mind/briefs/{briefId}Returns full details of a Mind brief, including stream selection, discovery, plan, design, audit, retry history, and draft prompt/spec artifacts.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const brief = await gc.briefs.getBrief({ organizationId: org.id, projectId: projects[0].id, briefId: "brief-123",});
List Mind briefs for a project
/organizations/{organizationId}/projects/{projectId}/mind/briefsReturns a paginated list of Mind briefs for the project. Briefs are the prepared bridge between ideas and generated drafts, including stream, planning, audit, and draft prompt artifacts.
import { createGiantContext } from "@giantcontext/sdk-typescript";
const gc = createGiantContext({ apiKey: process.env.GIANTCONTEXT_API_KEY! });
const org = await gc.organizations.getOrganizationBySlug({ slug: "my-org" });const { projects } = await gc.projects.listProjects({ organizationId: org.id });
const { briefs } = await gc.briefs.listBriefs({ organizationId: org.id, projectId: projects[0].id,});