📦
Ds Agents
agentic framework for data science
0 installs
Trust: 34 — Low
Agents
Ask AI about Ds Agents
Powered by Claude · Grounded in docs
I know everything about Ds Agents. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
ds_agents
Python package that holds the analytics MCP agent definitions used by both the CLI (chat.py) and the ds-chat backend.
Each agent configures a Model Context Protocol (MCP) server connection plus instructions, safety rails, and tool allow‑lists for a particular workflow.
Package Overview
ds_agents/
├── __init__.py
└── mcp_agents/
├── base.py # BaseMCPAgent scaffold
└── generic.py # GenericDatabaseMCPAgent definition
BaseMCPAgentcentralizes MCP server spawning, tool filtering, and agent construction.GenericDatabaseMCPAgentconfigures the shared “Database Explorer (stdio)” experience with provider monitoring instructions and helper tools.
Installation
cd ds-agentic-workflows/ds-agents
python -m venv .venv && source .venv/bin/activate
pip install -U openai-agents
pip install -e .
When working inside the parent repo you can skip installation—agent_core.py injects this directory onto PYTHONPATH automatically.
Using the Agents
from ds_agents.mcp_agents import GenericDatabaseMCPAgent
from agents import Runner
agent = GenericDatabaseMCPAgent(common_tables=["prod.monitoring.provider_combined_audit"])
async with agent.create_mcp_server() as server:
runner_agent = agent.build(server)
result = await Runner.run(runner_agent, input="Show top site issues for QL2.")
print(result.final_output)
The same agent is automatically wired into:
chat.py(interactive CLI)backend/agent_runner.pyin the ds-chat FastAPI service
Extending
- Subclass
BaseMCPAgent. Overridename,instructions, andget_wrapper_script()for your specific workflow. - Expose additional tools. Update
allowed_toolsor extendds-mcpto publish new MCP tool definitions, then include them viaallowed_tool_names(). - Tune model settings. Adjust
self.model_settingsfor temperature, reasoning effort, etc.
Ship the new agent by importing it wherever GenericDatabaseMCPAgent is currently referenced.
