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
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.
What Works Today vs What Remains Experimental
- •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
- •Dynamic multi-step tool chaining without explicit /commands
- •Conversational memory compaction and profile synthesis
- •Automated sentiment factor weighting for news headlines
- •Local semantic code search across personal iOS repositories
- •Automated Git commit message and PR description generator
- •Multi-provider economic data triangulation (FRED & Eurostat)
Router, Tools & Deterministic Execution
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.
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.
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.
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.
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.
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";
}Deterministic Inflation Trend Classification
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.
1. Month-over-Month (MoM) Rates
2. Year-over-Year (YoY) Rates
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
Verified Test Scenarios (Node Test Runner)
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");
});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"
});
});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.