Skip to content

feat(HYBIM-730): rename Log Streams → Agent Streams, Metrics → Evaluators#100

Open
adityamehra wants to merge 1 commit into
mainfrom
feat/HYBIM-730-domain-rename
Open

feat(HYBIM-730): rename Log Streams → Agent Streams, Metrics → Evaluators#100
adityamehra wants to merge 1 commit into
mainfrom
feat/HYBIM-730-domain-rename

Conversation

@adityamehra

Copy link
Copy Markdown
Member

Summary

Implements the SDK-side domain entity renames from HYBIM-730:

  • AgentStream replaces LogStream as the canonical agent-stream class
  • Evaluator (and LlmEvaluator, CodeEvaluator, LocalEvaluator, SplunkAOEvaluator) replaces Metric and its subclasses
  • Full backward compatibility — old names emit DeprecationWarning and remain functional

The underlying API endpoints (/log_streams, /scorers) are unchanged; the server-side rename is tracked separately.

New API at a glance

# Agent Streams
from splunk_ao import AgentStream
stream = AgentStream(name="prod-traces", project_name="my-project").create()
stream = AgentStream.get(name="prod-traces", project_name="my-project")
streams = AgentStream.list(project_name="my-project")

# Evaluators
from splunk_ao import Evaluator, LlmEvaluator, LocalEvaluator
ev = Evaluator.get(name="factuality-checker")
llm_ev = LlmEvaluator(name="quality", prompt="Rate 1-10: {input}", model="gpt-4o-mini").create()

# Project methods
project = Project.get(name="My AI Project")
stream = project.create_agent_stream(name="Production Traces")
streams = project.list_agent_streams()
for s in project.agent_streams:
    print(s.name)

Backward compatibility

Old names remain functional via PEP 562 __getattr__ in __init__.py:

# Still works — emits DeprecationWarning
from splunk_ao import LogStream, Metric, LlmMetric, CodeMetric, LocalMetric
project.create_log_stream("foo")   # warns → create_agent_stream
project.list_log_streams()          # warns → list_agent_streams
project.logstreams                  # warns → agent_streams

Files changed

File Change
src/splunk_ao/agent_stream.py New — AgentStream subclass of LogStream
src/splunk_ao/agent_streams.py New — AgentStreams service + get_agent_stream, list_agent_streams, create_agent_stream, enable_evaluators
src/splunk_ao/evaluator.py New — Evaluator, LlmEvaluator, CodeEvaluator, LocalEvaluator, SplunkAOEvaluator
src/splunk_ao/evaluators.py New — Evaluators service + create_custom_llm_evaluator, get_evaluators, delete_evaluator
src/splunk_ao/__future__/agent_stream.py New — deprecation shim
src/splunk_ao/__future__/evaluator.py New — deprecation shim
src/splunk_ao/__init__.py Modified — export new names; PEP 562 __getattr__ for old names
src/splunk_ao/project.py Modified — add create_agent_stream, list_agent_streams, agent_streams; deprecate old counterparts
docs/HYBIM-730-domain-entity-rename.md New — full migration guide

Test plan

  • Import smoke-test: all new modules import without errors
  • Deprecation warnings: splunk_ao.LogStream and splunk_ao.Metric emit DeprecationWarning
  • MRO check: AgentStreamLogStreamStateManagementMixin; EvaluatorMetricStateManagementMixin
  • Integration tests: create/get/list AgentStream against a live environment
  • Verify Project.create_agent_stream round-trips correctly

Related

Made with Cursor

…tors

Introduces the new canonical domain entity names required by HYBIM-730:

- **AgentStream** replaces LogStream (new class in agent_stream.py that
  subclasses LogStream; returns AgentStream from Project methods)
- **AgentStreams** replaces LogStreams service class (agent_streams.py);
  module-level helpers: get_agent_stream, list_agent_streams,
  create_agent_stream, enable_evaluators
- **Evaluator** replaces Metric base class (evaluator.py)
- **LlmEvaluator**, **CodeEvaluator**, **LocalEvaluator**,
  **SplunkAOEvaluator** replace their Metric-prefixed counterparts
- **Evaluators** replaces Metrics service class (evaluators.py);
  helpers: create_custom_llm_evaluator, get_evaluators, delete_evaluator

Backward compatibility:
- Old names (LogStream, Metric, LlmMetric, …) are preserved via PEP 562
  __getattr__ in __init__.py and emit DeprecationWarning
- Project.create_log_stream / list_log_streams / logstreams delegate to
  the new methods with DeprecationWarning
- __future__/agent_stream.py and __future__/evaluator.py shims added

The underlying API endpoints (/log_streams, /scorers) are unchanged; the
server-side rename is tracked separately.

Closes HYBIM-730

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant