Hermes Agent & AI DevOps Expert - MCP & Playwright Orchestration
Only freelancers located in the U.S. may apply.U.S. located freelancers only
We are looking for an expert backend developer and automation engineer to extend an existing, production-grade Model Context Protocol (MCP) server and overhaul its orchestration layer. The headline correction for this project: the existing Lawfather MCP is to be retained and extended, not rebuilt. It already exposes deterministic, parameterized Playwright tools for every required county portal (District Clerk, HCSO, HCDAO) and a client database. Those backend tools are the reliable layer and are not the source of the instability this project exists to fix. The instability lives entirely in the orchestration layer — the model-driven layer that decides when and how to call the tools. The fix is to move deterministic control out of model-followed prose and into code, and to host the agent on an always-on machine with persistent memory. Core Project Principles • Extend, Don't Rebuild: Retain and extend the existing MCP; do not re-implement portal scrapers from scratch. • Code Over Prompts: Deterministic logic lives strictly in tool code, never in instructions the model must remember each session. • No Caller Loops: Batch operations must run to completion server-side. No operation may require the caller (model) to loop. • Agnostic Architecture: The system must remain model-agnostic and host-agnostic. No single provider — Anthropic, OpenAI, Z.ai/GLM, or Nous — may be a hard dependency. • Privilege First: Client data stays on owned hardware; the model is never the gatekeeper of which case a file belongs to. Existing Tool Inventory (To Be Inherited As-Is) The following tools already exist on the production MCP (containerized on a local Synology NAS) and are in daily use. Re-deriving their behavior is completely out of scope: • hcdc_get_docket: Court settings by date range + bar number (District Clerk). • hcdc_check_filings: Per case: standard defense filings present vs. missing. • hcdc_download_filings: Images-tab documents: bulk OR selective by filters; dest_subfolder; dry_run. Note: The parameterized download tools already cover most retrieval requests. "All filings," "this filing," "all subpoenas," "all resets," and "everything filed that day" are argument combinations on this tool, not separate features. • hcso_locate: Defendant custody location (facility / floor / pod) by SPN. • hcdao_grab_file: Download a single named file from the DA portal Files tab. • hcdao_download_discovery: Batch / delta discovery download from the DA portal. • hcdao_download_media_alert: Batch-download files listed in a 'New Media Available' portal email. • hcdao_case_summary: Scrape the Case Jacket quick summary / DAO narrative. • hcdao_plea_offer: Scrape current plea offer + full offer history. • hcdao_assigned_ada: Assigned ADA name / email / phone on a case. • lookup_client / list_clients: Resolve / list clients from the shared client database. Scoped Work (Paid Deliverables) 1. County Case Resolver (New Tool): Find a case from partial identifiers — any subset of (name, SPN, DOB, court, cause). Searches county systems (not just the local client DB). MUST return a ranked candidate list for the user to choose from; MUST NEVER auto-select. Wrong-defendant selection is a privilege failure, not a cosmetic bug. 2. Latest-Version Retrieval: Add scope=latest to hcdao_grab_file so 'most recent' selects the newest among supplements instead of the first match. 3. Async Transcribe Tool (Skill to Tool Promotion): Build a deterministic MCP tool using Gemini 3.1 Pro Preview for transcription, followed by a second pass that sends the transcript back with case context for cleanup (speaker mapping, defense-moment preamble). Long-running: implement as an async job (submit to job id to poll to fetch), NOT a synchronous call. 4. OCR Tool (Skill to Tool Promotion): Implement a readability check on ingest. If a document is not cleanly readable, FLAG it and ASK before sending to Gemini 3.1 Pro Preview for OCR. OCR must be gated and confirmed, never automatic. 5. Server-Side Batch Jobs: Move all chunk, loop, delta, and throttle logic OFF the caller and INTO the tool code. One call runs the batch to completion. 6. Queued HCDAO Fixes: For hcdao_download_discovery, add a portal_ids filter for targeted single-file pulls and a custom output-path / Drive-folder destination feature. Known Portal Quirks to Handle from Day One • hcdc_get_docket returns a broader date range than requested; results must be filtered to the requested window. • hcdao_download_discovery delta detection is blind to files organized into dated subfolders and must be explicitly handled. • Court DG7 does not surface through standard bar-number docket lookup and requires separate handling. • The Playwright Node.js driver subprocess can die silently while database tools respond; you must health-check the driver proactively. Orchestration, Host Layer, & Deployment Topology • Target Host: Hermes Agent (Nous Research) running as the persistent shell, providing persistent memory, the scheduler, and messaging surfaces. The MCP server will plug directly into it. • Agnostic LLM Routing: Default the agent/dispatch role to the most reliable tool-calling model (currently Claude Opus). Route bulk, non-critical generations (draft summaries, transcript cleanup) to a cheaper model (e.g., GLM-5.2). No provider may be hard-wired. Per-tool pins are allowed strictly for transcription/OCR tasks (pinned to Gemini 3.1 Pro Preview). • Memory Fencing: Hermes's persistent memory and learning loops must remain enabled to accumulate facts and user preferences. However, the agent must be strictly fenced from self-editing or rewriting its own mechanical execution paths (portals, downloads, filings), which must remain frozen in MCP tool code. • Hardware Deployment Infrastructure: • Always-on Brain: M1 Pro MacBook Pro (16 GB, mains-powered, lid open) running the Hermes gateway, Messages.app, and a BlueBubbles iMessage bridge. Must be fully automated via launchd services to handle headless crash recovery, auto-login, and sleep prevention (pmset autorestart / caffeinate). • Tools and Storage: Synology NAS (10.0.0.149) hosting the Lawfather MCP container, local client folders, and Drive sync. • Private Network: Tailscale mesh across all devices for secure remote access without open inbound ports. Acceptance Criteria for Sign-Off • No batch operation requires the caller to iterate. • The case resolver returns ranked candidates and never auto-selects. • Transcription runs seamlessly as an async two-stage job surviving multi-hour files without timing out. • OCR never fires automatically on low-readability files without gated confirmation. • Zero regressions on the existing MCP tool inventory. • The Resiliency Test: The full stack successfully restarts completely unattended after a host reboot or simulated power loss, and is reachable via iMessage/SMS immediately after. • Self-editing is fenced on mechanical download/filing paths. Hard Guardrails • Privilege: Downloads route strictly to the correct client folder; a wrong-case match is treated as a severe defect, not a warning. Privileged audio/discovery data stays on owned hardware where the chosen model allows. • Determinism: Repeatable steps live entirely in tool code, never in prompts. • Agnosticism: Model and host layers must remain fully swappable without modifying the core MCP tools. Before quoting "done," you will be expected to confirm live portal behaviors regarding District Clerk document labels, DA portal stable identifiers, and county search surfaces. How to Apply Please submit a proposal detailing your specific experience with MCP architectures, Playwright browser automation, and macOS/Docker DevOps automation. Anti-Bot Filtering: To prove you read this entire scope, please start your application with the phrase "PROTECT THE LAW" in all caps. Automated or generic copy-paste applications will be instantly rejected.
$5,000.00
Fixed-price- ExpertExperience Level
- Remote Job
- Ongoing projectProject Type
Skills and Expertise
Activity on this job
- Proposals:20 to 50
- Last viewed by client:2 weeks ago
- Interviewing:6
- Invites sent:0
- Unanswered invites:0
About the client
- United States8:02 PM
- LegalIndividual client
Explore similar jobs on Upwork
How it works
Create your free profileHighlight your skills and experience, show your portfolio, and set your ideal pay rate.
Work the way you wantApply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
Get paid securelyFrom contract to payment, we help you work safely and get paid securely.
About Upwork
- 4.9/5(Average rating of clients by professionals)
- G2 2021#1 freelance platform
- 49,000+Signed contract every week
- $2.3BFreelancers earned on Upwork in 2020
Find the best freelance jobs
Growing your career is as easy as creating a free profile and finding work like this that fits your skills.
Trusted by