Skip to content

Add skillos-langchain: LangChain toolkit for Curator#13

Open
skillos-bot wants to merge 1 commit into
mainfrom
claude/skillos-langchain-integration-rheIP
Open

Add skillos-langchain: LangChain toolkit for Curator#13
skillos-bot wants to merge 1 commit into
mainfrom
claude/skillos-langchain-integration-rheIP

Conversation

@skillos-bot

Copy link
Copy Markdown
Collaborator

Summary

Adds the skillos-langchain package, mirroring the existing skillos-strands package, so the Curator can run on LangChain.

  • LangChainCurator — a Curator backed by langchain.agents.create_agent. It formats conversation history (handling both LangChain BaseMessage objects and OpenAI-style dicts) and drives skill-management tools, returning a Changelog.
  • create_skill_tools — LangChain @tool wrappers around SkillRepo (list_skills, read_skill, insert_skill, update_skill, delete_skill) that record each mutation as an applied/failed Change in a Changelog.
  • LangChainCurator.callback() — the LangChain equivalent of a Strands hook provider. Returns a _CuratorCallbackHandler (AsyncCallbackHandler) that hooks the agent lifecycle and curates the conversation when the root run completes (on_chain_end with no parent run). Use it via agent.ainvoke(..., config={"callbacks": [curator.callback()]}).

Other changes

  • Sets pytest --import-mode=importlib so packages can share test-file basenames (e.g. test_tools.py).
  • Lists the new package in the README.

Testing

  • uv run pytest — 120 passed (35 new tests covering tools, curator, the callback handler, and an end-to-end test where a real user agent run triggers the callback and creates a skill).
  • uv run ruff check, uv run ruff format --check, and uv run ty check all pass.

https://claude.ai/code/session_019cNC4hjVdpJKAJofeY6SBy


Generated by Claude Code

Introduces the skillos-langchain package mirroring skillos-strands:

- LangChainCurator: a Curator backed by langchain.agents.create_agent
  that formats conversation history (LangChain BaseMessage and dict
  styles) and drives skill-management tools.
- create_skill_tools: LangChain @tool wrappers around SkillRepo
  (list/read/insert/update/delete) that record applied/failed
  mutations into a Changelog.
- _CuratorCallbackHandler / LangChainCurator.callback(): the LangChain
  equivalent of a Strands hook provider. It hooks the agent lifecycle
  and curates the conversation when the root run completes.

Also sets pytest --import-mode=importlib so packages can share test
file basenames, and lists the new package in the README.

https://claude.ai/code/session_019cNC4hjVdpJKAJofeY6SBy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants