Skip to content

Releases

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 30 Oct 00:36

langchain-prolog v2.0.0

Prolog queries are now checked before they run. A PrologTool query is written by an LLM, and until this release it reached the interpreter unchecked, so it could call shell/1, assertz/1 or open files with the privileges of your process. This release refuses those queries by default.

Breaking Changes

  • A query may call your rules, a fixed set of pure predicates (unification, comparison, arithmetic, type checks, list/atom/string predicates), the meta predicates findall, bagof, setof, aggregate_all, forall, once and ignore (whose goals are checked too), and anything you list in allowed_predicates. Everything else raises PrologQueryNotAllowedError.
  • Refused goals include shell/1, assertz/1, file I/O, module-qualified goals, call/1, unbound goals, and anything after the first term.
  • Predicates of libraries your rules file loads are no longer callable from queries; your rules can still use them. A rules file that is itself a module still exposes its exports.
  • With a query_schema or default_predicate, a value can no longer add goals: the query must be a single call of that predicate.
  • Wrong-arity calls now report which arities exist, e.g. Predicate partner/3 is not allowed in queries, but partner/2 is defined.

Upgrading

  • PrologQueryNotAllowedError is a PrologRuntimeError, so code that already catches PrologRuntimeError keeps working.
  • If your queries call predicates outside your rules, list them: PrologConfig(rules_file="family.pl", allowed_predicates=["format/2"]). Allow only predicates that are harmless whatever arguments an LLM picks, and avoid meta predicates such as maplist/2, whose goal arguments are not checked.
  • unrestricted_queries=True turns the check off and logs a warning. Use it only when every query comes from your own code.

Added

  • PrologConfig.allowed_predicates and PrologConfig.unrestricted_queries.
  • PrologQueryNotAllowedError, exported from langchain_prolog.

Security

  • The rules file path is passed to Prolog as a value instead of being quoted into query text.

Documentation

  • New Query Safety guide covering what is allowed, how to allow more, and what the check does not cover (resource limits, rules that call their arguments, a shared interpreter).

Full changelog: v1.0.3...v2.0.0

v1.0.3

Choose a tag to compare

@github-actions github-actions released this 20 Oct 00:59

langchain-prolog v1.0.3

Maintenance release: no changes to the public API or runtime behavior.

Fixed

  • PyPI badge in the README and docs is now static, so it no longer displays a stale cached version.
  • run.sh activates the worktree's own virtual environment.

Internal

  • Dev environment synced with generate-project v2.5.0 (new make run and worktree lifecycle targets).
  • CI: Claude PR Assistant workflow, Dependabot for GitHub Actions, and updated actions/checkout, actions/cache, and astral-sh/setup-uv.
  • Minor code cleanups in tool.py and exceptions.py (import path, redundant pass, pylint fixes).

Full changelog: v1.0.2...v1.0.3

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 19 Jun 22:13

langchain-prolog 1.0.2

Tooling-only maintenance release. No changes to PrologConfig, PrologRunnable, or PrologTool APIs.

Internal

Makefile / run.sh โ€” extra flags now flow through all release targets

All make release-* and rollback targets now accept additional arguments via ARGS ?=:

make release-micro ARGS="--no-interactive"

The same flags are forwarded when calling run.sh functions directly ("$@" passthrough).

release.yml โ€” more reliable ReadTheDocs update

The ReadTheDocs CI step now:

  • Syncs RTD versions before activating the new tag (so newly-created version slugs are visible)
  • Triggers explicit builds for both the tagged version and latest
  • Uses an HTTP 2xx regex check instead of an exact 204 match (more permissive and correct)
  • Reports success/warning conditionally in the Release Summary via id: update-rtd

README.md

Removed a stale hardcoded version badge that was left over from an earlier release.

Full changelog

See CHANGELOG.md for the complete list of changes.

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 17 Jun 22:18

langchain-prolog 1.0.1

This is a maintenance release with no changes to the PrologConfig, PrologRunnable, or PrologTool APIs. The highlights are a full migration from Poetry to UV and a tightening of the minimum dependency floors to match what the library already required in practice.

Build tooling: Poetry โ†’ UV

pyproject.toml has been migrated from Poetry (poetry-core build backend, [tool.poetry.*] tables) to the standard PEP 517 layout with Hatchling as the build backend and UV as the package manager. uv.lock replaces poetry.lock. All CI workflows (tests.yml, release.yml, docs.yml), run.sh, and Makefile have been updated accordingly.

If you contribute to this project, replace poetry install / poetry run invocations with uv sync / uv run.

Dependency floor changes

Package Before After
langchain >= 0.3.0 >= 1.3.9
pydantic >= 2.0.0 >= 2.7.4

The library already depended on langchain 1.x behavior in practice; the floors now reflect that. No caller-side code changes are required.

Other changes

  • Python 3.12 and 3.13 added to supported-versions classifiers.
  • LangGraph agent usage example removed from README.md and docs โ€” documentation now covers two patterns (function-calling via an LLM and direct PrologRunnable invocation).
  • Security: docs/requirements.txt pins tornado >= 6.5.7 per a Snyk CVE advisory (PR #3). This affects documentation builds only, not library consumers.
  • Example notebooks refreshed for the langchain 1.x API.

Full changelog

See CHANGELOG.md for the complete list of changes.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Jun 21:03

langchain-prolog 1.0.0

Two themes in this release: langchain 1.x compatibility and SWI-Prolog initialization robustness. The public PrologConfig / PrologRunnable / PrologTool API is unchanged โ€” the breaking part is the supported langchain version range.

Breaking changes

  • Requires langchain >= 1.3.9, < 2.0.0 (was ^0.3.0). Projects on the langchain 0.3 line cannot upgrade in place.
  • Requires pydantic >= 2.7.4 (was ^2.0.0).
  • New explicit pin: langchain-core >= 1.4.6, < 1.5.0. Narrow on purpose โ€” PrologTool uses a private langchain-core import that could disappear in a minor bump.
  • New transitive dep: langgraph >= 1.2.4, < 1.3.0.

How to upgrade

Bump both pins together:

langchain-prolog = "^1.0.0"
langchain = "^1.3.9"
pydantic = "^2.7.4"

No caller-side code changes are needed for langchain-prolog itself. However, if your project's own code referenced the removed top-level langchain.{verbose,debug,llm_cache} globals or the langchain.globals submodule (both removed in langchain 1.0), switch them to langchain_core.globals:

from langchain_core.globals import set_verbose, set_debug, set_llm_cache

set_verbose(False)
set_debug(False)
set_llm_cache(None)   # pass None, not False, to disable

The agent examples in README.md and docs/source/tool.md have been updated to use the canonical 1.x langchain.agents.create_agent API. If you copy-pasted the old create_tool_calling_agent + AgentExecutor pattern from the README, see the new section for the replacement.

SWI-Prolog initialization is now much more reliable

_prolog_init was the source of most "works on my machine" reports. This release fixes a lot of small bugs that compounded:

  • macOS Intel installs (/usr/local) are now supported alongside Apple Silicon; the zlib path is derived from the matching Homebrew prefix.
  • macOS version selection is now numeric โ€” 9.10.0 correctly beats 9.2.0. Homebrew revision suffixes like 9.10.0_2 are handled.
  • The documented SWIPL_*_DIR env-var fallbacks are now actually reachable on every platform; previously they were dead code if the standard install path was missing.
  • DYLD_LIBRARY_PATH is appended to instead of clobbered.
  • A failed libswipl preload now raises PrologInitializationError immediately with the original cause attached, instead of warning and failing later with a cryptic downstream error.
  • initialize_prolog no longer double-wraps inner PrologInitializationErrors, so error messages stay readable.
  • 20 new fully-mocked unit tests cover every fix above (no SWI-Prolog install required to run them).

Examples + docs migrated to create_agent

create_tool_calling_agent and AgentExecutor were removed from langchain.agents in langchain 1.0. Every example in this repo that used them is now on the canonical replacement:

from langchain.agents import create_agent

agent = create_agent(
    llm,
    [prolog_tool],
    system_prompt="You are a helpful assistant",
)

result = agent.invoke({"messages": [("human", "Who are John's children?")]})
print(result["messages"][-1].content)

The Google Colab route-planner notebook had outdated pinned versions for langgraph and related packages. Its setup cell now resolves everything transitively via a single pip install langchain-prolog and is markedly faster to bootstrap.

Other fixes

  • Pylint clean: four chronic warnings in runnable.py resolved without behavior change; score is now 10.00/10.
  • Security: docs/requirements.txt pins tornado >= 6.5.3 per a Snyk advisory (docs build only).

Full changelog

See CHANGELOG.md for the complete list.

v0.1.1.post18

Choose a tag to compare

@github-actions github-actions released this 12 Mar 00:55

release 0.1.1.post18: chore(patch) post

Changes

This is a maintenance release fixing several issues in the documentation build pipeline and release workflow discovered after v0.1.1.post17.

-Documentation Build (docs.yml):
Fixed docs build producing no HTML output: The docs.yml workflow was calling poetry run make html, which invokes the docs/Makefile's default SPHINXBUILD = poetry run sphinx-build โ€” creating a nested poetry run invocation that silently failed in CI, leaving only _static/ in the output directory with no pages written. Fixed by running sphinx-build directly and bypassing make entirely.

Fixed intersphinx crash (Sphinx 8.2.3 bug): A bug in sphinx.ext.intersphinx._load causes a TypeError: not enough arguments for format string whenever any inventory URL fails to load (redirect, 404, or network error). The LangChain inventory URL had moved, triggering this bug on every build. Fixed by removing the LangChain entry from intersphinx_mapping (all cross-references are already disabled via intersphinx_disabled_reftypes = ["*"]).

Fixed autodoc requiring SWI-Prolog at build time: Added autodoc_mock_imports = ["janus_swi"] to conf.py so Sphinx does not attempt to load the janus_swi C extension during the docs build. Removed the stale docs/api/langchain_prolog 2.rst duplicate file that was generating ~125 spurious warnings.

Fixed Check Build Output step: Refactored to work from the workspace root rather than cd-ing into a directory that might not exist.

-Release Workflow (release.yml):
Fixed TestPyPI installation picking up wrong version: The test installation step did not pin a version, so pip resolved the highest semver on TestPyPI (an older 0.3.0 upload rather than the freshly published version). Fixed by installing langchain-prolog==$VERSION with an exact pin. Added an explicit version assertion to fail the workflow if version doesn't match the expected release version.
Other

-Updated copyright year to 2026 in docs/conf.py.

v0.1.1.post17

Choose a tag to compare

@github-actions github-actions released this 11 Mar 23:30

release 0.1.1.post17: chore(patch) post

Changes

Infrastructure & Tooling Improvements:
This release is a maintenance release focused on CI/CD, developer tooling, and project infrastructure.

CI/CD Workflows

  • New workflow: Addedย delete_workflow_runs.ymlย to automatically clean up old GitHub Actions runs
  • docs.yml: Updated dependency cache key for better cache hit rates; fixed GitHub Script syntax in the PR comment step
  • tests.yml: Addedย pull_requestย trigger so tests also run on PRs; improved cache key to includeย poetry.lock; addedย exit 5ย handling to allow "no tests collected" as a passing result
  • release.yml:
    • Added tag-on-main branch verification step
    • Improved release type detection (is_latest,ย release_typeย classification for stable, pre-release, post, draft)
    • Upgraded toย softprops/action-gh-release@v2ย withย make_latestย support
    • Added retry/polling loop for ReadTheDocs updates
    • Added release summary step
    • Added strict publish modes (publish:test:strict,ย publish:strict)

Developer Scripts:

  • scripts/release.py: Refactored to use aย RollbackStateย class for safer rollbacks; improvedย bump_versionย logic with nested helper functions; addedย --no-interactiveย CLI flag; improved commit message derivation
  • scripts/update_versions.py: New script for managing version updates across project files
    Makefile &ย run.sh
  • Makefile: Addedย venv-clean,ย lint-mypy,ย lint-flake8,ย lint-pylint,ย test-manual,ย publish-test-strict,ย publish-strict, and all pre-release variant targets (release-major-a/b/rc,ย release-minor-a/b/rc,ย release-micro-a/b/rc)
  • run.sh: Added Python 3 shim for compatibility,ย venv:cleanย command,ย config_getย helper replacingย try-load-dotenv, proper publish token handling, extended release functions
    Project Configuration
  • CLAUDE.md: Added development commands reference and architecture overview for Claude Code integration
  • .gitignore: Addedย .claude/ย directory exclusion

v0.1.1.post9

Choose a tag to compare

@github-actions github-actions released this 29 Jun 17:19

release 0.1.1.post9: chore(fix)

Changes

  • Use poetry in read the docs build workflow
  • Add ignore codes for pylint and flake8
  • Deactivate conda and/or regular virtual environments when activating poetry local environment via run.sh venv
  • Add test coverage to .gitignore and run.sh clean
  • Add optional parameters to run.sh tests:cov test with coverage report
  • Rewrite Makefile using run.sh functions

v0.1.1.post16

Choose a tag to compare

@github-actions github-actions released this 29 Jun 19:45

release 0.1.1.post16: chore(fix)

Changes

  • Add langchain to RTD workflow to solve API doc generation issue

v0.1.1.post15

Choose a tag to compare

@github-actions github-actions released this 29 Jun 19:34

release 0.1.1.post15: chore(fix)

Changes

  • Add comments to RTD build workflow