ctrlai-core


Namectrlai-core JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/ctrl-ai/ctrlai-core
SummaryCore functionality for Ctrl AI - A standardized protocol for managing AI interactions and personalized AI knowledge
upload_time2025-02-18 21:42:07
maintainerNone
docs_urlNone
authorCtrl AI Team
requires_python>=3.9
licenseMIT
keywords ai control validation json-ld schema ai-control ai-protocol personalization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ctrl AI Core: Protocol Specification

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/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:

* **[Ctrl AI Blueprint](docs/blueprint.mdx):** A comprehensive overview of the Ctrl AI protocol, its goals, and its architecture
* **[Custom Vocabulary Definition](docs/vocabulary.mdx):** A formal definition of the Ctrl AI-specific types and properties
* **[JSON Schema](docs/schema.json):** A machine-readable schema that defines the structure of a Ctrl AI
* **[API Specification](docs/api_specification.mdx):** A high-level overview of the API principles
* **[Examples](examples/):** Example JSON-LD documents conforming to the Ctrl AI protocol
* **[Validation Package](validation/):** Python package with Pydantic models and validation functions

## Installation

```bash
# 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

```python
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](https://ctrlai-com.github.io/ctrlai-core/).

* [Protocol Overview](docs/blueprint.mdx)
* [API Reference](docs/api_specification.mdx)
* [Examples](examples/)
* [Contributing Guide](CONTRIBUTING.md)

## Development

```bash
# 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](CONTRIBUTING.md) for details.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

* [GitHub Issues](https://github.com/ctrlai-com/ctrlai-core/issues)
* [Documentation](https://ctrlai-com.github.io/ctrlai-core/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ctrl-ai/ctrlai-core",
    "name": "ctrlai-core",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ai, control, validation, json-ld, schema, ai-control, ai-protocol, personalization",
    "author": "Ctrl AI Team",
    "author_email": "info@ctrlai.com",
    "download_url": "https://files.pythonhosted.org/packages/d1/01/c93c16afb4d18d89bab460c6ed8f3e3604ebfd30b624538a31f2aedc5e3e/ctrlai_core-1.0.4.tar.gz",
    "platform": null,
    "description": "# Ctrl AI Core: Protocol Specification\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nThis 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.\n\n## What is Ctrl AI?\n\nCtrl 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:\n\n* **Enhanced AI Performance:** More relevant, accurate, and personalized AI responses\n* **Increased Efficiency:** Reduced need to repeatedly provide context\n* **User Control:** Fine-grained control over what information AI agents can access\n* **Interoperability:** A standardized way for different AI systems to share and use knowledge\n* **Collaboration:** Sharing of knowledge within teams and organizations\n\n## Core Components\n\nThis repository contains the following key components:\n\n* **[Ctrl AI Blueprint](docs/blueprint.mdx):** A comprehensive overview of the Ctrl AI protocol, its goals, and its architecture\n* **[Custom Vocabulary Definition](docs/vocabulary.mdx):** A formal definition of the Ctrl AI-specific types and properties\n* **[JSON Schema](docs/schema.json):** A machine-readable schema that defines the structure of a Ctrl AI\n* **[API Specification](docs/api_specification.mdx):** A high-level overview of the API principles\n* **[Examples](examples/):** Example JSON-LD documents conforming to the Ctrl AI protocol\n* **[Validation Package](validation/):** Python package with Pydantic models and validation functions\n\n## Installation\n\n```bash\n# Using pip\npip install ctrlai-core\n\n# Using poetry\npoetry add ctrlai-core\n\n# Development installation\ngit clone https://github.com/ctrlai-com/ctrlai-core.git\ncd ctrlai-core\npoetry install\n```\n\n## Quick Start\n\n```python\nfrom ctrlai_core.validation import CtrlAI\nfrom datetime import datetime\n\n# Create and validate a Ctrl AI\nctrlai_data = {\n    \"@context\": [\n        \"https://schema.org/\",\n        \"https://ctrlai.com/schema/\"\n    ],\n    \"@type\": \"CtrlAI\",\n    \"id\": \"urn:uuid:a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n    \"type\": \"preference:dietary\",\n    \"value\": {\n        \"@type\": \"DietaryRestriction\",\n        \"name\": \"Vegetarian\"\n    },\n    \"source\": \"userInput\",\n    \"confidence\": 0.9,\n    \"scope\": \"personal\"\n}\n\ntry:\n    ctrlai = CtrlAI(**ctrlai_data)\n    print(\"\u2713 Ctrl AI is valid!\")\nexcept ValidationError as e:\n    print(f\"\u2717 Validation Error: {e}\")\n```\n\n## Documentation\n\nFor detailed documentation, visit our [Documentation Site](https://ctrlai-com.github.io/ctrlai-core/).\n\n* [Protocol Overview](docs/blueprint.mdx)\n* [API Reference](docs/api_specification.mdx)\n* [Examples](examples/)\n* [Contributing Guide](CONTRIBUTING.md)\n\n## Development\n\n```bash\n# Install development dependencies\npoetry install\n\n# Run tests\npoetry run pytest\n\n# Run linting\npoetry run black .\npoetry run isort .\npoetry run flake8 .\n\n# Run type checking\npoetry run mypy validation\n```\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n* [GitHub Issues](https://github.com/ctrlai-com/ctrlai-core/issues)\n* [Documentation](https://ctrlai-com.github.io/ctrlai-core/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Core functionality for Ctrl AI - A standardized protocol for managing AI interactions and personalized AI knowledge",
    "version": "1.0.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/ctrl-ai/ctrlai-core/issues",
        "Documentation": "https://ctrlai-core.readthedocs.io/",
        "Homepage": "https://github.com/ctrl-ai/ctrlai-core",
        "Repository": "https://github.com/ctrl-ai/ctrlai-core"
    },
    "split_keywords": [
        "ai",
        " control",
        " validation",
        " json-ld",
        " schema",
        " ai-control",
        " ai-protocol",
        " personalization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ebbfd14aff6e57a9af6dbf3664a89cc7934f66b2c3e81fd688e4206077855ff",
                "md5": "779f49135b72e0a0eae7fb4afe7a893b",
                "sha256": "5f211fa99a76528d0a7be1a54c9f8279b55cc1a80b8e459c1817330285975852"
            },
            "downloads": -1,
            "filename": "ctrlai_core-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "779f49135b72e0a0eae7fb4afe7a893b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 11361,
            "upload_time": "2025-02-18T21:42:05",
            "upload_time_iso_8601": "2025-02-18T21:42:05.558984Z",
            "url": "https://files.pythonhosted.org/packages/7e/bb/fd14aff6e57a9af6dbf3664a89cc7934f66b2c3e81fd688e4206077855ff/ctrlai_core-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d101c93c16afb4d18d89bab460c6ed8f3e3604ebfd30b624538a31f2aedc5e3e",
                "md5": "a4df36915a4e58dd7ce1a4d1ff063a2a",
                "sha256": "23fcf284556ddf3059b35d10932e9e3e090c9147c10367c647a6c3491f63d4ab"
            },
            "downloads": -1,
            "filename": "ctrlai_core-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a4df36915a4e58dd7ce1a4d1ff063a2a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 10018,
            "upload_time": "2025-02-18T21:42:07",
            "upload_time_iso_8601": "2025-02-18T21:42:07.658942Z",
            "url": "https://files.pythonhosted.org/packages/d1/01/c93c16afb4d18d89bab460c6ed8f3e3604ebfd30b624538a31f2aedc5e3e/ctrlai_core-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-18 21:42:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ctrl-ai",
    "github_project": "ctrlai-core",
    "github_not_found": true,
    "lcname": "ctrlai-core"
}
        
Elapsed time: 0.50623s