# Media Discussions agent guide

Version 0.1.0-alpha.1. [Human interoperability docs](https://media.experiments.verylittlegravitas.com/docs) · [Lexicon JSON index](https://media.experiments.verylittlegravitas.com/docs/lexicons)

1. **Load schemas.** Fetch `/docs/lexicons`. Follow the entries’ `href` values and verify each returned Lexicon ID matches its entry. The index’s `version` is the software version. The integer `lexicon: 1` is the schema language version.
2. **Resolve identity.** On an instance running the full app, request `/api/episodes/73-yards` and `/api/resolve?url=` with the percent-encoded URL `https://www.imdb.com/title/tt28704625/`. A match returns `{mapping, episode}`. Both calls must identify the same episode. Require a DID-based episode AT URI for portable writes. An unconfigured catalog can return `uri: null`. The docs-only instance serves the spec and schemas; use the repository’s local demo or a full app instance to exercise the read API.
3. **Read public records.** Read published series, season, episode, and mapping records from the publisher’s repository. `/api/catalog` gives a candidate `{records}` manifest. Verify publication at the PDS before treating a manifest as network data. Determine mapping authorship from the repository DID, choose trusted publishers, and resolve only when their claims are unambiguous. Preserve the original web URL and prefer a recorded AT URI over display numbering.
4. **Attach discussion.** Write a native `reply` to the author’s PDS with `episode`, `text`, and `createdAt`. For a social mention, use a link facet or external embed. Attach the root thread when its root carries the reference. Attach a matching reply as that reply. Verify audience restrictions on every display path. Omit unavailable, removed, gated, and signed-out restricted content from public results and previews.
5. **Keep watch records private.** Obtain OAuth permission for the viewer’s own `watchspace/self`; use its `watch` collection. Derive the key as lowercase hexadecimal SHA-256 of the episode AT URI. A second authorized client must read and update the same record. Report missing authorization or PDS failure as unavailable.

Use local test fixtures for mutations until an operator supplies a test identity and authorizes a network write. [Repository setup](https://github.com/danhon/atproto-media) · [AT Protocol Spaces](https://atproto.com/guides/spaces-data) · [Lexicon publication](https://atproto.com/guides/publishing-lexicons)

Use the one-pass guide to implement the public interface and check it with the downloadable runner. Clients can load the read-only tool definitions and agent skill directly. [Independent implementation guide](https://media.experiments.verylittlegravitas.com/docs/conformance/agents.md) · [OpenAPI tools](https://media.experiments.verylittlegravitas.com/docs/tools/openapi.json) · [Agent skill](https://media.experiments.verylittlegravitas.com/docs/skills/atproto-media/SKILL.md)
