Subject–predicate–object triples appended to a Strand and indexed three ways. Pattern queries with wildcards, neighbor traversal, and provenance baked in. Build social graphs, ontologies, and reasoning surfaces that stay verifiable end-to-end.
use gnosis::{Node, Triple, Pattern};
let node = Node::open(".weave/gnosis").await?;
// Append a fact.
node.add_triple(Triple::new(
"did:weave:alice", "follows", "did:weave:bob",
)).await?;
// Pattern query — who does alice follow?
let pat = Pattern::new("did:weave:alice", "follows", Pattern::wildcard());
for t in node.query_pattern(&pat).await? {
println!("{} → {}", t.predicate, t.object);
}
// Two-hop neighborhood.
let near = node.get_neighbors("did:weave:alice", /* depth */ 2).await?;Start with the SDK or load the agent context. Every library is independently documented and versioned.