Skip to main content

An open source (for companies less than 250 employees) AI library for processing, storing, and retrieving proprietary, unstructured data.

Project description

Engramic Logo

Engramic: Build Apps that Answer, Learn, and Remember

What is Engramic?

Engramic is an advanced system designed to enhance AI applications with sophisticated context management and memory capabilities. Unlike conventional RAG implementations, Engramic goes beyond simple retrieval and response by integrating memory and learning mechanisms, enabling applications to synthesize their data, improving it's undersanding over time.

Core Features

  • Context Management: Maintain and utilize contextual awareness across multiple interactions.
  • Long-Term Memory: Store and recall relevant information dynamically for more natural and intelligent responses.
  • Learning Capability: Adapt over time based on interactions and inputs.

Development Status

We are in early stages of development and platform testing is limited. Core concepts are in place, but the system is still evolving. We encourage developers and researchers to follow our progress and contribute to shaping the future of Engramic.

Engramic Docs

Engramic Knowledge Base

Getting Started

The fastest way to begin working with Engramic is to download it from pip.

pip install engramic

During these early phases of development, we recommend working from source code. Setting up your environment is designed to be straightforward. See the "Getting Started" section in our documentation. The complete code is available in examples/mock_profile/mock_profile.py.

Starter Example

Run a mock version (no API key required) of Engramic.

Step 1. Include the imports & set logging:

import logging
from typing import Any

from engramic.application.message.message_service import MessageService
from engramic.application.response.response_service import ResponseService
from engramic.application.retrieve.retrieve_service import RetrieveService
from engramic.core.host import Host
from engramic.core.prompt import Prompt
from engramic.core.response import Response
from engramic.infrastructure.system import Service

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

Step 2. Create a test service and subscribe to the MAIN_PROMPT_COMPLETE message:

class TestService(Service):
    def start(self):
        self.subscribe(Service.Topic.MAIN_PROMPT_COMPLETE, self.on_main_prompt_complete)
        return super().start()

    def on_main_prompt_complete(self, message_in: dict[str, Any]) -> None:
        response = Response(**message_in)
        logging.info('\n\n================[Response]==============\n%s\n\n', response.response)
        self.host.shutdown()

Step 3. Create the host, add the services, and submit a prompt.

if __name__ == '__main__':

    host = Host(
        'mock',
        [
            # Order matters due to pub/sub dependencies.
            MessageService,
            RetrieveService,
            ResponseService,
            TestService,  #TestService must be last
        ],
    )

    retrieve_service = host.get_service(RetrieveService)
    retrieve_service.submit(Prompt('Tell me about the All In podcast.'))

    # The host continues to run and waits for a shutdown message to exit.
    host.wait_for_shutdown()

This example uses plugins that emulate API calls (i.e. mocks) to LLMs, databases, etc. by returning deterministic data. Visit the documentation for the next "Getting Started" example to use non-mock plugins.

Dependencies

Pure Python

  • Pluggy
  • Mako
  • Tomli
  • Cachetools
  • Websockets

Pure Python & C++

  • Pyzmq

Plugins

Plugins are managed in the engram_profiles.toml file which is generated during the first run. Engramic currently includes the plugins listed below.

Note: Plugin dependencies are downloaded on first run of the plugin and can be viewed in the plugin.toml file located in the root directory of the plugin.

Vector DB

  • ChomraDB

Database

  • SQLite

LLM

  • Gemini (2.0)

Embedding

  • Google ext-embedding-004

Getting Involved

If you're interested in contributing or have questions about Engramic, feel free to reach out to us:

Email: info@engramic.org

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

engramic-0.1.0.tar.gz (120.0 kB view details)

Uploaded Source

Built Distribution

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

engramic-0.1.0-py3-none-any.whl (150.5 kB view details)

Uploaded Python 3

File details

Details for the file engramic-0.1.0.tar.gz.

File metadata

  • Download URL: engramic-0.1.0.tar.gz
  • Upload date:
  • Size: 120.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for engramic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 28e8e30c9196a282d9564df2aeb5bef57854524c6e5ce7dfa2c1b9ba5e3b9aac
MD5 ad325ec0b8d765f0b9a81c63b9574096
BLAKE2b-256 d1d8f9b1cadfbce504e7a613acd9684190265ffeaacb92039964d2499b7ee283

See more details on using hashes here.

File details

Details for the file engramic-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: engramic-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 150.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for engramic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9a7e4acd9a7fec606742737346368c6d8b856e1c1010f08ee00e8c02a53e43c
MD5 60bc07c84e13fe184cb3c2601b9859d1
BLAKE2b-256 d18cf31286ce9feb5540180a1b6cd094592ce1d5d37a6087859411db3c45c5eb

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