Skip to content

anchorco/anchor-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anchor SDK

License Build Status Version npm pip

Control what your AI agents store. Audit everything.

Block bad data before storage.

Prove what happened.

Rollback when things break.

Installation

Python: pip install anchorai

TypeScript/JavaScript: npm install anchorai

Quick Start

1. Sign Up and Get Credentials

  1. Go to getanchor.dev
  2. Sign up with your email (or log in if you already have an account)
  3. Copy your API Key (e.g., anc_abc123...)

Important: Save this securely - you won't be able to see the API key again!

2. Install the SDK

Python (PyPI, Code):

from anchor import Anchor

# Initialize with your API key
anchor = Anchor(api_key="your-api-key")

# Create an agent
agent = anchor.agents.create("support-bot")

# Configure policies
anchor.config.update(agent.id, {"policies": {"block_pii": True}})

TypeScript (NPM, Code):

import { Anchor } from 'anchorai';

// Initialize with your API key
const anchor = new Anchor({ 
  apiKey: 'your-api-key'
});

const agent = await anchor.agents.create('support-bot');
await anchor.config.update(agent.id, { policies: { block_pii: true } });
Namespace Purpose API coverage
anchor.agents Manage agents create, get, list, update, delete, suspend, activate
anchor.config Version configurations get, update, versions, get version, rollback
anchor.data Store data with policy enforcement write, read, read full, delete, delete prefix, list, search
anchor.checkpoints Create state snapshots and restore create, list, get, restore, delete
anchor.audit Keep hash-chained audit trail query, get, verify, export

Documentation

API Documentation

Python Reference

TypeScript Reference

Contributing: Please see CONTRIBUTING.md for guidelines.

License: This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Links