ACTIVE ON AGENT PLATFORM

Model-to-Model Help,
Fully Sanitized.

Stuck on a complex bug, security concern, or architecture review? Let your autonomous agent phone a specialized friend. Secure auto-routing, native PII scrubbing, and cost-limit safety loops — built directly for the Agent Platform.

~100ms
Cached Query Bypass
100%
Out-of-Band PII Scrubbing
$5.00
5h Rolling Cost Barrier
agent-platform · /ask-friend
LIVE
OPERATOR / CLIENT
Stuck on code review for auth_helper.py. Triggering peer audit:
/ask-friend --task_type=code_review
PII SCRUBBER INTERCEPTOR
Scanning context. Redacting sensitive tokens…
🔑 admin_token = "jwt_secret_xyz"[REDACTED_TOKEN_0]
FRIEND RESOLVER (claude-garden via Auto-Routing)
Acquired second opinion. Rehydrating response out-of-band. Terse audit results:
{
  "verdict": "needs_changes",
  "findings": [
    "L42: 🔴 bug: user null after .find(). Guard before .email.",
    "L88: 🟡 risk: no retry on 429. Wrap withBackoff(3).",
    "L120: 🔵 nit: extract validate/normalize/persist."
  ]
}
01 · Parse input payload & resolve config
02 · Scrub PII & credentials out-of-band
03 · Auto-routed query to claude-garden
04 · Telemetry logging & cache generation
The Safe Peer-Routing System

Recursive loops and unscrubbed payloads
are leaking enterprise data.

Letting agents query external LLMs directly leads to runaway token bills, leaked credentials, and duplicate execution cycles. Ask a Friend inserts a secure telemetry, caching, and scrubbing layer right at the transit gate.

Direct Model Integration

Vulnerable & Expensive Cycles

Calling raw endpoints from within dynamic agent prompts without filters or budgets:

  • Raw logs, keys, and identifiers sent directly in plain text
  • Recursive loops run up thousands in API bills unchecked
  • Identical queries repeated during rapid iterations
  • A single generic model used for specialized code tasks
Phone-A-Friend Layer

Sanitized, Buffered Peer Auditing

A dedicated security proxy that manages queries, scrubs PII, and validates cost caps:

  • Safe PII Redaction — replaces sensitive strings pre-transit
  • Rolling Budget Breaker — blocks runaway loops automatically
  • SHA-256 Cache — bypasses duplicate execution entirely
  • Task Auto-Routing — resolves the strongest model dynamically
Platform Capabilities

Enterprise-grade safeguards
for your agentic workflows.

Dual-Runtime Architecture

Deploy in standard Node-based Model Context Protocol (MCP) environments, or run the Python CLI directly inside terminal routines. Hooks seamlessly into both local workflows and cloud Agent Platforms.

// TypeScript MCP tool definition
server.tool("ask_a_friend", {
  task_type: z.enum(["code_review", "security_audit"]),
  prompt: z.string()
});

Client-Side PII Scrubbing

A lightweight interceptor scrubs authorization headers, emails, tokens, and credentials out-of-band pre-transit, mapping them to a local secure lookup table for seamless rehydration.

# Out-of-band pre-transit redaction
safe_context, lookup = redact(context)

Circuit-Breaker Telemetry

An embedded SQLite database tracks rolling cost metrics over 5-hour sliding windows — hitting the brakes on runaway loops before bills spike.

SHA-256 Caching Engine

Generates SHA-256 hashes from prompts, contexts, and target models to bypass duplicate network transit with near-zero latency.

Auto-Routing Engine

Resolves the strongest models dynamically: code_review maps to claude-garden, while structural tests map to efficient gemini-pro.

Visual Insights

A Dashboard Built for
Total Operational Safety.

Visualize session queries, inspect cached responses, monitor budget caps, and audit out-of-band PII logs in a single glassmorphic Run Explorer.

Ask a Friend · Telemetry Dashboard
● MONITORING
Rolling Spend (5h)
$2.41 / $5.00
48% of cap · breaker armed
Cache Hit Rate
63%
↑ 112 bypassed calls today
PII Redactions
1,284
tokens scrubbed out-of-band
Active Routes
3
claude-garden · gemini-pro

Token Cost by Hour last 8h

0910111213141516
Live query Cache bypass

Recent Sessions live

code_review · claude-garden $0.38
code_review · CACHED $0.00
security_audit · claude-garden $0.52
test_gen · gemini-pro · retry $0.11
security_audit · CACHED $0.00
refactor · claude-garden $0.44
Workflow Execution

Under the Hood: The 5-Step Loop

From input capture and config resolution, to PII scrubbing, out-of-band routing, and structured presentation.

Step 01
Hook Trigger

Fired by /ask-friend, auto-routines, or standard tool invocation.

Step 02
Scrub Pre-Transit

Interceptor isolates the payload and strips DB strings and auth keys.

Step 03
Auto-Route

Resolves the task type and dispatches to the strongest model.

Step 04
Rehydrate

Responses are mapped back to local tables to re-inject safe identifiers.

Step 05
Log Telemetry

The budget DB logs token weights and commits cache entries.

Quick Installation

Ready in under two minutes.

Deploy via the npm-based MCP server, or execute locally with the Python runtime CLI.

Expose the Ask a Friend skill via the Model Context Protocol. Start the STDIO listener:

# Install & start MCP server (stdio transport)
$ npm install -g ask-a-friend-mcp
$ npx ask-friend-mcp start

Add to your Cline / Cursor MCP config:

{
  "mcpServers": {
    "ask-a-friend": {
      "command": "npx",
      "args": ["-y", "ask-a-friend-mcp", "start"]
    }
  }
}

Execute directly, passing payloads via stdin:

# Execute Python backend with a JSON query
$ echo '{"task_type": "code_review", "prompt": "Review helper.py context"}' | python3 scripts/ask_friend.py

Or feed queries via environment variables:

$ export ASK_FRIEND_INPUT_PAYLOAD='{"task_type": "security_audit", "prompt": "Audit session config"}'
$ python3 scripts/ask_friend.py

Set client parameters in ~/.config/ask-a-friend/config.json:

{
  "vertex_project": "your-gcp-project-id",
  "vertex_location": "global",
  "default_model": "claude-sonnet-4-6",
  "require_approval": true,
  "cost_cap_usd": 5.00,
  "cost_cap_mode": "warn",
  "use_cache": true,
  "max_retries": 3,
  "timeout_ms": 30000
}