Skip to main content

Core functionality for Ctrl AI - A standardized protocol for managing AI interactions and personalized AI knowledge

Project description

Ctrl AI Core: Protocol Specification

License Python Code style: black

This repository defines the core protocol for Ctrl AI, an open standard for personalized AI knowledge. Ctrl AI empowers individuals and organizations to control their AI interactions by providing a structured and interoperable way to manage the information that AI agents use.

What is Ctrl AI?

Ctrl AI is a system for creating and managing Ctrl AIs - structured pieces of information that provide context, preferences, and knowledge to AI agents. This allows for:

  • Enhanced AI Performance: More relevant, accurate, and personalized AI responses
  • Increased Efficiency: Reduced need to repeatedly provide context
  • User Control: Fine-grained control over what information AI agents can access
  • Interoperability: A standardized way for different AI systems to share and use knowledge
  • Collaboration: Sharing of knowledge within teams and organizations

Core Components

This repository contains the following key components:

Installation

# Using pip
pip install ctrlai-core

# Using poetry
poetry add ctrlai-core

# Development installation
git clone https://github.com/ctrlai-com/ctrlai-core.git
cd ctrlai-core
poetry install

Quick Start

from ctrlai_core.validation import CtrlAI
from datetime import datetime

# Create and validate a Ctrl AI
ctrlai_data = {
    "@context": [
        "https://schema.org/",
        "https://ctrlai.com/schema/"
    ],
    "@type": "CtrlAI",
    "id": "urn:uuid:a1b2c3d4-e5f6-7890-1234-567890abcdef",
    "type": "preference:dietary",
    "value": {
        "@type": "DietaryRestriction",
        "name": "Vegetarian"
    },
    "source": "userInput",
    "confidence": 0.9,
    "scope": "personal"
}

try:
    ctrlai = CtrlAI(**ctrlai_data)
    print("✓ Ctrl AI is valid!")
except ValidationError as e:
    print(f"✗ Validation Error: {e}")

Documentation

For detailed documentation, visit our Documentation Site.

Development

# Install development dependencies
poetry install

# Run tests
poetry run pytest

# Run linting
poetry run black .
poetry run isort .
poetry run flake8 .

# Run type checking
poetry run mypy validation

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctrlai_core-1.0.4.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctrlai_core-1.0.4-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file ctrlai_core-1.0.4.tar.gz.

File metadata

  • Download URL: ctrlai_core-1.0.4.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.16 Darwin/23.6.0

File hashes

Hashes for ctrlai_core-1.0.4.tar.gz
Algorithm Hash digest
SHA256 23fcf284556ddf3059b35d10932e9e3e090c9147c10367c647a6c3491f63d4ab
MD5 a4df36915a4e58dd7ce1a4d1ff063a2a
BLAKE2b-256 d101c93c16afb4d18d89bab460c6ed8f3e3604ebfd30b624538a31f2aedc5e3e

See more details on using hashes here.

File details

Details for the file ctrlai_core-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: ctrlai_core-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.10.16 Darwin/23.6.0

File hashes

Hashes for ctrlai_core-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5f211fa99a76528d0a7be1a54c9f8279b55cc1a80b8e459c1817330285975852
MD5 779f49135b72e0a0eae7fb4afe7a893b
BLAKE2b-256 7ebbfd14aff6e57a9af6dbf3664a89cc7934f66b2c3e81fd688e4206077855ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page