PYPYLAB
AI AGENT · MCP

P01 · Agent Runtime

KDD Agent

Agent engineering with explicit tool boundaries: database access, reusable AI assets, browser operations, command execution, file editing and persistent task context.

MCPAI AgentAgent RuntimeTool CallingPythonDDDTDD
01 / RUNTIME

Agent Runtime & Execution Boundaries

Agent execution and state ownership belong behind an explicit runtime boundary—not inside UI events or API handlers.

RUNTIME · ARCHITECTURE

Explicit execution boundaries

Agent execution is treated as an explicit runtime boundary, rather than logic scattered across UI components or API handlers.

Further notes on execution lifecycle, state ownership and integration boundaries are being organized. This page currently presents the core design principle rather than a complete runtime specification.

02 / AGENT & MCP ECOSYSTEM

Two public projects. Four MCP servers. One engineering workflow.

Public project evidence and purpose-built development tools support governed Agent integrations, from database access to durable project workflows.

Public projects

A database MCP gateway with a public source repository, and a live platform for reusable Agent assets.

OPEN SOURCE · MCP GATEWAY

DB-MCP Gateway

A MySQL/PostgreSQL MCP gateway with scoped endpoints and token-based user ACL. The Connection → Endpoint → ACL model supports table whitelists; SQL-AST read-only checks, audit logs and usage metering constrain database access.

PythonMCPMySQLPostgreSQLSQL ASTTable ACLAudit
View source on GitHub ↗
LIVE PRODUCT · AGENT ASSETS

Prompt Skill Hub

An AI work-asset platform for managing prompts, skills, project context, tool specifications and versioned resources. It turns reusable Agent context into organized, discoverable and access-governed assets.

RustPythonPrompt / SkillVersioningACLAgent Context
Open Prompt Skill Hub ↗

Development MCP servers

Browser observation, command execution, file operations and persistent planning each have a separate operational boundary.

01 · BROWSER OPERATIONS

gad-browser

Inspect real pages and interactions.

Open tabs, click elements, type, capture screenshots and inspect DOM, network events and console output.

EXAMPLE · Reproduce a UI failure or trace an AI SDK initialization sequence. Network events are not a complete HAR or guaranteed response-body capture.

REPRESENTATIVE TOOLS
open_urllist_tabsclick_snapshottype_textget_network_eventsget_console_logscapture_screenshotexport_storage
02 · COMMAND & PROCESS EXECUTION

gad-exec

Run controlled commands and persistent sessions.

Choose direct argv execution, one-shot shell commands or interactive sessions; inspect output, continue input and terminate processes.

EXAMPLE · Run Python checks, tests and builds; keep a development server running during browser verification.

REPRESENTATIVE TOOLS
exec_task_createexec_shell_task_createexec_session_create
03 · FILE & PATCH OPERATIONS

gad-filesystem

Read, modify and validate workspace files.

List directories, batch-read source files, inspect log ranges, save files and validate or apply small unified patches.

EXAMPLE · Use save_file for large edits; use patches for localized changes. Tool output returns file content—not parsed JSON semantics.

REPRESENTATIVE TOOLS
batch_list_directoryread_filessave_filevalidate_unified_patchapply_unified_patchtail_file
04 · PERSISTENT PROJECT PLANNING

gad-plan

Carry decisions and evidence across sessions.

Persist long-running objectives, work items, dependencies, risks, milestones and validation evidence. Resume work and export handoffs.[1]

EXAMPLE · A gad-exec task runs one program; a gad-plan task tracks a long-lived engineering goal.

REPRESENTATIVE TOOLS
task_starttask_nexttask_commit_phasetask_linttask_export_handofftask_export_timeline
03 / EXECUTION MODEL

A development loop with durable evidence.

Tools perform actions. Project state retains decisions, constraints and verification across model and session boundaries.

01Start / resume

gad-plan establishes a durable task and next steps.

02Inspect

gad-browser observes the UI, requests and console.

03Run

gad-exec executes tests, builds and services.

04Edit

gad-filesystem reads, saves or patches files.

05Commit phase

gad-plan records evidence, decisions and handoff.

ENGINEERING PRACTICE · DDD / TDD

Contracts, ownership and regressions

DDD and TDD help keep state ownership, interface contracts and regressions explicit as the Agent system evolves. Tool execution is separate from verification: tests and evidence determine whether a change is accepted.

DDD / TDDA tool call is not a verified result

Related engineering practice: Codex prompting notes[2] and reflections on using AI[3] offer further reading.

Enterprise application context: Dify AI practice[4] is an adjacent example, not a claim about KDD Agent internals.

04 / REFERENCES

Engineering notes & references

Direct tool documentation comes first. Other articles offer context on the engineering workflow or enterprise applications; they are not presented as proof of KDD implementation details.

  1. [1]
    DIRECT · gad-plan
    gad-plan: Agentic Project Infrastructure ↗

    The engineering note associated with the persistent project-planning tool.

    https://pylab.me/zh-CN/posts/gad-plan-agentic-project-infrastructure/
    ↩
  2. [2]
    RELATED · Codex workflow
    Best Practices · INTJ Prompts for Codex ↗

    Related reading on Codex-oriented prompting and working practices.

    https://pylab.me/zh-CN/posts/best-practices-intj-prompts-for-codex/
    ↩
  3. [3]
    RELATED · AI engineering practice
    Thoughts on Using AI ↗

    A related perspective on working with AI.

    https://pylab.me/zh-CN/posts/thoughts-on-using-ai/
    ↩
  4. [4]
    ADJACENT · enterprise AI
    Audit to Algo · Dify AI Practice ↗

    A separate enterprise AI application example, not evidence for KDD runtime internals.

    https://pylab.me/zh-CN/posts/audit-to-algo-dify-ai-practice/
    ↩

Explore the toolchain through Portfolio AI

Ask about MCP server boundaries, database permissions, browser debugging or persistent agent-development workflows.