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:
- HTTP API (for external clients, microservices) - Port 9003
- 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, orsnap 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)
- macOS:
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- usesimportlib.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
.devYYYYMMDDHHMMSSsuffix)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d49e3a7c67694784c0e21b4f5fecd5718bc27fbc3b3ff5999576dee9ad3b1e46
|
|
| MD5 |
9108deb856f74244bf0bcce1e8db4d9a
|
|
| BLAKE2b-256 |
34cb6c32a5e9155114e40e1a98621818f26d25e401eb59f059c3d973fe8ee97a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ioc_knowledge_memory-0.2.1.tar.gz -
Subject digest:
d49e3a7c67694784c0e21b4f5fecd5718bc27fbc3b3ff5999576dee9ad3b1e46 - Sigstore transparency entry: 1228610699
- Sigstore integration time:
-
Permalink:
outshift-open/ioc-knowledge-memory@5ca6da795533cd78fed98e8c94c06397dd9c310e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/outshift-open
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@5ca6da795533cd78fed98e8c94c06397dd9c310e -
Trigger Event:
push
-
Statement type:
File details
Details for the file ioc_knowledge_memory-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ioc_knowledge_memory-0.2.1-py3-none-any.whl
- Upload date:
- Size: 85.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6293e92d26b76c0c4b9be1d083a6c0c4c813d8e06a432f06b7484719c8d5100e
|
|
| MD5 |
00946a79a4c82bbdb34a3132f4c33493
|
|
| BLAKE2b-256 |
272e9bed1a511af17f9f8d19f237f163b6f19df8e92c6bfc925cc3ccc8cd9241
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ioc_knowledge_memory-0.2.1-py3-none-any.whl -
Subject digest:
6293e92d26b76c0c4b9be1d083a6c0c4c813d8e06a432f06b7484719c8d5100e - Sigstore transparency entry: 1228610704
- Sigstore integration time:
-
Permalink:
outshift-open/ioc-knowledge-memory@5ca6da795533cd78fed98e8c94c06397dd9c310e -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/outshift-open
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yaml@5ca6da795533cd78fed98e8c94c06397dd9c310e -
Trigger Event:
push
-
Statement type: