new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

LangChain · Agents · all subjects

testing & deployment

7 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Passing rate_limiter to init_chat_model

The rate_limiter parameter can be provided during model initialization to control the rate at which requests are made. Example: model = init_chat_model(model='gpt-5.5', model_provider='openai', rate_limiter=rate_limiter).

InMemoryRateLimiter parameters

The InMemoryRateLimiter accepts the following parameters: requests_per_second (float, how many requests per second are allowed, e.g., 0.1 for 1 request every 10 seconds), check_every_n_seconds (float, how often to check whether a request is allowed, e.g., 0.1 for checking every 100ms), and max_bucket_size (int, controls the maximum burst size). The limiter is thread-safe and can be shared by multiple threads in the same process.

LangSmith tracing setup

To enable LangSmith tracing, set environment variables: export LANGSMITH_TRACING="true" and export LANGSMITH_API_KEY="your-key". Run your agent script again and inspect traces on https://smith.langchain.com. LangSmith Engine can be set up to monitor traces, detect issues, and propose fixes automatically.

Deploy stage uses LangSmith agent server

In the Deploy stage of the agent lifecycle, agents are deployed to the LangSmith agent server. This involves deploying the agent and invoking it through the server.

Test stage uses LangSmith evaluation

In the Test stage of the agent lifecycle, agents are evaluated against a dataset using LangSmith's evaluation functionality. This involves creating datasets and running evaluations against the agent.

Code examples must be tested before publishing

Test code examples and links before publishing documentation.

Deep Agents eval matrix script and maintenance

The model-by-eval-category table on /oss/python/deepagents/models is generated by scripts/refresh_deepagents_category_matrix.py. The script pulls category_scores from the latest successful Evals - GHA runs in langchain-ai/deepagents and writes the table to src/snippets/deepagents-eval-category-matrix.mdx. Run the script with `uv run python scripts/refresh_deepagents_category_matrix.py --write` when new eval results land. Only INCLUDED_MODELS appear in the table. After regenerating, commit only the snippet file without manual edits.

Give your agent this brain