Skip to content

Importer-backed adapters - #917

Merged
schustmi merged 39 commits into
developfrom
feature/importer-backed-adapters
Sep 2, 2026
Merged

Importer-backed adapters#917
schustmi merged 39 commits into
developfrom
feature/importer-backed-adapters

Conversation

@schustmi

@schustmi schustmi commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This PR adds importer-backed adapters: wrap an agent entrypoint that is already instrumented with an observability provider, and the adapter imports the provider trace of each run into Kitaru as a session. Adapters ship inside the provider importer packages for Langfuse, Braintrust, LangSmith, Logfire, and Phoenix behind an adapter extra, on top of the ImporterBackedAdapter base class in core. Run specs declare runtime_capabilities, and creating a replay or starting an experiment run rejects overrides and tool policies the agent version does not declare.

Example:

# agent.py
from kitaru_langfuse_importer.adapter import LangfuseAdapter

def run_agent(question: str) -> str:
    ...  # the Langfuse-instrumented agent

adapter = LangfuseAdapter()
result = adapter.run(run_agent, question="What is an AI agent?")

Register the entrypoint as an agent version to target it with session runs and replays:

kitaru agent version register langfuse-agent --spec version.yaml
# version.yaml
run_spec:
  command: python agent.py
  runtime_capabilities:
    overrides: false
    tool_policies: false

@socket-security

socket-security Bot commented Aug 31, 2026

Copy link
Copy Markdown

@schustmi
schustmi force-pushed the feature/importer-backed-adapters branch 3 times, most recently from 82fb618 to 6333394 Compare September 1, 2026 09:31
@schustmi schustmi linked an issue Sep 1, 2026 that may be closed by this pull request
@schustmi
schustmi force-pushed the feature/importer-backed-adapters branch from f38bb6f to 3da036b Compare September 1, 2026 11:47
@schustmi
schustmi marked this pull request as ready for review September 1, 2026 12:13

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@AlexejPenner AlexejPenner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦭

@schustmi
schustmi force-pushed the feature/importer-backed-adapters branch from 0ffae92 to 92a43f0 Compare September 1, 2026 15:02
@schustmi
schustmi force-pushed the feature/importer-backed-adapters branch from 92a43f0 to 8a30d83 Compare September 2, 2026 07:27
@schustmi
schustmi force-pushed the feature/importer-backed-adapters branch from 8a30d83 to 833ba81 Compare September 2, 2026 07:38
@schustmi
schustmi merged commit c366552 into develop Sep 2, 2026
43 checks passed
@schustmi
schustmi deleted the feature/importer-backed-adapters branch September 2, 2026 11:27
@schustmi schustmi added requires:core Requires a related Kitaru core release requires:plugins:importers Requires work across importer plugins labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking Change requires:core Requires a related Kitaru core release requires:plugins:importers Requires work across importer plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a generic adapter

3 participants