Skip to main content

1. Create Account

Go to notary.agentsystems.ai and sign up. You’ll be prompted to name your organization.

2. Generate an API Key

  1. From the Dashboard, click Add under API Keys
  2. Name your key
  3. Select Test environment (production requires a paid plan)
  4. Click Generate Key
  5. Copy and save the key — it’s only shown once
Test keys start with sk_asn_test_. Hashes from test keys are retained for 7 days.

3. Set Up Your S3 Bucket

The SDK writes raw logs directly to your S3 bucket.
  1. Create an S3 bucket (names are globally unique, so include your company name — e.g., acme-corp-raw-ai-logs)
  2. Create the following IAM policy:
    {
      "Version": "2012-10-17",
      "Statement": [{
        "Effect": "Allow",
        "Action": ["s3:PutObject", "s3:GetObject", "s3:ListBucket"],
        "Resource": [
          "arn:aws:s3:::acme-corp-raw-ai-logs",
          "arn:aws:s3:::acme-corp-raw-ai-logs/*"
        ]
      }]
    }
    
  3. Create an IAM user and attach the policy
  4. Generate access keys for the user (select “Application running outside AWS”) and save them — the secret is only shown once
Bucket structure: The SDK writes logs to test/{tenant_id}/ or prod/{tenant_id}/ depending on your API key type.

4. Install the SDK

mkdir notary-demo && cd notary-demo
python3 -m venv .venv
source .venv/bin/activate
pip install "agentsystems-notary[langchain]" langchain-anthropic python-dotenv

5. Configure Environment

Create a .env file:
# AgentSystems Notary
AGENTSYSTEMS_NOTARY_API_KEY=sk_asn_test_...

# AWS credentials for your S3 bucket
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_DEFAULT_REGION=us-east-1

# Your LLM provider
ANTHROPIC_API_KEY=...

6. Integrate the SDK

Create test_langchain.py:
import os
from dotenv import load_dotenv
from agentsystems_notary import LangChainNotary
from langchain_anthropic import ChatAnthropic

load_dotenv()

# Initialize Notary callback
notary = LangChainNotary(
    api_key=os.getenv("AGENTSYSTEMS_NOTARY_API_KEY"),
    slug="customer-123",  # Your customer's identifier
    org_bucket_name="acme-corp-raw-ai-logs",
    debug=True
)

# Add to any LangChain model
model = ChatAnthropic(
    model="claude-sonnet-4-5-20250929",
    api_key=os.getenv("ANTHROPIC_API_KEY"),
    callbacks=[notary]
)

# All LLM calls are now logged
response = model.invoke("What is 2 + 2?")
print(response.content)
Run it:
python test_langchain.py
With debug=True, you’ll see confirmation that the log was written. Check your S3 bucket — there should be a new file under test/{tenant_id}/{year}/{month}/{day}/. Back in the dashboard, you’ll see “customer-123” appear in your Tenants list (auto-discovered from the slug).

7. Generate an Audit Ticket

  1. Go to notary.agentsystems.ai
  2. Click Tenants in the navbar (or View All from the Tenants card on the Dashboard)
  3. Click Generate Verification Ticket
  4. Select your tenant from the dropdown
  5. Select Test data type (production requires a paid plan)
  6. Leave the default date range or adjust if needed
  7. Check the confirmation box and click Download Ticket
This downloads a signed token that grants access to verify logs for this tenant and date range.

8. Export Your Logs

After downloading the ticket, a second modal will show commands to export logs from your S3 bucket. Copy and run the commands from the modal — they’ll have your tenant ID pre-filled. Replace YOUR_BUCKET with your S3 bucket name. Requires AWS CLI configured with credentials for your bucket.

9. Verify

  1. Go to verify.agentsystems.ai
  2. Upload the audit ticket (.json file)
  3. Upload the logs ZIP
  4. Click Start Verification
Results:
ResultMeaning
Verified RecordsRecords in the ZIP that match AgentSystems records
Unrecognized RecordsRecords in the ZIP that weren’t recorded by AgentSystems
Missing RecordsRecords that AgentSystems recorded but aren’t in the ZIP
After verification, you can download an attestation packet — a ZIP containing your logs, the audit ticket, a signed attestation certificate (PDF), and verification instructions. Attestation packets can be generated regardless of the verification outcome.