---
# SynLrn – Modular Multi-Stage Learning for AI (No Naming or Structure Restrictions)
## Overview
**SynLrn** is a production-ready, modular system for context-based learning memory and retrieval—designed for any AI or agent workflow.
SynLrn supports any number of **custom learning stages**, adapts to your data, and makes context recall fast and simple—**no naming, schema, or vendor constraints.**
**Highlights:**
* **Any learning stages you want:** Use any stage names or workflow steps (thinking, clarifying, etc.)
* **No format restrictions:** Structure your learned data and knowledge base how you want.
* **No external server:** Everything runs locally, uses fast SQLite and RapidFuzz.
* **Plug-in knowledge base:** Start empty or preload with your own examples.
* **Works with all frameworks:** Use SynLrn in any Python project, agent, or LLM pipeline.
---
## Why SynLrn?
Traditional “memory” frameworks force you to:
* Use their schema, stage names, or folder structures.
* Fit your workflow to *their* definitions.
* Often require a server, specific model, or fixed APIs.
**SynLrn:**
* **Lets you define your own learning flow**—no hard-coded stage names, no schema lock-in.
* **Loads any data, any way:** Add, group, and recall examples however you want.
* **Keeps you in control:** Your workflow, your code, your memory.
---
## Key Features
* **Flexible stage loading:** Use any number of workflow stages.
* **Pluggable knowledge base:** Point to your own Python modules or classes.
* **Context-based retrieval:** RapidFuzz for fast, fuzzy example recall.
* **Low token use:** Matches and retrievals use minimal tokens, ideal for LLMs instead of providing full examples. in one shot SynLrn retrieves relevant examples based on context.
* **Minimal, direct API:** No setup bloat or function call ceremony.
---
## Example Layout (ALL valid)
```
project_root/
├── SLKnowledgebase/
│ └── Knowledgebase.py # Your example base (optional)
├── .env
├── app.py
└── ...
```
Or any layout you prefer—**no requirements**.
---
## How It Works
1. **You define your workflow stages.**
2. **Store and retrieve context/response examples** per stage, for any purpose.
3. **Recall examples by context** (with fallbacks if needed).
---
## Example Usage
```python
from SynLrn import SynLrn
stages = [
"thinking", "clarifying", "gathering",
"defining", "refining", "reflecting", "decision"
]
fallbacks = {
"thinking": [
"user:\nWhat can you do?\n\nassistant:\nI can help with a wide variety of tasks, including..."
]
}
learn = SynLrn(stages=stages, fallbacks=fallbacks)
# Add a new memory/example
learn.addToLearned("thinking", "How do you work?", "I process your requests by reasoning over ...")
# Retrieve similar examples
results = learn.retrieveStage("How do you work?", "thinking")
for entry in results:
print(entry)
```
**See full code and more examples on GitHub.**
---
## Customization
* **Knowledge base:**
Optionally preload with your own class/module, any structure, any naming—SynLrn will find your example data automatically.
* **Fallbacks:**
Pass a dict or a callable for custom fallback responses per stage.
* **Storage:**
All learning is stored locally (SQLite, configurable directory).
---
## FAQ
**Q: Do I have to follow any naming or folder structure?**
A: **No.** Use any stage names, directory layout, or file names you want.
**Q: Can I use this in any Python agent, RAG, or LLM workflow?**
A: Yes.
**Q: Do I need a server, or does SynLrn require a specific cloud provider?**
A: No. Everything is local, pure Python.
---
## Code Examples
You can find code examples on my [GitHub repository](https://github.com/TristanMcBrideSr/TechBook).
---
## License
This project is licensed under the [Apache License, Version 2.0](LICENSE).
Copyright 2025 Tristan McBride Sr.
---
## Acknowledgements
Project by:
- Tristan McBride Sr.
- Sybil
Raw data
{
"_id": null,
"home_page": null,
"name": "SynLrn",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "\"Tristan McBride Sr.\" <142635792+TristanMcBrideSr@users.noreply.github.com>",
"keywords": "AI, Agents, Skills, Tools, Learning, Productivity, Automation",
"author": "Tristan McBride Sr.",
"author_email": "\"Tristan McBride Sr.\" <142635792+TristanMcBrideSr@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/67/c4/1699b4f49d398d2413335ffd85e47472d379ce954fc1294c7777dd47c434/synlrn-0.0.5.tar.gz",
"platform": null,
"description": "\ufeff\r\n---\r\n\r\n# SynLrn \u2013 Modular Multi-Stage Learning for AI (No Naming or Structure Restrictions)\r\n\r\n## Overview\r\n\r\n**SynLrn** is a production-ready, modular system for context-based learning memory and retrieval\u2014designed for any AI or agent workflow.\r\nSynLrn supports any number of **custom learning stages**, adapts to your data, and makes context recall fast and simple\u2014**no naming, schema, or vendor constraints.**\r\n\r\n**Highlights:**\r\n\r\n* **Any learning stages you want:** Use any stage names or workflow steps (thinking, clarifying, etc.)\r\n* **No format restrictions:** Structure your learned data and knowledge base how you want.\r\n* **No external server:** Everything runs locally, uses fast SQLite and RapidFuzz.\r\n* **Plug-in knowledge base:** Start empty or preload with your own examples.\r\n* **Works with all frameworks:** Use SynLrn in any Python project, agent, or LLM pipeline.\r\n\r\n---\r\n\r\n## Why SynLrn?\r\n\r\nTraditional \u201cmemory\u201d frameworks force you to:\r\n\r\n* Use their schema, stage names, or folder structures.\r\n* Fit your workflow to *their* definitions.\r\n* Often require a server, specific model, or fixed APIs.\r\n\r\n**SynLrn:**\r\n\r\n* **Lets you define your own learning flow**\u2014no hard-coded stage names, no schema lock-in.\r\n* **Loads any data, any way:** Add, group, and recall examples however you want.\r\n* **Keeps you in control:** Your workflow, your code, your memory.\r\n\r\n---\r\n\r\n## Key Features\r\n\r\n* **Flexible stage loading:** Use any number of workflow stages.\r\n* **Pluggable knowledge base:** Point to your own Python modules or classes.\r\n* **Context-based retrieval:** RapidFuzz for fast, fuzzy example recall.\r\n* **Low token use:** Matches and retrievals use minimal tokens, ideal for LLMs instead of providing full examples. in one shot SynLrn retrieves relevant examples based on context.\r\n* **Minimal, direct API:** No setup bloat or function call ceremony.\r\n\r\n---\r\n\r\n## Example Layout (ALL valid)\r\n\r\n```\r\nproject_root/\r\n\u251c\u2500\u2500 SLKnowledgebase/\r\n\u2502 \u2514\u2500\u2500 Knowledgebase.py # Your example base (optional)\r\n\u251c\u2500\u2500 .env\r\n\u251c\u2500\u2500 app.py\r\n\u2514\u2500\u2500 ...\r\n```\r\n\r\nOr any layout you prefer\u2014**no requirements**.\r\n\r\n---\r\n\r\n## How It Works\r\n\r\n1. **You define your workflow stages.**\r\n2. **Store and retrieve context/response examples** per stage, for any purpose.\r\n3. **Recall examples by context** (with fallbacks if needed).\r\n\r\n---\r\n\r\n## Example Usage\r\n\r\n```python\r\nfrom SynLrn import SynLrn\r\n\r\nstages = [\r\n \"thinking\", \"clarifying\", \"gathering\",\r\n \"defining\", \"refining\", \"reflecting\", \"decision\"\r\n]\r\n\r\nfallbacks = {\r\n \"thinking\": [\r\n \"user:\\nWhat can you do?\\n\\nassistant:\\nI can help with a wide variety of tasks, including...\"\r\n ]\r\n}\r\n\r\nlearn = SynLrn(stages=stages, fallbacks=fallbacks)\r\n\r\n# Add a new memory/example\r\nlearn.addToLearned(\"thinking\", \"How do you work?\", \"I process your requests by reasoning over ...\")\r\n\r\n# Retrieve similar examples\r\nresults = learn.retrieveStage(\"How do you work?\", \"thinking\")\r\nfor entry in results:\r\n print(entry)\r\n```\r\n\r\n**See full code and more examples on GitHub.**\r\n\r\n---\r\n\r\n## Customization\r\n\r\n* **Knowledge base:**\r\n Optionally preload with your own class/module, any structure, any naming\u2014SynLrn will find your example data automatically.\r\n\r\n* **Fallbacks:**\r\n Pass a dict or a callable for custom fallback responses per stage.\r\n\r\n* **Storage:**\r\n All learning is stored locally (SQLite, configurable directory).\r\n\r\n---\r\n\r\n## FAQ\r\n\r\n**Q: Do I have to follow any naming or folder structure?**\r\nA: **No.** Use any stage names, directory layout, or file names you want.\r\n\r\n**Q: Can I use this in any Python agent, RAG, or LLM workflow?**\r\nA: Yes.\r\n\r\n**Q: Do I need a server, or does SynLrn require a specific cloud provider?**\r\nA: No. Everything is local, pure Python.\r\n\r\n---\r\n\r\n## Code Examples\r\n\r\nYou can find code examples on my [GitHub repository](https://github.com/TristanMcBrideSr/TechBook).\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is licensed under the [Apache License, Version 2.0](LICENSE).\r\nCopyright 2025 Tristan McBride Sr.\r\n\r\n---\r\n\r\n## Acknowledgements\r\n\r\nProject by:\r\n- Tristan McBride Sr.\r\n- Sybil\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A modern way to allow your AI to learn from every interaction",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/TristanMcBrideSr"
},
"split_keywords": [
"ai",
" agents",
" skills",
" tools",
" learning",
" productivity",
" automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "95fe53a63293b10a4e708a35cd0fabc818cb5de85ce8edc8a2b27f0be01c4fb0",
"md5": "88f9b49244d5d43953068b27948d552c",
"sha256": "9d0e4a2003b99e9e56bacd25668e219dbe8381433b00a0933a3424db8dd203ad"
},
"downloads": -1,
"filename": "synlrn-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "88f9b49244d5d43953068b27948d552c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8080,
"upload_time": "2025-07-19T22:42:40",
"upload_time_iso_8601": "2025-07-19T22:42:40.452946Z",
"url": "https://files.pythonhosted.org/packages/95/fe/53a63293b10a4e708a35cd0fabc818cb5de85ce8edc8a2b27f0be01c4fb0/synlrn-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "67c41699b4f49d398d2413335ffd85e47472d379ce954fc1294c7777dd47c434",
"md5": "6efc4a8a46afc49e35fd491e846e51c0",
"sha256": "c76022321fa2a0cd89cf9964e6beb4b0e7fecfb5c311940207ebec3044fb7762"
},
"downloads": -1,
"filename": "synlrn-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "6efc4a8a46afc49e35fd491e846e51c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10191,
"upload_time": "2025-07-19T22:42:41",
"upload_time_iso_8601": "2025-07-19T22:42:41.664690Z",
"url": "https://files.pythonhosted.org/packages/67/c4/1699b4f49d398d2413335ffd85e47472d379ce954fc1294c7777dd47c434/synlrn-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-19 22:42:41",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "synlrn"
}