@verifiedstate/pydantic-ai
v0.2.0
Published
VerifiedState integration for PydanticAI — cryptographic receipts for every agent assertion
Maintainers
Readme
@verifiedstate/pydantic-ai
PydanticAI Validates the Shape. Not the Truth.
VerifiedState integration for PydanticAI. Adds cryptographic verification receipts to every assertion your PydanticAI agent makes.
Install
npm install @verifiedstate/pydantic-aiQuick Start
import { VerifiedStatePydanticAi } from '@verifiedstate/pydantic-ai';
const memory = new VerifiedStatePydanticAi({
apiKey: 'vs_live_...',
namespaceId: 'your-namespace-uuid',
});
// Store and verify a fact from your PydanticAI agent
const { artifact, assertions, receipts } = await memory.storeAndVerify(
'Customer prefers dark mode and uses PostgreSQL'
);
console.log(receipts[0].status); // "verified"
console.log(receipts[0].final_confidence); // 0.94
// Query verified memory
const results = await memory.query('What database does the customer use?');
console.log(results.answerable); // true
console.log(results.channels_used); // ["sparse", "dense"]Why
Every fact your PydanticAI agent stores should come with proof — a signed receipt showing what the claim is, what evidence supports it, and whether it's been challenged or superseded.
Without verification receipts, you have the agent's output. You don't have the reasoning.
API
store(content, sourceId?)
Store content from your PydanticAI agent.
extract(artifactId)
Extract structured assertions.
verify(assertionId)
Verify an assertion, produce a signed receipt.
storeAndVerify(content, sourceId?)
All-in-one: store, extract, verify.
query(queryText, limit?)
Six-channel retrieval with abstention.
health()
Namespace health metrics.
Links
License
MIT
