TalkWithMe AGENTS.md

TalkWithMe AGENTS.md is an instructions file for Codex, OpenCode from scorbo2/TalkWithMe. It costs 4,930 tokens per session, scanned A, original, MIT.

A guide for developing and testing TalkWithMe, a browser-based application that uses a locally running language-model server for conversation, with optional speech services. It explains how to run the app and how its offline test suite replaces external services with fakes.

In plain words
What is it for?
Use it to start the local app, run the complete Python test suite, add isolated tests, or understand how configuration and shared state are reset between tests.
Why use it?
It lets developers run reliable tests without needing live language, text-to-speech, speech-to-text, or MCP servers.

Instructions file for CodexOpenCode

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 instructions/scorbo2/talkwithme/agents-md
Clone the repo
git clone --depth 1 https://github.com/scorbo2/TalkWithMe

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for TalkWithMe AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/scorbo2/talkwithme/agents-md.svg)](https://agentmods.dev/instructions/scorbo2/talkwithme/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/scorbo2/talkwithme/agents-md"><img src="https://agentmods.dev/badge/instructions/scorbo2/talkwithme/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,930 This file is loaded in full into every session.
When invoked 4,930 The same file — it is already loaded in full.
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.04930 $0.04930
Opus 5 $0.02465 $0.02465
Sonnet 5 $0.00986 $0.00986
Haiku 4.5 $0.00493 $0.00493

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

Security

Grade A, and why

TalkWithMe AGENTS.md 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 4d 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.

AGENTS.md · 163 lines

How it starts

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

TalkWithMe — Agent Instructions

Run the app

pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

Requires a locally running llama.cpp server with an OpenAI-compatible API. TTS and STT servers are optional. Open http://localhost:8000 in a browser.

Testing — pytest, fully offline

pip install -r requirements-dev.txt
python3 -m pytest        # from the project root; config in pytest.ini
  • No servers needed. The suite is hermetic: every external HTTP endpoint (LLM, TTS, STT, MCP) is faked via tests/factories.py (fake httpx.AsyncClients, config factories, SSE helpers). It must run — and pass — with nothing but Python installed.
  • Isolation: tests/conftest.py has an autouse fixture that points every module-level global at per-test tmp_path state: the config caches in app/config.py, _PERSISTENCE_ROOT (in both app/persistence.py and app/routers/persistence.py — the router imported it by value, so it needs its own patch), the session singleton, and the MCP tool registry. Real settings.yaml / personas.yaml / chatrooms.yaml / chatrooms/ data is never read or written. If you add a new module-level global to the app, add it to that fixture.
  • Lifespan: the client fixture uses TestClient without the startup lifespan, because the lifespan re-reads the real YAML files (clobbering test caches) and attempts MCP discovery. Tests that exercise the lifespan do so explicitly with a local TestClient in a with block and monkeypatched load_*/load_tools (see tests/test_main.py).
  • Coverage map: test_config.py (config models + YAML load/save), test_models.py (API request/response models), test_persistence.py (disk persistence + audio staging), test_session_manager.py, test_llm.py (SSE parsing + agentic tool loop), test_mcp_client.py, test_tool_registry.py, test_tts_stt_clients.py, test_chat_sse.py (the /api/chat SSE endpoint — LLM stubbed, selection/persistence/echo/tool events for real), test_main.py, test_docs.py (the AGENTS.md API endpoints table must match the routes actually registered on the app — run it after adding/removing endpoints and update the table), and one test_routers_*.py per API router.
  • Rules:
    • Every code change must be followed by a clean run: python3 -m pytest, all green. No exceptions, no skipped tests.
    • New functionality or API endpoints require new tests in the matching test_*.py file before the change is complete.
    • API tests use the client fixture + config caches (re-point app.config._settings_cache / _personas_cache / _chatrooms_cache via monkeypatch); router-level stubs are applied at the router's import site (e.g. app.routers.chat.stream_chat), since routers import service functions by name.
    • httpx version pin matters: with httpx 0.24, response.url / raise_for_status() raise RuntimeError if no request is attached to a Response, and the .request getter itself raises when unset (check response._request instead). All fake responses in tests/factories.py attach a request for this reason.

Read the full file on GitHub · 163 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. 4d ago First seen · 163 lines · 4,930 tokens per session scan A 6587f0bee30b

Subscribe to this mod's changes

TalkWithMe AGENTS.md is an instructions file published in the GitHub repository scorbo2/TalkWithMe (144 stars, last pushed 2d ago), licensed MIT. It adds 4,930 tokens to every session, about $0.0247 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.