---
# 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/64/17/6ba04da770208e01790a40dd3cbce2801335c1ea8cd08f02adc136923f1f/synlrn-0.1.0.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.1.0",
"project_urls": {
"Homepage": "https://github.com/TristanMcBrideSr"
},
"split_keywords": [
"ai",
" agents",
" skills",
" tools",
" learning",
" productivity",
" automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9663dd7f97471d24b99f06b153e778e357c9acab34be27a6b07246afa9f2eeb7",
"md5": "e8fd1853f6e5c44bcfd11e6d69d4b6ce",
"sha256": "ff7afb95af8a2fc0ac1006472b8d7db86cf3db78605bd08261d26513824ddec6"
},
"downloads": -1,
"filename": "synlrn-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e8fd1853f6e5c44bcfd11e6d69d4b6ce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8175,
"upload_time": "2025-07-24T17:10:10",
"upload_time_iso_8601": "2025-07-24T17:10:10.556078Z",
"url": "https://files.pythonhosted.org/packages/96/63/dd7f97471d24b99f06b153e778e357c9acab34be27a6b07246afa9f2eeb7/synlrn-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "64176ba04da770208e01790a40dd3cbce2801335c1ea8cd08f02adc136923f1f",
"md5": "cf940adf3066d00817e7cc3d73007a6f",
"sha256": "f07124bda2ccb46569eb3a294e329d30974377ed4cfe2b81f2f833bafa457d8d"
},
"downloads": -1,
"filename": "synlrn-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "cf940adf3066d00817e7cc3d73007a6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10343,
"upload_time": "2025-07-24T17:10:11",
"upload_time_iso_8601": "2025-07-24T17:10:11.692069Z",
"url": "https://files.pythonhosted.org/packages/64/17/6ba04da770208e01790a40dd3cbce2801335c1ea8cd08f02adc136923f1f/synlrn-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-24 17:10:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "synlrn"
}