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

!!!Important. Engramic must be run from within a virtual environment (e.g. venv).

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',
        [
            MessageService,
            RetrieveService,
            ResponseService,
            TestService,
        ],
    )

    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.2.0.tar.gz (535.1 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.2.0-py3-none-any.whl (571.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for engramic-0.2.0.tar.gz
Algorithm Hash digest
SHA256 39dd2b2cae6f9cbdf8e8d719c119ba51a35189fce6d42f5615865bf70f3f85aa
MD5 49c91e9cf0d2600ef547519376edf181
BLAKE2b-256 dff76cfabcca3657642907fb09717ba68c275f4656c60588c67df2cfa355d339

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for engramic-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b20e5067fd2b25b1a9d211577b474c2d0118afa0cbb64c5189ab436beb8fb7e
MD5 e2180e2196e8085ac92c99bad9de3fb9
BLAKE2b-256 6c21a5d89e91500209ad789c1b83b675ed40fed0ec76ef47128b116e727532d1

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