Prerequisites: a client and a shape that
exists in your project to extract through. List shapes with
pb.shapes.list().Set up the client
Run the pipeline
Register the source
Register the material so it can be extracted. Use whatever you already run as
the source — a document, a database export, a SaaS record, an event payload.
The returned id is what you extract and read against.The same registration step covers anything you can hand the pipeline. The
type and name describe where the material came from; the content or
reference follows your upload flow.Extract through a shape (staged)
Extraction coerces the source into entities and relationships that match the
shape. Stage it with The same source can be extracted through different shapes to surface
different structure. The shape is the lens you read the material with — point
it at a contract shape to land terms, or a research shape to land findings.
apply: false so you can review before it lands.Review the delta
Extraction stages a delta — a staged set of changes
that has not touched the graph yet. Plan it to see what applying it would add.The plan is your review gate. Nothing in the source reaches the queryable
graph until you decide it should.
Apply
Commit the delta when the plan looks right.If an applied delta turns out wrong, you can undo it with
pb.deltas.revert(receipt.deltaId). Preview the undo first with
pb.deltas.revertPreview(receipt.deltaId).Run it on a schedule
The four-step loop is the unit you automate. Point it at a system you already run, and on each pull you register the new material, extract it staged, plan, and apply. Because every extraction stages a delta before committing, you keep a review gate even when the pipeline runs unattended — and an undo path throughpb.deltas.revert if a batch lands wrong.
What you have now
The material from your systems is no longer scattered across formats. It is typed entities in a governed graph, each tracing back to the source it came from. You can search them, check whether they are fit to act on, and pull more sources through the same loop. What you actually authored, by choosing the shape to extract through, is an ontology — the shape decides what structure your systems land as.Sources reference
Every
pb.sources method.Semantic git
How staging, planning, applying, and reverting work.