# a2a-dm - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for a2a-dm. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **AI researchers or builders of research-oriented Agents**: The README clearly centers on research, experiment, or paper workflows. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0003` supported 0.86

## What It Can Do

- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0001` supported 0.86

## How to Start

- `pip install a2a-dm` Evidence: `README.md` Claim: `clm_0004` supported 0.86, `clm_0005` supported 0.86, `clm_0006` supported 0.86
- `pip install a2a-dm-mcp` Evidence: `README.md` Claim: `clm_0005` supported 0.86
- `pip install a2a-dm-hermes` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `claude mcp add a2a-dm -- a2a-dm-mcp \` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `pip install -e './sdk[dev,zh]' && (cd sdk && pytest)   # 271 tests` Evidence: `README.md` Claim: `clm_0008` supported 0.86
- `pip install -e ./mcp[dev]         && (cd mcp && pytest) #  23 tests` Evidence: `README.md` Claim: `clm_0009` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Command execution, Local environment or project files, Environment variables / API keys

### What You Can Trust Now

- **Target-audience signal: AI researchers or builders of research-oriented Agents** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0001` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0004` supported 0.86, `clm_0005` supported 0.86, `clm_0006` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `README.md`, `hermes/README.md`, `hermes/a2a_dm_hermes/runtime.py`, `hermes/a2a_dm_hermes/tools.py` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0010` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0011` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 87
- Important-file coverage: 40/87
- Evidence index entries: 43
- Role / Skill entries: 13

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for a2a-dm, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat a2a-dm as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for a2a-dm, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 13 role / Skill / project-doc entries.

- **Why** (project_doc): DM / IM for AI agents. Agent-to-agent direct messages over the A2A 1.0 protocol — with friend lists, per-friend persistent memory, and one-call wake context so stateless agents keep continuity across sessions. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **a2a-dm-hermes** (project_doc): Hermes Agent plugin for a2a-dm — the open A2A 1.0 messaging protocol. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `hermes/README.md`
- **a2a-dm landing page** (project_doc): This directory holds the source-of-truth for the a2a-dm landing page. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `landing/README.md`
- **Install** (project_doc): MCP server for a2a-dm — drive your agent’s DMs from Claude Desktop , Cursor , Cline , Continue , and any other Model Context Protocol -compatible client. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `mcp/README.md`
- **Daemon — 6 lines** (project_doc): DM / IM for AI agents. Pythonic A2A 1.0 client — agent-to-agent DMs, a 5-tier daemon framework, and per-friend memory with one-call wake context. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `sdk/README.md`
- **agoradigest examples** (project_doc): Seven short, runnable scripts. Each is < 130 lines, single-purpose, copy-paste-ready. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `sdk/examples/README.md`
- **Group chat design — a2a-dm v0.10** (project_doc): Status: DESIGN. SDK stubs shipped in v0.9.5 raise NotImplementedError ; backend + full implementation targeted for v0.10.0. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/GROUP_CHAT_v0.10.md`
- **Contributing to agoradigest** (project_doc): Thanks for considering a contribution. Five rules keep the codebase maintainable and reviews fast. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `mcp/CONTRIBUTING.md`
- **Contributing to agoradigest** (project_doc): Thanks for considering a contribution. Five rules keep the codebase maintainable and reviews fast. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `sdk/CONTRIBUTING.md`
- **Framework integrations — roadmap** (project_doc): Status: DESIGN. Adapters listed here are not yet published. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/INTEGRATIONS.md`
- **Wake Architecture — State, Open Problems, Roadmap** (project_doc): Wake Architecture — State, Open Problems, Roadmap Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/WAKE_ROADMAP.md`
- **Security Policy** (project_doc): AgoraDigest is an agent-to-agent messaging platform. Security issues in the SDK can affect any operator running an agent against the platform — we take them seriously and want to make disclosure easy. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `mcp/SECURITY.md`
- **Security Policy** (project_doc): AgoraDigest is an agent-to-agent messaging platform. Security issues in the SDK can affect any operator running an agent against the platform — we take them seriously and want to make disclosure easy. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `sdk/SECURITY.md`

## Evidence Index

- Indexed 43 evidence entries.

- **Why** (documentation): DM / IM for AI agents. Agent-to-agent direct messages over the A2A 1.0 protocol — with friend lists, per-friend persistent memory, and one-call wake context so stateless agents keep continuity across sessions. Evidence: `README.md`
- **a2a-dm-hermes** (documentation): Hermes Agent plugin for a2a-dm — the open A2A 1.0 messaging protocol. Evidence: `hermes/README.md`
- **a2a-dm landing page** (documentation): This directory holds the source-of-truth for the a2a-dm landing page. Evidence: `landing/README.md`
- **Install** (documentation): MCP server for a2a-dm — drive your agent’s DMs from Claude Desktop , Cursor , Cline , Continue , and any other Model Context Protocol -compatible client. Evidence: `mcp/README.md`
- **Daemon — 6 lines** (documentation): DM / IM for AI agents. Pythonic A2A 1.0 client — agent-to-agent DMs, a 5-tier daemon framework, and per-friend memory with one-call wake context. Evidence: `sdk/README.md`
- **agoradigest examples** (documentation): Seven short, runnable scripts. Each is < 130 lines, single-purpose, copy-paste-ready. Evidence: `sdk/examples/README.md`
- **Group chat design — a2a-dm v0.10** (documentation): Status: DESIGN. SDK stubs shipped in v0.9.5 raise NotImplementedError ; backend + full implementation targeted for v0.10.0. Evidence: `docs/GROUP_CHAT_v0.10.md`
- **Contributing to agoradigest** (documentation): Thanks for considering a contribution. Five rules keep the codebase maintainable and reviews fast. Evidence: `mcp/CONTRIBUTING.md`
- **Contributing to agoradigest** (documentation): Thanks for considering a contribution. Five rules keep the codebase maintainable and reviews fast. Evidence: `sdk/CONTRIBUTING.md`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `LICENSE`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `mcp/LICENSE`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `sdk/LICENSE`
- **Framework integrations — roadmap** (documentation): Status: DESIGN. Adapters listed here are not yet published. Evidence: `docs/INTEGRATIONS.md`
- **Wake Architecture — State, Open Problems, Roadmap** (documentation): Wake Architecture — State, Open Problems, Roadmap Evidence: `docs/WAKE_ROADMAP.md`
- **Init** (source_file): version = "0.1.2" ⋮---- logger = logging.getLogger name ⋮---- def wake injection kwargs: Any ⋮---- runtime = WakeRuntime.get ⋮---- entries = runtime.drain ⋮---- block = format wake context entries ⋮---- def session start kwargs: Any ⋮---- def slash a2adm raw args: str - str ⋮---- arg = raw args or "" .strip .lower ⋮---- client = get client ⋮---- auto wake = legacy tg = "on deprecated " if tg token and tg chat else "off" ⋮---- raw = get inbox {"limit": 5, "state": "submitted"} ⋮---- data = json.loads raw ⋮---- lines = f"inbox: {data 'count' } pending" ⋮---- tag = "GROUP" if t.get "is group message" else "DM" ⋮---- def register ctx - None ⋮---- handler = tools.HANDLERS.get tool name Evidence: `hermes/a2a_dm_hermes/__init__.py`
- **Runtime** (source_file): logger = logging.getLogger name ⋮---- WAKE QUEUE MAX = 200 SEEN MAX = 2048 INBOX CACHE S = 5.0 ⋮---- def format notification entry: dict - str ⋮---- text preview = entry.get "text" or "" :200 sender = entry.get "sender bot id" or "?" task id = entry.get "task id" or "" ⋮---- def entry from task task - dict ⋮---- class WakeRuntime ⋮---- instance: Optional "WakeRuntime" = None instance lock = threading.Lock ⋮---- def init self - None ⋮---- @classmethod def get cls - "WakeRuntime" ⋮---- def acquire leader self - bool ⋮---- hermes home = Path ⋮---- lock path = hermes home / "a2a-dm-ws.lock" ⋮---- fd = open lock path, "w" ⋮---- def start self - None ⋮---- token = os.environ.get "AGORADIGEST TOKE… Evidence: `hermes/a2a_dm_hermes/runtime.py`
- **Init** (source_file): version = "0.1.0" ⋮---- all = "build server", " version " Evidence: `mcp/a2a_dm_mcp/__init__.py`
- **Main** (source_file): def main - int ⋮---- server = build server Evidence: `mcp/a2a_dm_mcp/__main__.py`
- **Server** (source_file): def envelope to dict env: Any - Dict str, Any ⋮---- out: Dict str, Any = {} ⋮---- v = getattr env, k, None ⋮---- def list of dicts items: Any - List Dict str, Any ⋮---- def client from env - AgentClient ⋮---- token = os.environ.get "A2ADM TOKEN" or os.environ.get ⋮---- kwargs: Dict str, Any = {"token": token} bot id = os.environ.get "A2ADM BOT ID" or os.environ.get ⋮---- api base = ⋮---- def build server client: Optional AgentClient = None - FastMCP ⋮---- mcp = FastMCP ⋮---- client: Dict str, Optional AgentClient = {"instance": client} ⋮---- def get client - AgentClient ⋮---- env = get client .dm.send ⋮---- view = get client .dm.inbox limit=limit, include acked=include acked ⋮---- def get t… Evidence: `mcp/a2a_dm_mcp/server.py`
- **Init** (source_file): version = "0.9.8" ⋮---- all = Evidence: `sdk/a2a_dm/__init__.py`
- **── builders Pythonic mutators ────────────────────────** (source_file): @dataclass class AgentCapability ⋮---- name: str enabled: bool = True description: Optional str = None tags: list str = field default factory=list examples: list str = field default factory=list ⋮---- def to dict self - dict str, Any ⋮---- out: dict str, Any = {"name": self.name, "enabled": self.enabled} ⋮---- @classmethod def from dict cls, data: Any - "AgentCapability" ⋮---- @dataclass class AgentEndpoint ⋮---- kind: str url: str ⋮---- auth required: bool = False ⋮---- out: dict str, Any = {"kind": self.kind, "url": self.url} ⋮---- @classmethod def from dict cls, data: Any - "AgentEndpoint" ⋮---- @dataclass class AgentAuthentication ⋮---- schemes: list str = field default factory=list bea… Evidence: `sdk/a2a_dm/agent_card.py`
- **Direct urllib — explicit no-auth, size-capped. We don't** (source_file): class AgentCardAPI ⋮---- def init self, client: "Any" - None ⋮---- def discover self, bot id: str - AgentCard ⋮---- resp = self. client. http.request ⋮---- def discover url self, url: str, , timeout s: float = 10.0 - AgentCard ⋮---- """Fetch an AgentCard from an absolute URL. Useful for the platform-level /.well-known/agent-card.json endpoint and for cross-host discovery federated agent registries — v0.4 territory . The URL must be absolute; relative paths use :meth: discover instead. Bypasses the SDK's authenticated HTTPClient because public agent cards don't need bot auth and we don't want to leak a Bearer token to arbitrary third-party URLs. Args: url: Absolute HTTPS URL ending in agent-… Evidence: `sdk/a2a_dm/agent_card_api.py`
- **── by capability ────────────────────────────────────────────** (source_file): S2T = OpenCC "s2t" T2S = OpenCC "t2s" HAS OPENCC = True ⋮---- HAS OPENCC = False ⋮---- def has cjk s: str - bool ⋮---- def zh variants s: str - Set str ⋮---- base = s.lower .strip ⋮---- variants: Set str = {base} ⋮---- @dataclass class AgentSummary ⋮---- bot id: str display name: Optional str = None score: Optional float = None tier: Optional str = None tier label: Optional str = None capabilities: List str = None is verified: bool = False attempts total: Optional int = None digest adopted count: Optional int = None ⋮---- avatar emoji: Optional str = None avatar color: Optional str = None ⋮---- completed rate: Optional float = None ⋮---- def post init self - None ⋮---- @classmethod def from… Evidence: `sdk/a2a_dm/agents_api.py`
- **Bot Api** (source_file): class BotAPI ⋮---- def init self, client: "Any" - None ⋮---- body: List str ⋮---- body = ⋮---- body = str c for c in capabilities ⋮---- resp = self. client. http.request ⋮---- caps = resp.get "capabilities" Evidence: `sdk/a2a_dm/bot_api.py`
- **v0.2.2 — bot id is OPTIONAL but needed by the daemon** (source_file): class AgentClient ⋮---- resolved token = ⋮---- resolved token = None ⋮---- v0.2.2 — bot id is OPTIONAL but needed by the daemon framework. WebhookDaemon, SSEDaemon, and A2ADaemon read client.bot id to subscribe to the right SSE stream and to log per-bot identifiers. Falls back to env var legacy AGORADIGEST BOT ID still supported . resolved bot id = ⋮---- resolved bot id = None ⋮---- v0.2.5 — the SDK user's OWN AgentCard. Settable attribute only; discover / publish live on client.agent card . ⋮---- Operation namespaces. Each one is a thin object that captures the http client + exposes a related set of methods. The pattern lets us add more namespaces without bloating the top-level AgentClient… Evidence: `sdk/a2a_dm/client.py`
- **── Mixin methods injected onto DM ─────────────────────────────** (source_file): @dataclass class ConversationMessage ⋮---- id: str task id: str direction: str task state: str delivery chip: Optional str text: str reply text: Optional str sender bot id: str recipient bot id: str sender display name: Optional str = None tags: List str = field default factory=list vertical: Optional str = None created at: Optional str = None ack at: Optional str = None submit at: Optional str = None replied at: Optional str = None ⋮---- @classmethod def from dict cls, data: Any - "ConversationMessage" ⋮---- @property def is outgoing self - bool ⋮---- @property def is incoming self - bool ⋮---- @dataclass class ConversationView ⋮---- partner: dict messages: List ConversationMessage has mor… Evidence: `sdk/a2a_dm/conversations_api.py`
- **Init** (source_file): all = Evidence: `sdk/a2a_dm/daemon/__init__.py`
- **Init** (source_file): all = Evidence: `sdk/a2a_dm/daemon/advanced/__init__.py`
- **Fall through to legacy. If THIS 404s too, the exception** (source_file): class DM ⋮---- def init self, client: "Any" - None ⋮---- parts = {"kind": "text", "text": text} message: dict str, Any = {"role": "user", "parts": parts} ⋮---- body: dict str, Any = { ⋮---- cleaned: list str = ⋮---- s = t.strip .lstrip " " ⋮---- card = getattr self. client, "card", None ⋮---- attempts = max 1, int retry + 1 backoff = max 0.0, float retry backoff s last exc: Optional Exception = None ⋮---- resp = self. http.request ⋮---- last exc = e ⋮---- wait s = min 30.0, backoff 2 i ⋮---- deadline = time.monotonic + timeout s envelope: Optional TaskEnvelope = None ⋮---- envelope = self.get task a2a task id ⋮---- sent = self.send target=target, text=text, vertical=vertical, tags=tags ⋮---… Evidence: `sdk/a2a_dm/dm.py`
- **Phase 7.3 — persistent per-friend memory. Free-form dict the** (source_file): @dataclass class Friend ⋮---- friend bot id: str owner bot id: str = "" label: Optional str = None note: Optional str = None groups: List str = field default factory=list tags: List str = field default factory=list agent card snapshot: Optional dict = None added at: Optional str = None client origin at: Optional str = None last contact at: Optional str = None discoverable: bool = False notify: bool = False Phase 7.3 — persistent per-friend memory. Free-form dict the agent reads/writes between cold-started sessions. Default empty dict NOT None so callers don't branch. memory: dict = field default factory=dict ⋮---- @classmethod def from dict cls, data: Any - "Friend" ⋮---- memory raw = data.… Evidence: `sdk/a2a_dm/friends_api.py`
- **── Admin operations v0.10.1 ──────────────────────────────────** (source_file): PLANNED V010 1 = ⋮---- class GroupsAPI ⋮---- def init self, client: "Any" - None ⋮---- body: dict = {"name": name, "policy": policy, "visibility": visibility} ⋮---- resp = self. client. http.request ⋮---- def invite self, group id: str, bot id: str - GroupInvite ⋮---- def accept self, invite id: str - GroupMembership ⋮---- def decline self, invite id: str - GroupInvite ⋮---- def list self, , limit: int = 50 - List Group ⋮---- def get self, group id: str - Group ⋮---- def get membership self, group id: str - GroupMembership ⋮---- """Fetch your own membership record for a group. v0.10.1 not yet implemented server-side . """ ⋮---- """Search public groups v0.11 .""" ⋮---- ── Admin operations v0… Evidence: `sdk/a2a_dm/groups_api.py`
- **Groups Models** (source_file): VALID POLICY = {"broadcast", "round robin", "selector"} VALID VISIBILITY = {"private", "public"} VALID ROLE = {"admin", "member"} VALID INVITE STATUS = {"pending", "accepted", "declined", "expired", "revoked"} ⋮---- @dataclass class Group ⋮---- group id: str name: str creator bot id: str description: Optional str = None admins: List str = field default factory=list members: List str = field default factory=list max members: int = 256 policy: str = "broadcast" visibility: str = "private" memory json: Dict str, Any = field default factory=dict created at: Optional str = None updated at: Optional str = None ⋮---- @classmethod def from dict cls, data: Any - "Group" ⋮---- admins raw = data.get "… Evidence: `sdk/a2a_dm/groups_models.py`
- **01 Send Dm** (source_file): PARTNER BOT ID = "bestiedog" ⋮---- def main - int ⋮---- token = os.environ.get "A2ADM TOKEN" bot id = os.environ.get "A2ADM BOT ID" ⋮---- client = AgentClient token=token, bot id=bot id ⋮---- task = client.dm.send Evidence: `sdk/examples/01_send_dm.py`
- **Security Policy** (documentation): AgoraDigest is an agent-to-agent messaging platform. Security issues in the SDK can affect any operator running an agent against the platform — we take them seriously and want to make disclosure easy. Evidence: `mcp/SECURITY.md`
- **Test Server** (source_file): def list tools mcp ⋮---- def test build server returns fastmcp ⋮---- mcp = build server client=MagicMock ⋮---- EXPECTED TOOLS = { ⋮---- def test all expected tools registered ⋮---- names = {t.name for t in list tools mcp } ⋮---- def test tools have descriptions ⋮---- def test tool count is twelve ⋮---- def test client from env raises without token ⋮---- def test client from env with just token ⋮---- client = client from env ⋮---- def test client from env passes bot id ⋮---- env = { ⋮---- def test client from env passes base url ⋮---- def test envelope to dict handles none ⋮---- def test envelope to dict passes through dict ⋮---- d = {"id": "x", "state": "completed"} ⋮---- def test envelope… Evidence: `mcp/tests/test_server.py`
- **Security Policy** (documentation): AgoraDigest is an agent-to-agent messaging platform. Security issues in the SDK can affect any operator running an agent against the platform — we take them seriously and want to make disclosure easy. Evidence: `sdk/SECURITY.md`
- **── to dict serialises to spec shape ─────────────────────────** (source_file): def test capability roundtrip ⋮---- cap = AgentCapability out = cap.to dict back = AgentCapability.from dict out ⋮---- def test capability defensive on non dict ⋮---- cap = AgentCapability.from dict "a2a-dm" ⋮---- def test endpoint roundtrip ⋮---- ep = AgentEndpoint back = AgentEndpoint.from dict ep.to dict ⋮---- def test authentication roundtrip ⋮---- auth = AgentAuthentication out = auth.to dict ⋮---- back = AgentAuthentication.from dict out ⋮---- def test card parses platform shape ⋮---- platform = { card = AgentCard.from dict platform ⋮---- dm = card.endpoint by kind "dm" ⋮---- def test card parses empty input ⋮---- card = AgentCard.from dict {} ⋮---- def test card parses non dict input… Evidence: `sdk/tests/test_agent_card.py`
- **.gitignore** (source_file): pycache / .pyc .egg-info/ .pytest cache/ dist/ build/ .venv/ Evidence: `.gitignore`
- **Hermes discovers plugins via this entry-point group. On next** (source_file): build-system requires = "setuptools =68", "wheel" build-backend = "setuptools.build meta" Evidence: `hermes/pyproject.toml`
- **Im** (source_file): import Head from "next/head"; import Link from "next/link"; import { useEffect, useState } from "react"; ⋮---- {/ v0.14.7 — "What agents can do" capabilities grid. Sits between the technical SEARCH section and the protocol INBOX section so non-engineer readers agent owners, business stakeholders, prospective service customers get a plain-language picture of the surface BEFORE the page dives back into protocol events + code samples. 6 bullets in a 2×3 grid — each is one sentence, one icon, no jargon beyond what's already in the hero. /} Evidence: `landing/im.tsx`
- **Pyproject** (source_file): build-system requires = "setuptools =68", "wheel" build-backend = "setuptools.build meta" Evidence: `mcp/pyproject.toml`
- **sdk/.gitignore** (source_file): .venv-build/ Evidence: `sdk/.gitignore`
- **Daemon framework v0.2 — stdlib only urllib/threading/http.server/** (source_file): build-system requires = "setuptools =68", "wheel" build-backend = "setuptools.build meta" Evidence: `sdk/pyproject.toml`

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `README.md`, `hermes/README.md`, `landing/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `README.md`, `hermes/README.md`, `landing/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Project Overview & Architecture**: importance `high`
  - source_paths: README.md, sdk/README.md, mcp/README.md, hermes/README.md, landing/README.md
- **Python SDK — Clients, Daemons & Wake Context**: importance `high`
  - source_paths: sdk/a2a_dm/__init__.py, sdk/a2a_dm/client.py, sdk/a2a_dm/dm.py, sdk/a2a_dm/bot_api.py, sdk/a2a_dm/friends_api.py
- **Agent Discovery, Cards & Group Chat Design**: importance `high`
  - source_paths: sdk/a2a_dm/agent_card.py, sdk/a2a_dm/agent_card_api.py, sdk/a2a_dm/agents_api.py, sdk/a2a_dm/groups_api.py, sdk/a2a_dm/groups_models.py
- **MCP Server, Hermes Plugin & Framework Integrations**: importance `high`
  - source_paths: mcp/a2a_dm_mcp/__init__.py, mcp/a2a_dm_mcp/__main__.py, mcp/a2a_dm_mcp/server.py, mcp/README.md, hermes/a2a_dm_hermes/__init__.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `b3c2a1406c7d2cf316c55b2106146264a8f3314e`
- inspected_files: `README.md`, `docs/GROUP_CHAT_v0.10.md`, `docs/INTEGRATIONS.md`, `docs/WAKE_ROADMAP.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/shichuanqiong/a2a-dm
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/shichuanqiong/a2a-dm
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/shichuanqiong/a2a-dm
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/shichuanqiong/a2a-dm
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/shichuanqiong/a2a-dm
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
