Skip to content

feat(example): land the ask endpoint on main - #7

Merged
smithclay merged 2 commits into
mainfrom
demo-prep
Oct 12, 2026
Merged

smithclay merged 2 commits into
mainfrom
demo-prep

Conversation

@smithclay

Copy link
Copy Markdown
Owner

#5 (the ask endpoint with code memory retrieval) was stacked on demo-prep. It merged into demo-prep after demo-prep had already merged into main via #3, so its changes never reached main. This PR carries them over unchanged: the diff is #5's commit only.

What lands

  • POST /agents/:name/ask: a Workers AI tool-calling loop (glm-5.3-flash) over the lava lamp wall.
    • It retrieves up to 3 runs from other agents via Vectorize, and records them in a Codemode-Examples trailer.
    • It indexes the run that produced the answer.
    • It returns answer, steps, executions, tokens, examples and commits.
  • GET /agents/:name/examples?question=…: what ask would retrieve. The walkthrough polls it.
  • examples/agent/scripts/walkthrough.mjs: the michelle → matthew demo driver.
  • AI and EXAMPLES bindings in cloudflare.config.ts and wrangler.jsonc, plus README docs.

Verified in #5: typecheck, tests, and cf build / cf deploy --dry-run / wrangler deploy --dry-run. Not yet run against Cloudflare.

POST /agents/:name/ask runs a Workers AI tool-calling loop over the Code Mode runtime, shows other agents' answer-producing runs as unverified examples, records them in Codemode-Examples trailers, and indexes its own answer-producing run. Adds AI and EXAMPLES bindings, GET /agents/:name/examples, and scripts/walkthrough.mjs for the michelle/matthew demo.
feat(example): add ask endpoint with code memory retrieval
@smithclay
smithclay merged commit ba77f18 into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant