@yottagraph-app/aether-instructions 1.1.31 → 1.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/build_my_app.md +16 -11
- package/commands/deploy_agent.md +76 -19
- package/package.json +1 -1
- package/rules/agents-data.mdc +16 -0
- package/rules/agents.mdc +18 -0
- package/rules/data.mdc +14 -0
- package/variants/mcp-only/commands/build_my_app.md +16 -11
- package/variants/mcp-only/rules/agents-data.mdc +16 -0
package/commands/build_my_app.md
CHANGED
|
@@ -246,21 +246,26 @@ workflow — ask before pushing directly to main in that case.
|
|
|
246
246
|
|
|
247
247
|
## Step 8: Deploy Agents and Next Steps
|
|
248
248
|
|
|
249
|
-
If the app includes agents in `agents/`,
|
|
249
|
+
If the app includes agents in `agents/`, **deploy them automatically** —
|
|
250
|
+
don't ask for confirmation. Run `/deploy_agent` for each agent immediately
|
|
251
|
+
after pushing. The brief asked you to build an app with agents; deploying
|
|
252
|
+
them is part of delivering a working app.
|
|
250
253
|
|
|
251
|
-
|
|
252
|
-
|
|
254
|
+
**Skip `example_agent`** — this is a template placeholder, not a real
|
|
255
|
+
agent. Only deploy agents you actually built for this project.
|
|
253
256
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
After triggering deployment, monitor it yourself (see `/deploy_agent`
|
|
258
|
+
Step 6 for how to poll). Only escalate to the user if deployment fails
|
|
259
|
+
and you can't resolve it.
|
|
260
|
+
|
|
261
|
+
If DESIGN.md explicitly says NOT to deploy, or says to wait for user
|
|
262
|
+
confirmation, respect that. Otherwise, deploy without asking.
|
|
257
263
|
|
|
258
264
|
Then present next steps:
|
|
259
265
|
|
|
260
266
|
> Here's what you can do next:
|
|
261
267
|
>
|
|
262
|
-
> - **Preview
|
|
263
|
-
> - **
|
|
264
|
-
> -
|
|
265
|
-
>
|
|
266
|
-
> - **Deploy MCP servers** -- same as above, from the portal or ask me
|
|
268
|
+
> - **Preview the app** — Vercel auto-deployed on push to main
|
|
269
|
+
> - **Agents are deploying** — I triggered deployment; it typically
|
|
270
|
+
> takes 2-5 minutes. I'll let you know when they're registered.
|
|
271
|
+
> - **MCP servers** — deploy from the Broadchurch portal or ask me
|
package/commands/deploy_agent.md
CHANGED
|
@@ -4,7 +4,7 @@ Deploy an ADK agent from the `agents/` directory to Vertex AI Agent Engine via t
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
This command deploys a Python ADK agent by triggering a
|
|
7
|
+
This command deploys a Python ADK agent by triggering a Cloud Build job through the Portal API. No local GCP credentials are needed — Cloud Build authenticates via the project's service account.
|
|
8
8
|
|
|
9
9
|
The agent must live in `agents/<name>/` with the standard ADK structure (`agent.py`, `__init__.py`, `requirements.txt`).
|
|
10
10
|
|
|
@@ -56,9 +56,13 @@ ls -d agents/*/
|
|
|
56
56
|
|
|
57
57
|
Stop here.
|
|
58
58
|
|
|
59
|
-
**
|
|
59
|
+
**Skip `example_agent`** — this is a template placeholder and should
|
|
60
|
+
never be deployed. Filter it out before proceeding.
|
|
60
61
|
|
|
61
|
-
**If
|
|
62
|
+
**If multiple agents remain:** Deploy all of them. If called interactively
|
|
63
|
+
(not from `/build_my_app`), ask the user which one to deploy.
|
|
64
|
+
|
|
65
|
+
**If only one agent remains:** Proceed with it — no confirmation needed.
|
|
62
66
|
|
|
63
67
|
**Important:** Agent directory names must use underscores, not hyphens (e.g., `my_agent` not `my-agent`).
|
|
64
68
|
|
|
@@ -110,35 +114,88 @@ curl -sf -X POST "<GATEWAY_URL>/api/projects/<ORG_ID>/deploy" \
|
|
|
110
114
|
|
|
111
115
|
**If this fails with 404:** The agent directory may not exist on GitHub yet. Push your code first.
|
|
112
116
|
|
|
113
|
-
**If this succeeds:** The
|
|
117
|
+
**If this succeeds:** The response will look like:
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"ok": true,
|
|
122
|
+
"method": "cloud-build",
|
|
123
|
+
"build_id": "...",
|
|
124
|
+
"log_url": "https://console.cloud.google.com/cloud-build/builds/...",
|
|
125
|
+
"target": "agents/<name>",
|
|
126
|
+
"repo": "<owner>/<repo>"
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Save the `build_id` — you'll need it for monitoring.
|
|
114
131
|
|
|
115
132
|
---
|
|
116
133
|
|
|
117
|
-
## Step 6: Monitor Progress
|
|
134
|
+
## Step 6: Monitor Progress and Confirm Registration
|
|
118
135
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
136
|
+
Deployment uses Cloud Build and typically takes 2-5 minutes. Monitor it
|
|
137
|
+
yourself rather than asking the user to check.
|
|
138
|
+
|
|
139
|
+
### 6a. Poll build status
|
|
140
|
+
|
|
141
|
+
Use the deploy-status endpoint to check whether the build has finished:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
curl -sf "<GATEWAY_URL>/api/projects/<ORG_ID>/deploy-status" | jq '.cloud_builds[]'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Each build entry has a `status` field. Terminal statuses are: `SUCCESS`,
|
|
148
|
+
`FAILURE`, `CANCELLED`, `TIMEOUT`, `INTERNAL_ERROR`, `EXPIRED`.
|
|
149
|
+
|
|
150
|
+
Poll every 30 seconds until the build reaches a terminal status (up to
|
|
151
|
+
5 minutes). If it's still running after 5 minutes, tell the user and
|
|
152
|
+
share the `log_url` from the deploy response.
|
|
153
|
+
|
|
154
|
+
### 6b. Confirm agent registration
|
|
155
|
+
|
|
156
|
+
A successful build doesn't guarantee the agent is usable yet — it also
|
|
157
|
+
needs to be registered with the tenant config. Poll the config endpoint
|
|
158
|
+
until the agent appears:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
curl -sf "<GATEWAY_URL>/api/config/<ORG_ID>" | jq '.agents'
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Check that the `agents` array contains an entry whose name matches your
|
|
165
|
+
agent. Poll every 30 seconds for up to 3 minutes after the build
|
|
166
|
+
succeeds.
|
|
167
|
+
|
|
168
|
+
### 6c. Report result
|
|
169
|
+
|
|
170
|
+
**If the agent appears in config:**
|
|
171
|
+
|
|
172
|
+
> Agent `<name>` is deployed and registered. It should now be available
|
|
173
|
+
> in the app's chat interface.
|
|
174
|
+
|
|
175
|
+
**If the build succeeded but the agent doesn't appear in config after
|
|
176
|
+
3 minutes:**
|
|
177
|
+
|
|
178
|
+
> The Cloud Build job succeeded, but the agent hasn't appeared in the
|
|
179
|
+
> tenant config yet. This may indicate the registration step failed
|
|
180
|
+
> silently. Check the build logs: <log_url>
|
|
181
|
+
|
|
182
|
+
**If the build failed:**
|
|
183
|
+
|
|
184
|
+
> Agent deployment failed with status `<status>`. Check the build logs
|
|
185
|
+
> for details: <log_url>
|
|
130
186
|
|
|
131
187
|
---
|
|
132
188
|
|
|
133
189
|
## Troubleshooting
|
|
134
190
|
|
|
135
|
-
###
|
|
191
|
+
### Cloud Build fails
|
|
136
192
|
|
|
137
|
-
Check the
|
|
193
|
+
Check the build logs at the `log_url` returned by the deploy endpoint.
|
|
194
|
+
Common issues:
|
|
138
195
|
|
|
139
196
|
- **"agent.py does not export root_agent"**: Ensure your agent module defines `root_agent`.
|
|
140
197
|
- **"Module not found"**: All dependencies must be in the agent's `requirements.txt`.
|
|
141
|
-
- **
|
|
198
|
+
- **Service account permissions**: The Broadchurch admin may need to verify the project's service account has the required IAM roles.
|
|
142
199
|
|
|
143
200
|
### Agent directory naming
|
|
144
201
|
|
package/package.json
CHANGED
package/rules/agents-data.mdc
CHANGED
|
@@ -70,3 +70,19 @@ In production, all Elemental API calls go through the Portal Gateway at
|
|
|
70
70
|
`{gateway_url}/api/qs/{org_id}/...`. The agent sends `X-Api-Key` (from
|
|
71
71
|
`broadchurch.yaml`) and the portal injects its own Auth0 M2M token
|
|
72
72
|
upstream.
|
|
73
|
+
|
|
74
|
+
## Reliability invariants (REST-backed agents)
|
|
75
|
+
|
|
76
|
+
These constraints reduce failure modes when building graph-aware agents on
|
|
77
|
+
the Query Server API:
|
|
78
|
+
|
|
79
|
+
- **Resolve entities first.** For named-entity questions, do explicit entity
|
|
80
|
+
resolution before deeper property/relationship/event retrieval.
|
|
81
|
+
- **Prefer domain endpoints over heuristic matching.** Use dedicated event or
|
|
82
|
+
relationship APIs instead of inferring semantics from property/PID names.
|
|
83
|
+
- **Keep IDs internal to tool calls.** Use NEIDs/EIDs internally for precise
|
|
84
|
+
requests, and render human-readable names in user-facing output.
|
|
85
|
+
- **Dereference linked values before display.** Reference-like property
|
|
86
|
+
values should be resolved into entity names when shown to users.
|
|
87
|
+
- **Treat 404 as not-found data by default.** Validate server health
|
|
88
|
+
separately before classifying these as connectivity failures.
|
package/rules/agents.mdc
CHANGED
|
@@ -316,6 +316,24 @@ LLMs are better at parsing prose than nested JSON. The difference between
|
|
|
316
316
|
a tool that works reliably and one that confuses the agent often comes down
|
|
317
317
|
to how the tool formats its output. Follow these principles:
|
|
318
318
|
|
|
319
|
+
### Runtime invariants for data-heavy agents
|
|
320
|
+
|
|
321
|
+
These are generic constraints that improve reliability across graph-backed
|
|
322
|
+
agents (MCP or REST-backed):
|
|
323
|
+
|
|
324
|
+
- **Resolve entities before domain fan-out.** For user prompts about named
|
|
325
|
+
entities, do explicit entity resolution first, then run domain-specific
|
|
326
|
+
retrieval (events, filings, relationships, sanctions, etc.).
|
|
327
|
+
- **Use internal IDs only for precision.** Keep stable IDs (NEID/EID/etc.)
|
|
328
|
+
in tool calls and state, but do not expose raw internal IDs in
|
|
329
|
+
user-facing prose unless the user explicitly asks for them.
|
|
330
|
+
- **Prefer canonical APIs over heuristic parsing.** For domain concepts
|
|
331
|
+
like events, use the dedicated API/tool and its typed fields; do not infer
|
|
332
|
+
semantics from property name substring matching.
|
|
333
|
+
- **Separate gather from synthesize.** Retrieval tools should gather and
|
|
334
|
+
format reliable intermediate outputs; the final user answer should be
|
|
335
|
+
composed after all relevant tool outputs are available.
|
|
336
|
+
|
|
319
337
|
### Return formatted strings, not raw JSON
|
|
320
338
|
|
|
321
339
|
This applies to ADK agent tools, where the LLM reads tool output directly.
|
package/rules/data.mdc
CHANGED
|
@@ -249,6 +249,20 @@ types or property names. Instead, discover them at runtime:
|
|
|
249
249
|
This pattern lets agents work with any dataset without needing hardcoded
|
|
250
250
|
knowledge of what's in the graph.
|
|
251
251
|
|
|
252
|
+
## Semantics-First Data Handling
|
|
253
|
+
|
|
254
|
+
For reliable agent behavior, prefer typed semantics over string heuristics:
|
|
255
|
+
|
|
256
|
+
- **Use canonical endpoints/tools for each domain.** Example: fetch events
|
|
257
|
+
from event APIs (`elemental_get_events` / event endpoints), not by scanning
|
|
258
|
+
unrelated property names for words like "event" or "filing".
|
|
259
|
+
- **Treat reference-typed properties as links, not display text.** For
|
|
260
|
+
relationship/reference values (`data_nindex` and similar), resolve linked
|
|
261
|
+
entities before presenting user-facing output.
|
|
262
|
+
- **Interpret 404s as data absence first.** A 404 on entity/property lookups
|
|
263
|
+
usually means "not found in current data," not transport failure. Validate
|
|
264
|
+
connectivity separately (for example, with health endpoints).
|
|
265
|
+
|
|
252
266
|
## API Gotchas
|
|
253
267
|
|
|
254
268
|
### `getSchema()` response structure differs by endpoint
|
|
@@ -157,21 +157,26 @@ Deploy agents as needed; if the brief relies on **materialized** data, run or sc
|
|
|
157
157
|
|
|
158
158
|
## Step 8: Deploy Agents and Next Steps
|
|
159
159
|
|
|
160
|
-
If the app includes agents in `agents/`,
|
|
160
|
+
If the app includes agents in `agents/`, **deploy them automatically** —
|
|
161
|
+
don't ask for confirmation. Run `/deploy_agent` for each agent immediately
|
|
162
|
+
after pushing. The brief asked you to build an app with agents; deploying
|
|
163
|
+
them is part of delivering a working app.
|
|
161
164
|
|
|
162
|
-
|
|
163
|
-
|
|
165
|
+
**Skip `example_agent`** — this is a template placeholder, not a real
|
|
166
|
+
agent. Only deploy agents you actually built for this project.
|
|
164
167
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
After triggering deployment, monitor it yourself (see `/deploy_agent`
|
|
169
|
+
Step 6 for how to poll). Only escalate to the user if deployment fails
|
|
170
|
+
and you can't resolve it.
|
|
171
|
+
|
|
172
|
+
If DESIGN.md explicitly says NOT to deploy, or says to wait for user
|
|
173
|
+
confirmation, respect that. Otherwise, deploy without asking.
|
|
168
174
|
|
|
169
175
|
Then present next steps:
|
|
170
176
|
|
|
171
177
|
> Here's what you can do next:
|
|
172
178
|
>
|
|
173
|
-
> - **Preview
|
|
174
|
-
> - **
|
|
175
|
-
> -
|
|
176
|
-
>
|
|
177
|
-
> - **MCP servers** — same as above, from the portal or ask me
|
|
179
|
+
> - **Preview the app** — Vercel auto-deployed on push to main
|
|
180
|
+
> - **Agents are deploying** — I triggered deployment; it typically
|
|
181
|
+
> takes 2-5 minutes. I'll let you know when they're registered.
|
|
182
|
+
> - **MCP servers** — deploy from the Broadchurch portal or ask me
|
|
@@ -34,6 +34,22 @@ export DATABASE_URL="postgresql://..."
|
|
|
34
34
|
|
|
35
35
|
MCP tools handle schema, entity resolution, related entities, events, sentiment, etc. Use them for **discovery** in research agents and for **batch extraction** in sync agents. Match tool choice to the pattern (A/B/C) in each agent’s `instruction`.
|
|
36
36
|
|
|
37
|
+
## Reliability invariants (MCP agents)
|
|
38
|
+
|
|
39
|
+
For MCP-first agents, enforce these runtime rules:
|
|
40
|
+
|
|
41
|
+
- **Resolve first, then fan out.** Start with explicit entity resolution
|
|
42
|
+
before domain-specific calls (events, filings, relationships, sanctions).
|
|
43
|
+
- **Use canonical MCP tools for domain data.** Prefer dedicated tools such as
|
|
44
|
+
`elemental_get_events` for events; avoid deriving domain semantics from
|
|
45
|
+
PID/property-name substring matching.
|
|
46
|
+
- **Use IDs internally, names externally.** Pass NEIDs/entity IDs to tools
|
|
47
|
+
for precision, but present user-facing output using resolved names.
|
|
48
|
+
- **Dereference linked values before display.** If a returned property value
|
|
49
|
+
points to another entity, resolve it to a display name in final output.
|
|
50
|
+
- **Gather, then synthesize.** Let tools gather structured evidence first;
|
|
51
|
+
produce final narrative only after retrieval steps complete.
|
|
52
|
+
|
|
37
53
|
## When HTTP `elemental_client` still appears
|
|
38
54
|
|
|
39
55
|
**api-mcp** agents often use **`broadchurch_auth`** + REST. In **mcp-only**, prefer **MCP** for graph access unless you have a concrete reason to call REST from Python (e.g. legacy batch job). Do not route **Vue** through REST for the primary architecture — that contradicts mcp-only.
|