Skip to content

S3-native storage

Python is S3-native: pass the S3 location and the bucket is the store — vectors, manifests, and provenance are written into it. Go and JavaScript ship no S3 store, so there the bucket stays a pile of documents you read into a corpus with your normal AWS SDK. Either way the credentials come from the environment.

from citenexus import CiteNexus, S3
rag = CiteNexus(
S3(bucket="citenexus-local", endpoint_url="http://localhost:19000"), # omit for AWS
embedder=..., generator=...,
)
rag.ingest("corpus/nda.txt") # sources are ingested individually
rag.ingest("https://example.com/policy") # a URL is fetched and ingested
r = rag.ask("What notice does termination require?")
print(r.evidence.decision, "|", r.sources[0].document)
# answered | nda

The local MinIO compose file in the repo brings up an S3 endpoint on :19000 for development — every tab above runs against it.