Skip to content
Contact
Technical Case Study & Live Demo
•Applied Engineering Experiment
In Progress (Active Experiment)

Personal AI Agent

Developer Automation, Local LLM Tooling & Deterministic Data Pipelines

An ongoing software engineering exploration bridging the gap between probabilistic language models and deterministic software systems. Built to evaluate local offline LLMs, structured command routing, test harnesses, and strict mathematical data classification free of AI hallucinations.

Experiment Metadata

Status:Active In-House Prototype
Local Model:Qwen 2.5 3B (via Ollama)
Router Engine:Command Regex + Intent
Unit Test Suite:61 Tests (node --test)
Deterministic Core:forex/inflation-observation.js
Cloud Dependency:Zero (100% Offline)
01. Motivation & Philosophy

Why Build a Personal Engineering Agent?

Separating Probabilistic from Deterministic

Language models are excellent at summarizing, drafting, and conversational parsing, but notoriously unreliable at arithmetic and strict state transitions. This project strictly enforces that calculations are executed by verified JavaScript pure functions.

Privacy & Zero Telemetry Leaks

Engineering notes, profile details, and experimental code snippets remain completely on local disk. By running smaller quantized models through Ollama, no private source code or proprietary context is ever transmitted over the public internet.

Test-Harness-Driven Automation

Rather than treating AI as an oracle, the agent operates inside automated test harnesses. Every pipeline transformation—from BLS data normalization to January rollover math—is backed by deterministic assertions.

02. Implementation Boundaries

What Works Today vs What Remains Experimental

Implemented & Tested (61 Tests)
  • •Command router handling /forex, note saving, and memory
  • •Deterministic BLS CPI parser and monthly series normalizer
  • •MoM/YoY change calculator with calendar year rollover math
  • •Epsilon-tolerant trend classifier (accelerating / cooling / unchanged)
  • •Local Ollama chat integration with memory context injection
Experimental In-Progress
  • •Dynamic multi-step tool chaining without explicit /commands
  • •Conversational memory compaction and profile synthesis
  • •Automated sentiment factor weighting for news headlines
Planned Roadmap
  • •Local semantic code search across personal iOS repositories
  • •Automated Git commit message and PR description generator
  • •Multi-provider economic data triangulation (FRED & Eurostat)
03. Pipeline Architecture

Router, Tools & Deterministic Execution

01STAGE

CLI Stream & Router

src/router.js + readline

Inspects incoming messages with regex patterns to route commands: /forex queries, persistent memory updates, workspace note searches, or general conversation.

02STAGE

Deterministic Data Engine

forex/providers/bls.js + cpi-changes.js

Fetches and normalizes official Bureau of Labor Statistics CPI data points. Computes exact MoM and YoY percent changes with calendar-year rollover handling.

03STAGE

Mathematical Classification

forex/inflation-observation.js

Classifies trends into accelerating, cooling, unchanged, or mixed. Uses strict epsilon floating-point tolerance (|Δ| ≤ 1e-9) to guarantee zero arithmetic errors.

04STAGE

Local Profile Memory

src/memory.js + memory/profile.json

Maintains persistent user attributes (profession, preferences, workspace notes) and injects contextual grounding into LLM prompts without cloud leaks.

05STAGE

Offline Model Inference

src/model.js + Ollama (qwen2.5:3b)

Dispatches conversational queries to a local Ollama daemon (localhost:11434). Operates 100% offline with zero external API tokens or telemetry.

Source Extract: forex/inflation-observation.jsPure Function • No Hallucinations
function classifyTrend(current, previous, epsilon = 1e-9) {
  if (previous === null) return "unknown";
  const difference = current - previous;
  if (Math.abs(difference) <= epsilon) return "unchanged";
  return difference > 0 ? "accelerating" : "cooling";
}

function combineTrends(mom, yoy) {
  if (mom === "unknown" || yoy === "unknown") return "unknown";
  if (mom === yoy) return mom;
  return "mixed";
}
04. Live Engineering Demonstration

Deterministic Inflation Trend Classification

Live Browser Execution
•Ported from forex/inflation-observation.js
Deterministic Algorithm

Interactive Engineering Demo — Deterministic Data Analysis

Execute the exact mathematical classification algorithm used by the Personal AI Agent to determine whether consumer price inflation is accelerating, cooling, flat, or mixed. Runs 100% locally in your browser with mathematical floating-point tolerance guarantees.

Engineering Notice: This interactive demo executes deterministic mathematical logic ported from the project repository. It is not an AI model inference, does not call external LLMs, and is not financial or investment advice.

Select Test Scenario Preset

1. Month-over-Month (MoM) Rates

2. Year-over-Year (YoY) Rates

|Δ| ≤ ε → Unchanged
Classification Result100% Deterministic
Overall Synthesized Direction
ACCELERATING
MoM Trendaccelerating
Current: 0.4%Previous: 0.2%Δ: +0.2000%
YoY Trendaccelerating
Current: 3.2%Previous: 2.9%Δ: +0.3000%
Algorithm Execution Trace

1. Rule: If previous is null → Unknown

2. Rule: |Current - Prev| ≤ 1e-9 → Unchanged

3. Rule: (Current - Prev) > 0 → Accelerating, else Cooling

4. Synthesis: MoM == YoY ? MoM : Mixed

Source Parity: 100%test/inflation-observation.test.js
05. Test Evidence & Parity

Verified Test Scenarios (Node Test Runner)

Test Execution Command:node --test test/*.test.js
61/61 Automated Tests Passing
Floating-Point Epsilon Precision Test

Verifies that rate differences below epsilon are classified as flat/unchanged, preventing standard double-precision float drift from triggering false alerts.

test("uses configurable tolerance for floating-point equality", () => {
  const unchanged = createInflationObservation(
    createCpiChanges(0.3000000005, 3),
    createPreviousRates(0.3, 3),
    { epsilon: 1e-9 }
  );
  assert.equal(unchanged.trend.mom, "unchanged");
});
Calendar Rollover Calculation Test

Ensures that computing January month-over-month inflation correctly retrieves December from the previous calendar year rather than failing across year boundaries.

test("calculates previous rates across January rollover", () => {
  const inputs = calculateCpiObservationInputs(rolloverHistory);
  assert.deepEqual(inputs.previousRates.referencePeriod, {
    year: "2025",
    month: 12,
    period: "M12",
    periodName: "December"
  });
});
06. Limitations & Disclaimer

Defensible Engineering Constraints

1. Prototype Classification: This project is a personal research and developer automation experiment. It is not commercial financial software, does not provide investment or currency trading advice, and should never be used for trading decisions.

2. Hardware & Model Limitations: The local model runner leverages a quantized 3B parameter model (Qwen 2.5 3B). While fast and private on consumer hardware, it has constrained reasoning capabilities compared to larger frontier models and must be paired with strict deterministic validation gates.

3. No Autonomous Swarms: We claim zero autonomous agent swarms, vector database RAG hallucination cures, or automated multi-agent trading. The system demonstrates disciplined, test-backed tool integration where code correctness is proven through test suites.

Continue Exploring the Portfolio

Review production native iOS case studies (BNL, Insomnia Cookies, Mighty Audio) or explore the 6-stage human-in-the-loop AI Engineering Lab.