Skip to content

Data Agent API

DataAgent is the advanced grounded answer surface for analytical and structured questions.

Purpose

  • classify intent
  • assemble refined runtime context
  • route analytical work through query, workflow, or synthesis paths
  • return answer transparency such as plan, sources, and corrections

Python Entry Point

from brain.data_agent import DataAgent
from brain.config import get_settings

agent = DataAgent(settings=get_settings())
result = agent.answer("How many workflow runs failed this week?")

print(result.answer)
print(result.plan)
print(result.sources)

CLI Bridge

sb data-agent ask "How many workflow runs failed this week?"
sb data-agent plan "Summarize recent automation failures"
sb data-agent save-learning "Use the promoted knowledge first for this dataset"
sb data-agent status

Current Model

The current implementation is centered on:

  • refined runtime context and promoted knowledge
  • hybrid intent classification
  • semantic planning and source selection
  • governed analytical execution when needed
  • grounded answer synthesis

Important code paths:

  • brain/data_agent/agent.py
  • brain/data_agent/intent.py
  • brain/data_agent/semantic.py