Core engine: FSRS scheduling + Knowledge Graph + Spreading Activation
Project description
spikuit-core
Core engine + lightweight RAG client for Spikuit — a knowledge base that gets smarter the more you use it.
⚠️ Pre-1.0 / under active development. Expect frequent breaking changes until v1.0.0.
spikuit-core ships in two profiles:
| Install | Pulls in | Use case |
|---|---|---|
pip install spikuit-core |
httpx, numpy |
Read-only RAG client over an exported brain.db bundle |
pip install spikuit-core[engine] |
+ fsrs, networkx, aiosqlite, sqlite-vec, msgspec |
Full Brain engine: FSRS scheduling, knowledge graph, spreading activation, STDP |
The minimal install is what you deploy to a server — the heavy engine deps stay on the authoring machine.
Quick start (RAG client)
Author a brain locally with the full engine (or via the spkt CLI from
spikuit-cli), export it once,
then retrieve from anywhere with just spikuit-core:
import asyncio
import os
from spikuit_core import QABot
os.environ["SPIKUIT_EMBEDDER_BASE_URL"] = "http://localhost:1234/v1"
brain = QABot.load("brain.db")
async def main() -> None:
hits = await brain.retrieve("What is a monad?", limit=5, domain="math")
for h in hits:
print(f"{h.score:.3f} {h.content[:80]}")
asyncio.run(main())
QABot.load resolves the embedder endpoint in this order:
SPIKUIT_EMBEDDER_BASE_URL/SPIKUIT_EMBEDDER_API_KEYenv varsbase_url=/api_key=keyword arguments- The hint stored in the bundle
If the bundle was exported with provider="none", QABot runs in keyword-only mode and never calls an embedding API.
Quick start (full engine)
import asyncio
from spikuit_core import Circuit, Neuron
async def main() -> None:
c = Circuit(db_path="brain.db")
await c.connect()
await c.add_neuron(
Neuron.create("---\ntype: concept\ndomain: math\n---\n# Monad\n\n型の文脈化を表す抽象")
)
await c.close()
asyncio.run(main())
Engine symbols (Circuit, Neuron, Session, etc.) are loaded lazily via
PEP 562 __getattr__ — importing them without the [engine] extras raises
a friendly ImportError pointing at the install command.
Links
- Documentation: https://takyone.github.io/spikuit/
- RAG quickstart: https://takyone.github.io/spikuit/rag/quickstart/
- Source: https://github.com/takyone/spikuit
- Issues: https://github.com/takyone/spikuit/issues
License
Apache-2.0
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 spikuit_core-0.6.1.tar.gz.
File metadata
- Download URL: spikuit_core-0.6.1.tar.gz
- Upload date:
- Size: 94.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abd90a76722308f4af0fc6584857bb9223c41e3ed7f4f2274633b94f175a6c8b
|
|
| MD5 |
92ae659ce2733ff083505332b747828e
|
|
| BLAKE2b-256 |
e7e208a4c93f6952e31d68f2c4dd98fdec736390eb4454a56f94d4382d24cfcb
|
Provenance
The following attestation bundles were made for spikuit_core-0.6.1.tar.gz:
Publisher:
publish.yml on takyone/spikuit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spikuit_core-0.6.1.tar.gz -
Subject digest:
abd90a76722308f4af0fc6584857bb9223c41e3ed7f4f2274633b94f175a6c8b - Sigstore transparency entry: 1280702360
- Sigstore integration time:
-
Permalink:
takyone/spikuit@7432bc4d9e47a666e322e5df533f9f1ac40f0aa2 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/takyone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7432bc4d9e47a666e322e5df533f9f1ac40f0aa2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spikuit_core-0.6.1-py3-none-any.whl.
File metadata
- Download URL: spikuit_core-0.6.1-py3-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb3a33331274b723e07d0471dc6e29ce90f8401c51dd2bca95283ca92a552d2
|
|
| MD5 |
a03fc9148f8ca1306a9866c3a9b0ddf7
|
|
| BLAKE2b-256 |
779ebf8b2239ea2fab6556f867c0fb8d28fa0fa155d413b848d5f9c99b309051
|
Provenance
The following attestation bundles were made for spikuit_core-0.6.1-py3-none-any.whl:
Publisher:
publish.yml on takyone/spikuit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spikuit_core-0.6.1-py3-none-any.whl -
Subject digest:
2cb3a33331274b723e07d0471dc6e29ce90f8401c51dd2bca95283ca92a552d2 - Sigstore transparency entry: 1280702366
- Sigstore integration time:
-
Permalink:
takyone/spikuit@7432bc4d9e47a666e322e5df533f9f1ac40f0aa2 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/takyone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7432bc4d9e47a666e322e5df533f9f1ac40f0aa2 -
Trigger Event:
push
-
Statement type: