Skip to content

Framework integrations (umbrella): LangChain, LlamaIndex, CrewAI, AutoGen, PydanticAI #56

@bordeauxred

Description

@bordeauxred

Why

Most people already have an agent. They don't want to port it to ClawLoop idioms to try the learning loop — they want to wrap what they have and see rewards start climbing. clawloop.wrap() already does this for plain LLM clients; the next step is first-class adapters for the major agent frameworks so the wrap is a one-liner regardless of how the agent was built.

Each item below is a self-contained adapter — natural entry point for first-time contributors who already know one of these frameworks.

Adapters

  • LangChain — wrap a LangChain agent or chain so its steps are captured as Episode messages. Playbook injection via system-prompt hook.
  • LlamaIndex — wrap a LlamaIndex agent / query engine. Same contract: capture traces, inject learned skills into prompts.
  • CrewAI — wrap a crew so multi-agent runs produce one episode per task completion.
  • AutoGen — wrap AutoGen conversable agents; support group-chat patterns by mapping the conversation to ClawLoop's step abstraction.
  • PydanticAI — wrap a PydanticAI agent, preserve structured output validation as a reward signal input.

Contract

Each adapter should:

  1. Be an optional extra: uv sync --extra langchain, etc. Core stays dependency-light.
  2. Expose a single entry point — clawloop.integrations.langchain.wrap(agent, collector) or similar — mirroring the existing clawloop.wrap() API.
  3. Ship with a minimal working example under examples/integrations/<framework>/ and a one-paragraph README section.
  4. Include an end-to-end smoke test that does not require the framework's heavy dependencies to be present at import time.

Why an umbrella?

Each adapter is ~a day of work and independent of the others. Tracking them together makes the direction visible; splitting them off keeps PRs reviewable and lets different contributors take different frameworks.

Contributor notes

If you want to contribute one, comment on the relevant sub-item before starting. The existing clawloop.wrap() implementation in clawloop/live/ is the reference shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersroadmapFuture direction; not a launch blocker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions