playGetting Started

Prerequisites

  • Python 3.8+ or Node.js 16+

  • Solana wallet (for on-chain verification)

  • OpenAI or Claude API key

Installation

Python SDK

pip install civitas-sdk

JavaScript SDK

npm install civitas-sdk

Quick Start Example

Python

from civitas import ProofAgent

# Initialize agent with your API key
agent = ProofAgent(
    api_key="your-api-key",
    model="gpt-4"
)

# Make a verified inference
response = agent.infer(
    message="What is the weather today?",
    verify=True
)

print(response.message)
print(response.proof)

# Verify proof on-chain
is_valid = agent.verify_proof(response.proof)
print(f"Proof valid: {is_valid}")

JavaScript

Verification Instructions

To verify the code running inside the TEE, follow the instructions provided in the verify documentation.


SDK Reference

Agent Initialization

Making Inferences

Response Object

Verification Methods

Framework Integration

Civitas works with existing AI agent frameworks:

ELIZA Integration

Custom Integration

Last updated