# whtcjdtc2007/anna-executa-examples architecture

> Architecture diagram of the GitHub repository whtcjdtc2007/anna-executa-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/whtcjdtc2007/anna-executa-examples
- Repository: https://github.com/whtcjdtc2007/anna-executa-examples

## Overview

This repository provides reference SDKs and runnable examples for Anna Executa plugins, rather than the Anna host itself. The principal workflow is a plugin receiving an invocation, using SDK helpers to communicate with the host over JSON-RPC, and returning a result; the host can then perform managed capabilities such as LLM, storage, media, and web operations. Examples document Python, Node.js, and Go plugins, credentials/OAuth, and local or binary distribution. SDK feature paths and documented capabilities are included; unsampled runtime wiring is not inferred.

Main entry points: [`examples`](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples) (Plugin tool), [`sdk/nodejs/context.js`](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/context.js) (Invoke context), [`sdk/nodejs/sampling.js`](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/sampling.js) (LLM sampling), [`examples/python`](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/python) (Python examples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_examples["Plugin examples"]
  node_plugin["Plugin tool"]
  node_py_examples["Python examples"]
  node_js_examples["Node examples"]
  node_go_examples["Go examples"]
  node_app_examples["Anna App examples"]
end

subgraph group_sdk["SDK capabilities"]
  node_sdk_context["Invoke context<br/>[context.js]"]
  node_sdk_sampling["LLM sampling<br/>[sampling.js]"]
  node_sdk_embeddings["Embeddings<br/>[embeddings.py]"]
  node_sdk_storage["Persistent storage<br/>[storage.js]"]
  node_sdk_upload["Host uploads<br/>[host_upload.js]"]
  node_sdk_image["Image generation<br/>[image.js]"]
  node_sdk_media["Media generation<br/>[media.js]"]
  node_sdk_web["Web search<br/>[web.js]"]
  node_sdk_progress["Progress updates<br/>[progress.js]"]
end

subgraph group_host["Host services"]
  node_host_agent["Anna host Agent"]
  node_llm["Host LLM"]
  node_aps[("Anna Persistent Storage")]
  node_nexus["Nexus services"]
end

node_developer(("Plugin developer"))

node_developer -->|"builds"| node_plugin
node_plugin -->|"JSON-RPC over stdio"| node_host_agent
node_py_examples -->|"implements"| node_plugin
node_js_examples -->|"implements"| node_plugin
node_go_examples -->|"implements"| node_plugin
node_app_examples -->|"bundles tool"| node_plugin
node_plugin -.->|"reads invocation"| node_sdk_context
node_sdk_context -->|"correlates invoke"| node_sdk_sampling
node_sdk_sampling -->|"requests completion"| node_host_agent
node_host_agent -->|"performs completion"| node_llm
node_sdk_embeddings -->|"requests embeddings"| node_host_agent
node_sdk_storage -->|"requests storage"| node_host_agent
node_host_agent -->|"proxies storage"| node_aps
node_sdk_upload -->|"requests upload"| node_host_agent
node_sdk_image -->|"requests image work"| node_host_agent
node_sdk_media -->|"requests media work"| node_host_agent
node_host_agent -->|"proxies media"| node_nexus
node_sdk_web -->|"requests web access"| node_host_agent
node_host_agent -->|"proxies web access"| node_nexus
node_plugin -.->|"emits updates"| node_sdk_progress

click node_plugin "https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples"
click node_py_examples "https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/python"
click node_js_examples "https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/nodejs"
click node_go_examples "https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/go"
click node_app_examples "https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/anna-app-focus-flow"
click node_sdk_context "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/context.js"
click node_sdk_sampling "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/sampling.js"
click node_sdk_embeddings "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/python/executa_sdk/embeddings.py"
click node_sdk_storage "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/storage.js"
click node_sdk_upload "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/host_upload.js"
click node_sdk_image "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/image.js"
click node_sdk_media "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/media.js"
click node_sdk_web "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/web.js"
click node_sdk_progress "https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/progress.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_py_examples,node_js_examples,node_go_examples,node_app_examples toneBlue
class node_sdk_context,node_sdk_sampling,node_sdk_embeddings,node_sdk_storage,node_sdk_upload,node_sdk_image,node_sdk_media,node_sdk_web,node_sdk_progress toneAmber
class node_host_agent,node_llm,node_aps,node_nexus toneMint
class node_developer toneIndigo
```

## Components

### Plugin examples

- [Plugin tool](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples): `examples`
- [Python examples](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/python): `examples/python`
- [Node examples](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/nodejs): `examples/nodejs`
- [Go examples](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/go): `examples/go`
- [Anna App examples](https://github.com/whtcjdtc2007/anna-executa-examples/tree/main/examples/anna-app-focus-flow): `examples/anna-app-focus-flow`

### SDK capabilities

- [Invoke context](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/context.js): `sdk/nodejs/context.js`
- [LLM sampling](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/sampling.js): `sdk/nodejs/sampling.js`
- [Embeddings](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/python/executa_sdk/embeddings.py): `sdk/python/executa_sdk/embeddings.py`
- [Persistent storage](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/storage.js): `sdk/nodejs/storage.js`
- [Host uploads](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/host_upload.js): `sdk/nodejs/host_upload.js`
- [Image generation](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/image.js): `sdk/nodejs/image.js`
- [Media generation](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/media.js): `sdk/nodejs/media.js`
- [Web search](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/web.js): `sdk/nodejs/web.js`
- [Progress updates](https://github.com/whtcjdtc2007/anna-executa-examples/blob/main/sdk/nodejs/progress.js): `sdk/nodejs/progress.js`

### Host services

- **Anna host Agent**
- **Host LLM**
- **Anna Persistent Storage**
- **Nexus services**

### Other components

- **Plugin developer**

## Connections

- Plugin developer → Plugin tool: builds (evidence: `README.md`)
- Plugin tool → Anna host Agent: JSON-RPC over stdio (evidence: `README.md`)
- Python examples → Plugin tool: implements (evidence: `README.md`)
- Node examples → Plugin tool: implements (evidence: `README.md`)
- Go examples → Plugin tool: implements (evidence: `README.md`)
- Anna App examples → Plugin tool: bundles tool (evidence: `README.md`)
- Plugin tool → Invoke context: reads invocation
- Invoke context → LLM sampling: correlates invoke (evidence: `sdk/nodejs/context.js`)
- LLM sampling → Anna host Agent: requests completion
- Anna host Agent → Host LLM: performs completion (evidence: `README.md`)
- Embeddings → Anna host Agent: requests embeddings (evidence: `sdk/python/executa_sdk/embeddings.py`)
- Persistent storage → Anna host Agent: requests storage (evidence: `sdk/nodejs/storage.js`)
- Anna host Agent → Anna Persistent Storage: proxies storage
- Host uploads → Anna host Agent: requests upload (evidence: `sdk/nodejs/host_upload.js`)
- Image generation → Anna host Agent: requests image work (evidence: `sdk/nodejs/image.js`)
- Media generation → Anna host Agent: requests media work (evidence: `sdk/nodejs/media.js`)
- Anna host Agent → Nexus services: proxies media
- Web search → Anna host Agent: requests web access (evidence: `sdk/nodejs/web.js`)
- Anna host Agent → Nexus services: proxies web access
- Plugin tool → Progress updates: emits updates
