Skip to main content

ioc-knowledge-memory-svc

Project description

ioc-knowledge-memory-svc

ioc-knowledge-memory-svc - APIs for knowledge management

Usage Options

This service can be accessed in two ways:

  1. HTTP API (for external clients, microservices) - Port 9003
  2. Direct Library (for Python in-process, 10x faster) - See knowledge_memory

Prerequisites

  • Python 3.8+
  • Poetry: curl -sSL https://install.python-poetry.org | python3 -
  • Task:
    • macOS: brew install go-task
    • Linux: apt install task, dnf install go-task, or snap install task --classic
    • Cross-platform: npm install -g @go-task/cli
    • Go users: go install github.com/go-task/task/v3/cmd/task@latest
    • Manual install: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
    • All-in-one setup: ./install.sh (installs Poetry and Task globally, and dependencies)

Quick Start

Deployment Options

task docker-compose-up       # Start complete stack (application + databases)

Alternative Quick Start Methods

Dev setup (installs Poetry and Task globally)

./install.sh
task dev

Manual setup (if you have Poetry/Task already)

poetry install
task dev

API Documentation: http://localhost:9003/docs http://localhost:9003/openapi.json

Development

Using Task

task dev              # Start development server
task test             # Run all tests
task docker-build     # Build Docker image
task docker-run       # Run Docker container

Using Poetry directly

cd src/server
poetry run python main.py

Using Docker

docker-compose up --build

Version Management

This project uses pyproject.toml as the single source of truth for versioning.

How to Bump Version

Simply edit one line in pyproject.toml:

[project]
version = "0.1.5"  # Change this line only!

All other locations automatically sync:

  • setup.py - reads from pyproject.toml
  • src/knowledge_memory/__init__.py - uses importlib.metadata
  • .github/workflows/ci.yaml - dynamically reads and updates for dev builds

No manual sync needed! The version is automatically propagated to:

  • Package metadata when building
  • Runtime __version__ attribute
  • CI/CD dev builds (adds .devYYYYMMDDHHMMSS suffix)

Version Format

We follow PEP 440 versioning:

  • Release versions: 0.1.4, 0.2.0, 1.0.0
  • Dev builds (CI): 0.1.4.dev20260316120000

Python Library (New!)

For in-process, high-performance access without HTTP overhead:

from knowledge_memory import upsert_knowledge_graph, query_knowledge_graph
from knowledge_memory import onboard_vector_store, upsert_vector_store

# Direct function calls - no HTTP!
response = upsert_knowledge_graph(
    mas_id="agent-1",
    wksp_id="workspace-1",
    concepts=[{"id": "c1", "name": "Python"}]
)

Benefits:

  • 🚀 10x faster than HTTP API (no network overhead)
  • 🐍 Type-safe Python exceptions
  • 🔧 Same features as HTTP API
  • No regression - HTTP API still works

Documentation: See src/knowledge_memory/README.md

Quick test:

python src/knowledge_memory/examples.py     # Run examples
pytest tests/test_knowledge_memory.py -v    # Run tests
python3 validate_knowledge_memory.py        # Validate structure

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

ioc_knowledge_memory-0.2.1.tar.gz (64.5 kB view details)

Uploaded Source

Built Distribution

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

ioc_knowledge_memory-0.2.1-py3-none-any.whl (85.0 kB view details)

Uploaded Python 3

File details

Details for the file ioc_knowledge_memory-0.2.1.tar.gz.

File metadata

  • Download URL: ioc_knowledge_memory-0.2.1.tar.gz
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ioc_knowledge_memory-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d49e3a7c67694784c0e21b4f5fecd5718bc27fbc3b3ff5999576dee9ad3b1e46
MD5 9108deb856f74244bf0bcce1e8db4d9a
BLAKE2b-256 34cb6c32a5e9155114e40e1a98621818f26d25e401eb59f059c3d973fe8ee97a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ioc_knowledge_memory-0.2.1.tar.gz:

Publisher: ci.yaml on outshift-open/ioc-knowledge-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ioc_knowledge_memory-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ioc_knowledge_memory-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6293e92d26b76c0c4b9be1d083a6c0c4c813d8e06a432f06b7484719c8d5100e
MD5 00946a79a4c82bbdb34a3132f4c33493
BLAKE2b-256 272e9bed1a511af17f9f8d19f237f163b6f19df8e92c6bfc925cc3ccc8cd9241

See more details on using hashes here.

Provenance

The following attestation bundles were made for ioc_knowledge_memory-0.2.1-py3-none-any.whl:

Publisher: ci.yaml on outshift-open/ioc-knowledge-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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