Skip to content

Instantly share code, notes, and snippets.

View patrick-hurley's full-sized avatar

Patrick Hurley patrick-hurley

View GitHub Profile
@patrick-hurley
patrick-hurley / approval-loop-example.ts
Created October 22, 2025 13:04
Approval Loop example TS
import express, { Request, Response } from 'express';
import cors from 'cors';
import helmet from 'helmet';
import { v4 as uuidv4 } from 'uuid';
// ============================================================================
// APPROVAL LOOP SYSTEM
// ============================================================================
interface PendingAction {
@patrick-hurley
patrick-hurley / react-guardrail-example.ts
Created October 22, 2025 11:19
ReAct Guardrail example
import OpenAI from 'openai';
// ============================================================================
// GUARDRAILS SYSTEM
// ============================================================================
interface GuardrailCheck {
passed: boolean;
reason?: string;
severity?: 'low' | 'medium' | 'high';
@patrick-hurley
patrick-hurley / plan-execute-orchestration-pattern.ts
Created October 21, 2025 13:32
Plan-Execute Orchestration Pattern TS
import express from 'express';
const app = express();
app.use(express.json());
const SECTION_DIVIDER = '='.repeat(60);
// ============================================
// 1. Define your tools
// ============================================
@patrick-hurley
patrick-hurley / ReAct-orchestration-with-function-calling.ts
Created October 21, 2025 11:16
ReAct Orchestration with Function Calling
import express from 'express';
const app = express();
app.use(express.json());
// ============================================
// 1. Define your tools
// ============================================
const tools = [
{
@patrick-hurley
patrick-hurley / ReAct-orchestration-with-string-matching.ts
Last active October 21, 2025 11:17
ReAct Orchestration with String Matching
import express from 'express';
import OpenAI from 'openai';
const app = express();
app.use(express.json());
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
@patrick-hurley
patrick-hurley / SourceSansPro-FontFace.css
Created July 31, 2019 19:20
@font-face declarations for Source Sans Pro
@font-face {
font-family: 'SourceSansPro';
src: url('SourceSansPro-ExtraLight.ttf') format('truetype');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'SourceSansPro';
src: url('SourceSansPro-ExtraLightItalic.ttf') format('truetype');