Skip to content

tvanreenen/ai-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Lab

A personal lab for developing and testing focused patterns, techniques, and subsystems for agent and harness development.

Some projects are small learning exercises; others are more involved framework experiments. They are grounded in practical agent-system concerns, but built here as personal pattern studies and experiments that others can learn from too.

Most examples live under src/ as standalone workspace packages. A common way to run one is:

uv run --package <package-name> python src/<folder>/main.py

Index

PydanticAI Basics

Human-In-The-Loop

Data Analysis

Research Workflows

History And Memory

Observability

MCP

Embeddings And Audio

Applied ML Pipelines

  • src/gb-churn: staged synthetic churn pipeline with SQL-style transformations.
  • src/gb-340b: staged synthetic 340B CE audit prioritization pipeline.

Deeper Notes

Human-In-The-Loop

This section is about agent flows where the model can chat and clarify normally, but a human must explicitly approve side-effectful tool execution.

Examples:

Focus:

  • a chat-first workflow where the agent gathers missing details naturally
  • a hard approval gate only at the tool boundary, not at every reply
  • direct review of validated deferred tool args from DeferredToolRequests
  • resuming the same run with DeferredToolResults after yes, revise, or cancel

Data Analysis

src/pydantic-ai-query-dataset is less about generic agent basics and more about a specific analysis pattern: let the model translate user questions into SQL over a constrained dataset, then answer from the query results.

Examples:

Focus:

  • natural-language-to-SQL over a known dataset
  • agent-guided analysis without giving the model arbitrary code execution
  • a useful bridge between general tool use and more structured analytical workflows

History And Memory

These examples are about managing long-running context, but they do it at different layers: trimming the live conversation, compacting it more systematically, or storing reusable memory outside the immediate transcript.

Examples:

Focus:

  • summarize or trim when the problem is mostly token pressure
  • use a compaction framework when you want that behavior to be reusable and policy-driven
  • use persistent memory when the problem is cross-session recall, not just context window size

Applied ML Pipelines

These examples are less about agents and more about structured ML workflows with staged, inspectable transformations over tabular data.

Examples:

  • src/gb-churn: staged churn prediction pipeline for a classical tabular business problem.
  • src/gb-340b: staged prioritization pipeline for a synthetic healthcare/compliance-style problem.

Focus:

  • examples of non-agent AI work that is still highly practical
  • pipelines where SQL-style transformation thinking is part of the design
  • a contrast with the pydantic-ai examples, which are focused on agent/runtime patterns rather than classical model pipelines

About

A personal playground for AI-oriented ideas and concepts.

Resources

License

Stars

Watchers

Forks

Contributors