https://github.com/null-core-ai/null-lens
The missing protocol between user requests and AI actions. Standardized intent parsing for every AI system. Converts any input into [Motive] [Scope] [Priority].
https://github.com/null-core-ai/null-lens
agent agentic agentic-ai agentic-workflow agents ai ai-agent ai-agents llm llm-agents llm-framework llm-tools llms prompt-engineering prompts semantic
Last synced: about 1 month ago
JSON representation
The missing protocol between user requests and AI actions. Standardized intent parsing for every AI system. Converts any input into [Motive] [Scope] [Priority].
- Host: GitHub
- URL: https://github.com/null-core-ai/null-lens
- Owner: null-core-ai
- License: mit
- Created: 2025-10-11T22:08:10.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-10-13T13:22:33.000Z (3 months ago)
- Last Synced: 2025-11-14T22:09:39.004Z (about 2 months ago)
- Topics: agent, agentic, agentic-ai, agentic-workflow, agents, ai, ai-agent, ai-agents, llm, llm-agents, llm-framework, llm-tools, llms, prompt-engineering, prompts, semantic
- Language: Python
- Homepage: https://null-core.ai/
- Size: 75.2 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.org/project/null-lens/)
[](https://www.npmjs.com/package/null-lens)
[](LICENSE)
# β Null Lens
**The missing protocol between user requests and AI actions.**
Standardized intent parsing for every AI system.
Converts any input into a deterministic schema β **[Motive] [Scope] [Priority]**.
---
## π§© What it does
Null Lens turns unstructured natural-language input into a fixed three-line intent block:
```
[Motive] β what the user wants to achieve
[Scope] β where the request applies (context or domain)
[Priority] β what must be done first or resolved
````
One ambiguous paragraph in β three structured fields out.
---
## π Python SDK
```bash
pip install null-lens
```
**Usage**
```python
from null_lens import NullLens
lens = NullLens(api_key="your_api_key_here")
result = lens.parse("Summarize Q4 strategy across LATAM markets.")
print(result)
```
**Response**
```
[Motive] Summarize strategic direction for Q4
[Scope] LATAM markets
[Priority] Identify key actions for planning cycle
```
---
## β‘ JavaScript / TypeScript SDK
```bash
npm install null-lens
```
**Usage**
```js
import { NullLens } from "null-lens";
const lens = new NullLens(process.env.NULL_LENS_API_KEY);
const result = await lens.parse("Summarize Q4 strategy across LATAM markets.");
console.log(result);
```
**Response**
```
[Motive] Summarize strategic direction for Q4
[Scope] LATAM markets
[Priority] Identify key actions for planning cycle
```
---
### Get your API key
Youβll need an API key to use Lens.
β [https://null-core.ai](https://null-core.ai) β sign up β get **100 free queries instantly.**
No credit card. No approval delay.
```bash
export NULL_LENS_API_KEY="your_api_key_here"
# or on Windows PowerShell
setx NULL_LENS_API_KEY "your_api_key_here"
```
---
## π§ Why it matters
AI systems donβt fail at inference β they fail at **interpretation.**
Lens removes ambiguity before reasoning begins.
**Without Lens**
* Prompt retries
* Context drift
* RAG scaffolding debt
**With Lens**
* Stable input schema
* Consistent reasoning
* Deterministic orchestration
---
## π API Access
**Endpoint**
```
POST https://null-core.ai/api/lens
```
**Headers**
```
Authorization: Bearer
Content-Type: application/json
```
**Body**
```json
{
"messages": [
{
"role": "user",
"content": "Summarize the latency impact of our RAG pipeline for 100k qps"
}
]
}
```
**Response**
```json
{
"object": "chat.completion",
"org_id": "xxxx-xxxx-xxxx",
"response": "[Motive] Identify latency impact of RAG pipeline\n[Scope] RAG pipeline, 100k QPS scenario\n[Priority] Optimize for performance stability"
}
```
---
## π§© Parsing Helpers
**JavaScript**
```js
function parseLensResponse(responseText) {
const lines = responseText.split(/\r?\n/).map(l => l.trim()).filter(Boolean);
const find = (prefix) => {
const line = lines.find(l => l.toLowerCase().startsWith(prefix));
return line ? line.split(']').slice(1).join(']').trim() : null;
};
return {
motive: find('[motive]'),
scope: find('[scope]'),
priority: find('[priority]')
};
}
```
**Python**
```python
def parse_lens_response(text):
lines = [l.strip() for l in text.splitlines() if l.strip()]
def find(prefix):
for l in lines:
if l.lower().startswith(prefix):
return l.split(']', 1)[1].strip()
return None
return {
"motive": find("[motive]"),
"scope": find("[scope]"),
"priority": find("[priority]")
}
```
---
## π§© Example cURL
```bash
curl -X POST https://null-core.ai/api/lens \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"We migrated API to v2 and uptime dropped β logs show auth timeouts. Root cause & mitigation before Friday?"}]}'
```
---
## π§ Best Practices
* **One call per semantic input** β send full text in `messages[0].content`.
* **Persist outputs** β store Motive / Scope / Priority as fields in your DB.
* **Cache identical inputs** β identical input β identical output.
* **Use Lens before RAG / agents** β treat its output as your canonical intent layer.
* **Test with messy inputs** β long emails, transcripts, logs; the schema holds.
---
## π Security & Compliance
* Stateless β no inputs stored or retained.
* You manage your own API keys.
* Rotate keys if compromised.
* Donβt send confidential or PII data unless necessary.
* Provided *as-is*, without warranties; you own compliance and handling.
---
## β FAQ
**Q:** Is Lens stateful?
**A:** No β each call is independent. Inputs are transient and not stored.
**Q:** Is the output deterministic?
**A:** Yes. Same input β same 3-line output. Determinism by design.
**Q:** Will the format ever change?
**A:** Never. The `[Motive] / [Scope] / [Priority]` schema is permanent.
**Q:** Average latency?
**A:** ~1β5 s per call, depending on region and load.
**Q:** Enterprise pricing?
**A:** Contact **[support@null-core.ai](mailto:support@null-core.ai)** for volume or dedicated environments.
---
## π©Ά License
MIT License β see [LICENSE](LICENSE)
---
**API-first. Stateless. Deterministic.**
Every call, every time.