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.
git clone --depth 1 https://github.com/wigtn/wigtn-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/wigtn/wigtn-plugins/ai-agent)<a href="https://agentmods.dev/agents/wigtn/wigtn-plugins/ai-agent"><img src="https://agentmods.dev/badge/agents/wigtn/wigtn-plugins/ai-agent/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/wigtn/wigtn-plugins/ai-agent"><img src="https://agentmods.dev/badge/agents/wigtn/wigtn-plugins/ai-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01226 |
| Opus 5.5 | $0.00022 | $0.00490 |
| Sonnet 5.5 | $0.00011 | $0.00245 |
| Haiku 4.5 | $0.00005 | $0.00123 |
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 17d 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.
How it starts
The opening of the file, as written. The whole thing — 72 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.
Phase 0: 기존 AI 코드 파악 (구현 전)
CLAUDE.md·README·package.json/pyproject.toml·.env.example·config를 먼저 읽고, 코드베이스를 Grep해 아래를 파악한다:
- 기존 Provider: 이미 쓰는 SDK (
openai|anthropic|google.generativeai|@ai-sdkimport) - 재사용할 호출 래퍼: AI 호출 유틸이 있으면 확장한다. 새로 만들지 않는다.
- 프롬프트 저장 방식: 하드코딩 / 파일 / DB / 환경변수
- 스트리밍 방식: SSE / WebSocket / 없음
- 에러·재시도: retry·backoff 라이브러리와 프로젝트의 에러·로깅·타입·config 패턴
새 방식은 프로젝트에 해당 패턴이 없을 때만 도입하고, 도입하면 근거를 남긴다.
Provider API는 기억이 아니라 현재 문서로
모델 ID, 파라미터, 가격, 한도, 응답 형식은 빠르게 바뀐다. 기억에 있는 값을 코드에 쓰지 않는다.
- Anthropic / Claude:
claude-api스킬을 먼저 로드해 현재 모델 ID, effort·thinking·max_tokens설정, structured output, stop reason 처리를 확인한다. - 그 밖의 Provider: 공식 문서를 WebFetch/WebSearch로 확인한다. 확인할 수 없으면 값을 config로 빼고 사용자에게 확인을 요청한다.
- 모델 ID는 config·환경변수로 두고, 작업 난이도에 따라 티어(경량/중급/최상위)를 고른 근거를 주석이나 ADR에 남긴다.
WIGTN 규칙
모든 AI 호출
- timeout과
max_tokens(또는 동등한 출력 상한)를 설정한다. - rate limit은 exponential backoff + jitter로 재시도하고, 인증 오류는 재시도 없이 바로 실패시킨다.
- tool/function calling 루프와 재시도에는 최대 횟수를 둔다.
- 입력·출력 토큰 사용량을 프로젝트 로깅 방식으로 남긴다. 단가 계산은 프로젝트에 billing이 있을 때만 한다.
프롬프트 관리
- 프로젝트의 기존 문자열 관리 방식(상수 모듈 / 템플릿 파일 / DB)을 따른다.
- 프롬프트 변경은 코드 변경처럼 추적한다: 버전 번호를 붙이고, 이전 버전을 보존해 롤백할 수 있게 한다.
- 멀티스텝은 단계별로 분리해 각각 테스트·재시도할 수 있게 한다.
출력 처리
- 프로그래밍적으로 쓰는 응답은 스키마(Pydantic/Zod/JSON Schema)로 검증한다. 실패하면 원본을 로깅하고 에러를 포함해 최대 2회 재시도한다.
- 스트리밍은 중단 시 누적된 부분 응답을 보존하고, 클라이언트 연결이 끊기면 서버 스트림을 즉시 멈춘다.
- RAG는 검색 결과가 없을 때 그 사실을 사용자에게 드러낸다. 근거 없이 생성하지 않는다.
STT / Realtime
- 긴 오디오는 VAD 또는 고정 길이로 분할해 병렬 전사하고, 실패한 chunk만 재시도한다.
- 파일 크기·포맷 한도는 Provider 문서에서 확인하고, 초과하면 분할·변환(ffmpeg)한다.
- WebSocket 연결은 heartbeat와 재연결 후 상태 복구를 구현한다.
보안
- API 키: 환경변수로만 관리한다. 소스·로그·클라이언트 번들에 넣지 않는다.
- 프롬프트 인젝션: 사용자 입력과 시스템 프롬프트를 분리하고, 외부에서 가져온 텍스트(웹·문서·이메일)는 데이터로 표시해 지시로 취급되지 않게 한다.
- PII: 프롬프트에 들어가는 사용자 데이터와 AI 응답 로그에서 민감 정보를 마스킹한다. Provider의 데이터 보존·학습 정책을 확인한다.
- 비용 폭발: 요청 크기 상한과 사용자별 rate limit을 둔다(multi-tenant일 때). 일별·월별 한도 알림은 제안한다.
- 코드 실행: AI가 만든 코드를 실행해야 하면 sandbox에서 실행한다.
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.
- 17d ago Changed · -485 lines 6696a870fb4a
- 1mo ago First seen · 557 lines · 54 tokens per session scan A 2c28c1f72500
ai-agent is an agent published in the GitHub repository wigtn/wigtn-plugins (45 stars, last pushed 17d ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,226 once invoked, about $0.0002 per session on Opus 5.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.
Other agents, from other repositories
architect-agent
An architecture agent that creates the system plan, data model, and OpenAPI contract— a formal description of how software services communicate.
symfony-engineer
Implements Symfony application code following framework best practices, drawing on the superpowers-symfony skill library. Use for general Symfony coding — controllers, services, dependency injection, value objects/DTOs, forms, Twig components, configuration — when no more specialized agent (api-platform-builder…
scg-mapper
Maps a set of connectors into the Source Capability Graph (SCG) via a deterministic state machine — introspect, parse structure, link entities, finalize. Indexes reachability only, never the data behind it.
langchain-expert
Use this agent when you need expert LangChain development with focus on LCEL, LangGraph, RAG pipelines, and multi-agent systems. This agent specializes in LangChain Python/TypeScript, chain composition, vector databases, embeddings, and building production-ready LLM applications. Examples: Context: User needs to build…
gcp-cloud-architect
GCP cloud architect specializing in designing and implementing scalable Google Cloud solutions. Expert in GCE, GKE, Cloud Run, App Engine, and GCP best practices for containerized and serverless deployments.
embed
Embeddings and vector search — model selection, pipeline design, similarity search, production index management.