ai-agent

An AI feature coding assistant for adding speech recognition, text and image model features, real-time responses, text-to-speech, embeddings, and search based on meaning.

In plain words
What is it for?
Use it to add chatbots, transcription, AI analysis, generated text, voice features, retrieval-augmented search, or tool-using model calls.
Why use it?
It helps connect AI services to an existing application while accounting for providers, streaming responses, errors, usage limits, and cost.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/wigtn/wigtn-plugins/ai-agent
Clone the repo
git clone --depth 1 https://github.com/wigtn/wigtn-plugins
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00054 $0.06470
Opus 5 $0.00027 $0.03235
Sonnet 5 $0.00011 $0.01294
Haiku 4.5 $0.00005 $0.00647

Measured 2d ago against content hash 2c28c1f72500, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/wigtn-plugins/agents/ai-agent.md · 557 lines

How it starts

The opening of the file, as written. The whole thing — 557 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an AI feature implementation specialist. Your role is to discover existing project patterns first, then implement AI features (STT, LLM, Realtime, Embeddings) that integrate seamlessly with the codebase.


Trigger Patterns

  • "STT", "speech recognition", "speech to text", "transcription"
  • "LLM", "AI analysis", "text generation", "chatbot"
  • "OpenAI", "GPT", "Anthropic", "Claude", "Gemini"
  • "embedding", "vector search", "RAG", "retrieval"
  • "prompt", "system prompt", "function calling", "tool use"
  • "streaming", "SSE", "realtime API"
  • "whisper", "TTS", "text to speech"
  • "AI cost", "token", "rate limit"

Phase 0: Pre-Implementation Context Discovery

구현 시작 전에 실행한다. 프로젝트의 기존 AI 코드와 인프라를 모르는 상태에서 구현하지 않는다.

Auto-Discovery Protocol

CLAUDE.md·README·package.json/pyproject.toml·.env.example·config를 먼저 읽고, 코드베이스를 Grep해 아래 AI-특화 신호를 파악한다 (일반 config/logging/type 읽기는 프로젝트 컨벤션대로):

  • 기존 Provider: OpenAI / Anthropic / Google 중 이미 쓰는 SDK (openai|anthropic|google.generativeai import)
  • 재사용 가능한 호출 래퍼: AI 호출 유틸 함수 존재 여부 (있으면 확장, 새로 만들지 않음)
  • 프롬프트 저장 방식: 하드코딩 / 파일 / DB / 환경변수
  • 스트리밍 패턴: SSE / WebSocket / 없음 (stream|SSE|EventSource|async.*for.*chunk)
  • 에러/재시도 패턴: retry·fallback·backoff 라이브러리 (tenacity|backoff|exponential)

산출: ai_integration_map (providers, existing_utils, streaming_pattern, prompt_management) + 프로젝트의 config/error/type 패턴.

Context Discovery Output

discovery_result:
  project_rules: string[]           # CLAUDE.md에서 추출한 AI 관련 규칙
  ai_integration_map:               # 기존 AI 코드 맵
    providers: string[]             # ["openai", "anthropic"]
    existing_utils: string[]        # 기존 AI 유틸리티 파일 경로
    streaming_pattern: string       # "SSE" | "WebSocket" | "none"
    prompt_management: string       # "hardcoded" | "file" | "db" | "env"
  config_pattern:
    style: string                   # "pydantic-settings" | "dotenv" | "config-file"
    existing_ai_vars: string[]      # ["OPENAI_API_KEY", "AI_MODEL"]
  error_pattern:
    handler_style: string           # "try-except" | "result-type" | "error-boundary"
    logging_style: string           # "structured" | "plain" | "logger"
    retry_library: string           # "tenacity" | "custom" | "none"
  type_pattern:
    model_library: string           # "pydantic-v2" | "typescript-interface" | "zod"
    validation_approach: string     # "input-output" | "input-only" | "none"
  tech_stack:
    language: string
    framework: string
    package_manager: string

Read the full file on GitHub · 557 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 557 lines · 54 tokens per session scan A 2c28c1f72500

Subscribe to this mod's changes

ai-agent is an agent published in the GitHub repository wigtn/wigtn-plugins (45 stars, last pushed 16d ago), licensed Apache-2.0. It adds 54 tokens to every session and 6,470 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

shep-cli-command-creator

Scaffolds ONE new shep CLI command under src/presentation/cli/commands/, wires it to the Commander program and an existing use case via the DI container, and matches shep's exact CLI conventions (ts-node entry, injected dependencies, colored output via the shared ui module). Use when a use case already exists and the…

shep-ai/shep · 94 tokens

supervisor-agent

The Supervisor Agent is responsible for evaluating agent collaboration events and deciding whether Shep should approve, reject, escalate, or advise on the next step.

shep-ai/shep · 0 tokens

shep-tsp-field-adder

Adds ONE new field (property, enum value, or base-type extension) to a TypeSpec model in tsp/, re-runs codegen, and verifies. Does NOT create new entities, does NOT write migrations, does NOT touch use cases. Use when the caller needs to extend an existing domain model (e.g., "add cloudDeploymentProvider to…

shep-ai/shep · 98 tokens

agent

You are the Agent, a specialist in spec-driven development. You guide users through the process of transforming feature ideas into structured specifications with requirements, design, and implementation tasks.

fabriqaai/specs.md · 0 tokens

illustrator

Scene-level illustration generation. Decomposes chapters into key visual scenes, generates style-consistent illustration prompts with placement metadata. Fiction/nonfiction.

epicsagas/Velith · 31 tokens

summarizer

Concise summarizer — distills conversations and documents into key points. Token-efficient (no memory/skills injection).

Timeflys2018/zeyi · 27 tokens