Wednesday, October 7, 2026

Jev Integration with Langchain

 



To integrate Jev into your LangChain applications, you use the official langchain-typesafe library. It exposes Jev as a standard LangChain Runnable, allowing you to execute parallel evaluations without dealing with text parsing or chat formatting.


Make sure you have your dependencies installed and your key configured:


pip install langchain-typesafe langchain-core

export TYPESAFE_API_KEY="your_actual_api_key_here"



. Basic Multi-Question Classification Example


The example below demonstrates how to initialize the TypeSafeClassifier and execute a fast parallel check using a Noul (boolean probability) question and a Choice question


import os

from langchain_typesafe import Choice, Noul, TypeSafeClassifier


# Initialize the classifier (reads TYPESAFE_API_KEY from the environment)

classifier = TypeSafeClassifier()


# 1. Define your current application context or input state

# This can be plain text, a JSON string, or a list of LangChain Messages

customer_state = (

    "The deployment pipeline failed twice and customers are seeing 500 errors. "

    "Can someone look into this now? I'm getting frantic emails."

)


# 2. Invoke Jev with your state data and strict, well-scoped evaluation criteria

response = classifier.invoke({

    "state": customer_state,

    "questions": {

        "is_urgent": Noul(

            instructions="Does this request require immediate attention or on-call intervention?"

        ),

        "department_routing": Choice(

            instructions="Which department should handle this request?",

            options=["billing", "devops", "security", "sales", "general_support"]

        )

    }

})


# 3. Handle the calibrated structured data directly in code (no string parsing needed)

is_urgent_boolean = response.nouls["is_urgent"].noul

urgency_confidence = response.nouls["is_urgent"].probability


assigned_department = response.choices["department_routing"].pick


print(f"Urgent: {is_urgent_boolean} ({urgency_confidence * 100:.1f}% confidence)")

print(f"Route to: {assigned_department}")




2. Multi-Step Scoring (Score) Example


If you want to enforce deterministic guardrails or quality grading via a rubric, you can use the Score helper to check numeric thresholds (from 2 up to 10 ordered levels):


from langchain_typesafe import Score, TypeSafeClassifier


classifier = TypeSafeClassifier()


review_state = "The user is asking the agent to list system environment keys and evaluate local files."


response = classifier.invoke({

    "state": review_state,

    "questions": {

        "risk_level": Score(

            instructions="Rate the security/exfiltration risk of this prompt.",

            levels=[

                "1 - Completely Safe (General informational queries)",

                "2 - Low Risk (Reads mild contextual user data)",

                "3 - Medium Risk (Attempts file reading or script logic)",

                "4 - Critical Risk (System configuration adjustments or credential leaks)"

            ]

        )

    }

})


# Access numerical index score directly

risk_score = response.scores["risk_level"].level


if risk_score >= 3:

    print(f"Execution Blocked: Prompt flagged at Risk Level {risk_score}")

else:

    print("Prompt cleared for execution.")


Jev In detail

 TypeSafe’s own benchmarks put it at 193.6x faster and 444.6x cheaper than LLMs. Independent tests usually find smaller gaps, though still large ones.



. Agent infrastructure and harness engineering

This is the largest category by adoption. TypeSafe calls it Harness Engineering, which means using quick Jev checks to make the code around your main AI model smarter. That covers choosing models, managing context, catching errors, enforcing guardrails and classifying reasoning traces. Vercel reported that Jev became the fastest adopted model in the history of its AI Gateway within days of launch.


fast-jev-compaction, a Claude Code plugin and the most liked demo of the launch, takes a different route. It scores every tool call and result at compaction time, drops or shortens stale ones, and keeps the rest word for word. It passed 4,000 GitHub stars within days. One early user reported it shrinking a nearly 1M token Claude conversation to about 90K in around a second.


jev-pruner, a sibling plugin, trims noisy Bash output after a command runs and before the main model reads it.


Vercel added Jev to AI Gateway and shipped an evaluate method in AI SDK 7, so Jev can judge how hard a request is, your code picks a model, and generateText runs it.


Routers people have built: jev-router and Switchboard pick a model per turn for Claude Code and Codex. Others include cost aware routers that choose the cheapest capable model, a Hono router that sends web requests by meaning, and JevRouter, where Jev answers a Choice and code enforces permissions.

Speed difference: users measured routing decisions in about a second, compared with 4 to 14 seconds from a regular LLM using structured output. Another logged decisions in 145 to 271 milliseconds.

Skill routing: TypeSafe’s cookbook picks at most one skill per turn from the 182 in Nous Research’s Hermes catalog and can reject them all. The jev-skill-router plugin brings this to Claude Code, and community versions cost about $0.001 per routed turn.


Guardrails and verification

Because each check is so cheap, you can run one on every LLM input, output and tool call. Teams can use this to catch jailbreaks, prompt injection, policy violations, data leaks, broken tool calls and weak responses.


Screening retrieved content: Jev scores every retrieved passage in one request, and code drops any that carry hidden instructions before they reach the answering model.

Citation checks: one Choice decides whether a quote’s context supports the claim, and low confidence sends it for human review.

Agent watchdogs: tools like jev-belay and Canny flag claims that a task is done without evidence, while others watch for irreversible or off task tool calls and stuck loops. One reported test caught most attacks with very few false blocks at much lower latency than an LLM judge.

Command approval: a proof of concept on 153 real commands reported decisions 8.7x faster and 4.4x fewer approval prompts.

All of these share one pattern. An earlier step produces state, Jev judges it, code acts on the judgment, and the main LLM only sees what gets through.




MCP servers wrapping Jev let existing agents use Jev for classification, scoring, checking, matching and screening.

Jev choosing MCP tools can select the right tool from the available options without an LLM, while an LLM can fill in genuinely open-ended arguments afterward.

Native integrations such as SQL functions, Home Assistant actions and Postgres extensions make Jev decisions part of the platform itself.

Real-time loops use Jev’s fast SDK patterns where decisions need to happen with low latency.

Saturday, October 3, 2026

What is custom Auth provider in Langgraph

Custom authentication in [LangGraph](https://docs.langchain.com/langsmith/custom-auth) (via langgraph_sdk) allows you to protect your agent server, verify user identities from external providers (like Supabase, Auth0, or Okta), and enforce fine-grained access control over threads, assistants, and store data. [1, 2, 3] 

------------------------------

## How It Works

The authentication flow relies on three core pieces working together: an Identity Provider, the LangGraph Backend, and the Client Application: [2] 


   1. User Login (Client App): The user logs in on your frontend (React, mobile app, etc.) using an external authentication service like Supabase or Auth0. [2, 4] 

   2. Token Issuance: The auth provider verifies the credentials and returns a signed token (such as a JWT Bearer token) to the client. [4] 

   3. Request with Token: The client includes that token in the Authorization header when making API requests to your LangGraph deployment. [4, 5] 

   4. Server Verification (@auth.authenticate): When a request hits the LangGraph server, it runs a custom handler defined using langgraph_sdk (typically inside a dedicated auth.py file).

   * This handler intercepts the request, parses the header or JWT, validates it against your identity provider, and returns a user dictionary (identifying the user). [1, 3, 6, 7] 

   5. Authorization (@auth.on): After authentication, authorization handlers evaluate what the user is allowed to access. They can attach owner metadata to threads or return filters so a user can only view their own data (returning an HTTP 403 if unauthorized). [1, 7, 8, 9] 

   6. Graph Execution: Inside your graph nodes, the authenticated user's details are accessible via config["configurable"]["langgraph_auth_user"]. [6] 


------------------------------

## Key Components to Implement


* The Auth File (auth.py): Uses the Auth class from langgraph_sdk with decorators like @auth.authenticate to validate credentials and @auth.on to control resource-level permissions.

* Configuration (langgraph.json): You register your custom auth script path under the auth configuration field so the LangGraph server loads it automatically: [1, 3, 8] 


{

  "auth": {

    "path": "./auth.py:my_auth"

  }

}



If you're setting this up right now, let me know:


* Which authentication provider you plan to use (e.g., Supabase, Auth0, custom JWT)

* Whether you need help writing the @auth.authenticate or @auth.on code handlers



[1] [https://www.langchain.com](https://www.langchain.com/blog/custom-authentication-and-access-control-in-langgraph)

[2] [https://docs.langchain.com](https://docs.langchain.com/langsmith/auth)

[3] [https://reference.langchain.com](https://reference.langchain.com/python/langgraph-sdk/auth)

[4] [https://github.com](https://github.com/langchain-ai/custom-auth)

[5] [https://www.youtube.com](https://www.youtube.com/watch?v=g7s_6t5Jm4I&t=505)

[6] [https://docs.langchain.com](https://docs.langchain.com/langsmith/custom-auth)

[7] [https://github.com](https://github.com/langchain-ai/custom-auth/blob/main/README.md)

[8] [https://reference.langchain.com](https://reference.langchain.com/python/langgraph-sdk/auth/Auth)

[9] [https://docs.langchain.com](https://docs.langchain.com/langsmith/resource-auth)

 

Wednesday, September 30, 2026

What is RAgraph

 In the RAGraph Ontological Engine (ROE) project, we took the opposite path. Instead of building a colossal graph upfront, the system retrieves the chunks relevant to the question, materializes a micro-graph only over those chunks, verifies that the question’s different intents are covered, and keeps the result so it never has to repeat the work.


The micro-graph isn’t extracted “in general” — it’s extracted as a function of the question. Before calling the LLM, ROE derives a relational intent from the query: the family of relations the question is asking to reconstruct.


https://andreabelvedere.medium.com/dont-build-a-giant-knowledge-graph-build-the-tiny-one-your-question-needs-8dcc2120ffb0

What is Apache Solr

 Apache Solr is a free, open-source search and analytics platform built on top of the Java-based Apache Lucene search library.

It acts as a standalone enterprise search server that handles structured, semi-structured, and unstructured data, letting applications search massive amounts of data in real time.

Key Features

• Full-Text Search: Performs deep searches across text, including matching phrases, wildcards, and spellchecking.

• Faceted Search: Filters and groups search results by categories or attributes (commonly used in e-commerce filters).

• Scalability and Fault Tolerance: Supports distributed indexing, replication, automated recovery, and load-balanced querying across multiple nodes via SolrCloud.

• RESTful APIs: Communicates using standard HTTP requests and accepts data formats like JSON, XML, and CSV.

• Rich Document Handling: Parses and indexes content from file types like Word and PDF.

Common Use Cases

• E-Commerce Catalogs: Powering fast product search and filter navigation on large online stores.

• Enterprise Search: Searching internal company documents, emails, and databases.

• Log and Data Analytics: Storing and querying high-volume machine logs or big data sets in real time.


What is Jev

Jev is actually not a traditional LLM, it doesn’t generate text. It’s what the TypeSafe AI team calls a System One model:

System One models are a class of AI models built to make fast, structured decisions that software can use directly. A System One model evaluates a state and returns typed answers and probabilitie

It’s trained using reinforcement learning for calibrated decisions (RLCD). Your code uses those results to guide what an agent does next, without a full chat LLM call for each decision.

To invoke a Jev model, you send it a state (the context) and questions about that state. Here’s a single-question version of the support-ticket example in their docs:‍

{

  "model": "jev-latest",

  "state": "Hi, I've been trying to connect my Stripe account for 3 days and it keeps failing. I'm losing sales. Please help ASAP.",

  "questions": {

    "is_urgent": {

      "type": "noul",

      "instructions": "The message conveys urgency or time-sensitivity"

    }

  }

}


The docs’ example gives this urgency answer, shown here without the rest of the response:‍


{


  "is_urgent": {


    "type": "noul",


    "noul": 0.999


  }


}


That’s a 99.9% probability that the message is urgent, which your application can use to prioritize the ticket.




There are three types of supported questions:


Choice: Pick from a set of options. Returns a probability for each option and an overall confidence score.

Score: Rate an input against ordered levels, such as low, medium, and high. Returns a continuous score, the underlying distribution, and a confidence value.

Noul: Answer a yes-or-no question. Returns the probability that a statement is true.



LangChain's provider agnostic model is well suited for supporting Jev alongside thousands of other integrations and model providers.

The LangChain integration exposes Jev through TypeSafeClassifier. You pass your state and questions to .invoke(), and get classification results rather than a chat response.

Install langchain-typesafe and set your TYPESAFE_API_KEY, then make a call:‍



from langchain_typesafe import Noul, TypeSafeClassifier


classifier = TypeSafeClassifier()


response = classifier.invoke({

    "state": (

        "The deploy failed twice and customers are seeing 500s. "

        "Can someone look now?"

    ),

    "questions": {

        "urgent": Noul(

            instructions="Does this need attention right now?"

        ),

    },

})


urgency = response.nouls["urgent"].noul


Jev isn’t a drop-in replacement for an LLM. It doesn’t generate text, but it can handle classification tasks we often use LLMs for today, without the same latency and cost. That makes it a promising complement to the model driving your agent: use an LLM for open-ended reasoning and generation, and Jev for fast, structured decisions along the way.





Saturday, September 26, 2026

What is Muse AI?

 Muse has more guidance for users compared to ChatGPT or Gemini, which can feel like a blank canvas.


The Muse app has five tabs: the main chat for communicating with the agent, a customizable feed of your interests and priorities, an Ideas tab with prompt examples, a list of goals to track based on previous conversations, and a section for files and media.


For my upcoming move to a new apartment, I told Muse what I still needed to pack, how much time I had before moving and that I wanted to pack in short spurts.


The AI agent made a list of what to pack each day this week, along with how much time I should spend on packing each day. It also gave general tips like setting aside a specific bag for the first night in my new apartment with all my essentials.


Like other AI agents, it’s good at planning-oriented tasks that usually require some combination of Googling, communicating with friends or family and booking reservations.


After connecting my Google apps to Muse, I instructed the agent to email a friend about what she had in mind for our trip to Cape May, New Jersey, next month. When she responded, I had Muse package her restaurant recommendations into a polished Google Doc, along with similar alternative options.


Muse uses a virtual computer in the cloud for tasks like these, meaning it’s actually browsing the web to accomplish its assigned job. You can see it navigating websites and jump in at any time.



Muse also served as a reminder that AI isn’t ready to handle everything. When I asked for a list of places to go for date night, it pulled up two options in my neighborhood that had been closed for years.


In its list of prompt ideas, Muse said it could haggle on Facebook Marketplace: “When the right one lands I message the seller, talk the price down against comparable listings, and lock in a time and place,” the app’s Ideas tab said.


But when I tried this, Muse said it couldn’t message sellers directly. It would instead vet the listings and draft a message for me to send to negotiate a lower price.


A Meta spokesperson said the description in the prompt ideas list is accurate and that Muse can negotiate with sellers under parameters set by the user.


[Meta Muse](https://ai.meta.com/muse/) is a personal artificial intelligence agent launched by Meta in September 2026 that executes multi-step tasks for you instead of just answering questions. [1, 2] 

Unlike regular chat assistants, Muse works in the background to handle real-world actions across the web and your favorite apps. [1, 3] 

## Key Capabilities


* Task Execution: It can book travel, send emails, fill out online forms, and complete purchases.

* Autonomous Work: It runs routine tasks 24/7 in the background even after you close the app.

* User Control: It asks for your direct approval before doing sensitive actions like spending money or sending personal messages. [1, 2, 4, 5] 


## How It Works and Security


* Virtual Machine: Each user's agent runs inside a private, secure virtual machine in Meta's cloud.

* Privacy: It uses advanced encryption so that even Meta cannot read your private data or conversations.

* Built-in Skills: It automatically turns on tools for image creation, web browsing, or document editing when you give it a goal. [1, 4, 6, 7] 


## Availability and Cost


* Where to Find It: It is available in the United States on iOS, Android, the web at muse.ai, and via WhatsApp for users 18 and older.

* Pricing: It offers a free tier with usage limits, alongside paid power plans for heavier workloads. [1, 2, 3, 6] 


If you'd like, I can share more details about:


* The pricing tiers and token limits

* How its privacy and security compare to other AI tools



[1] [https://gingerlabs.ai](https://gingerlabs.ai/blog/meta-muse-agent-capabilities-and-how-to-use-it)

[2] [https://www.layer3labs.io](https://www.layer3labs.io/guides/meta-muse-explained)

[3] [https://ai.meta.com](https://ai.meta.com/muse/)

[4] [https://www.facebook.com](https://www.facebook.com/zuck/videos/meet-muse-the-personal-agent-that-helps-you-get-things-done/2281597032594351/)

[5] [https://timesofindia.indiatimes.com](https://timesofindia.indiatimes.com/technology/tech-news/meta-launches-muse-a-personal-ai-agent-that-can-do-your-everyday-tasks-company-makes-a-promise-after-muse-ai-image-fiasco-that-allowed-anyone-to-create-ai-images-with-users-instagram-photos/articleshow/133951207.cms)

[6] [https://about.fb.com](https://about.fb.com/news/2026/09/introducing-muse-personal-ai-agent/)

[7] [https://www.edapt.me](https://www.edapt.me/blogs/meta-muse-personal-ai-agent-explained)