Skip to content

Instantly share code, notes, and snippets.

View sleeepss's full-sized avatar

Sleeepss sleeepss

View GitHub Profile
@sleeepss
sleeepss / clerk_standalone.py
Created April 28, 2026 23:51
PRAXIS clerk drain
#!/usr/bin/env python3
import json, re, signal, sys, time, requests
OLLAMA_URL = "http://localhost:11434"
MODEL = "qwen2.5:7b-instruct-q4_K_M"
SYSTEM_PROMPT = """You are the PRAXIS Clerk, a 24/7 financial triage agent. Your job is to process incoming data briefs from news feeds, social media, government sources, and market data, then make fast decisions.
For each incoming brief, respond ONLY in this exact format:
VERDICT: [CRITICAL/HIGH/LOW/NOT SIGNIFICANT]
TICKER: [affected ticker(s) or NONE]
@sleeepss
sleeepss / clerk.py
Created April 28, 2026 23:42
PRAXIS Clerk triage script
#!/usr/bin/env python3
"""PRAXIS Clerk — triage pipeline.
Polls Postgres for unprocessed briefs, sends each to the Clerk model
via Ollama, parses the structured VERDICT/TICKER/SUMMARY response,
and writes triage results back to Postgres.
Usage:
python3 clerk.py # run once (process all pending)
python3 clerk.py --watch # poll continuously