LangChain Integration

LangChain agents use Python httpx as their default HTTP client, producing distinctive JA4 TLS fingerprints. CounterAgent identifies LangChain traffic by correlating JA4 fingerprints with User-Agent patterns and request timing.

Known Fingerprints

FrameworkJA4HTTP ClientNotes
LangChain 0.2.xt13d3514h2_bfa337485184_*httpxPython ssl module, 35 ciphers
LangChain + requestst13d351300_bfa337485184_*urllib3Same cipher hash, different extension hash
LangServet13d3514h2_bfa337485184_*httpxServer-side deployment

Detection Signals

Using CounterAgent with LangChain

from langchain_core.tools import tool
from counteragent import Client

ca = Client(api_key="ca_live_...")

@tool
def check_agent(user_agent: str, ja4: str = None) -> dict:
    """Check if a request is from a known AI agent."""
    return ca.detect(user_agent=user_agent, ja4=ja4)

Related