Skip to content

feat: add real TypeChain Petstore agent factory - #22

Merged
sjungwon03 merged 3 commits into
devfrom
feat/21-real-typechain-petstore-agent
Jul 29, 2026
Merged

feat: add real TypeChain Petstore agent factory#22
sjungwon03 merged 3 commits into
devfrom
feat/21-real-typechain-petstore-agent

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Summary

Closes #21.

Add a real LangChain agent entrypoint over the existing read-only Swagger Petstore TypeMCP server.

  • Add createPetstoreAgent({ model, server? }), which delegates to TypeChain createTypeMcpAgent() with an explicit resolver-backed PetstoreServer.
  • Add a fixture runner and test using LangChain FakeToolCallingModel: the real agent loop selects and executes search_available_pets and returns the TypeMCP-derived fixture result.
  • Document the distinction between the existing deterministic adapter workflow and the real agent factory.
  • Keep model/provider selection, provider packages, credentials, authorization, retries, and observability application-owned.

Explicit boundaries

  • No provider SDK or model identifier was added.
  • No API key, credential, or environment-variable model configuration.
  • No automated live LLM call in CI.
  • No MCP HTTP/stdio transport, MCP client/session, or Petstore write operation.
  • Existing Petstore client remains fixed-host and GET-only.

Verification

  • npm ci --ignore-scripts --no-audit
  • npm run lint
  • npm run build
  • npm test — 9 test files / 13 tests.
  • npm run audit:prod — 0 vulnerabilities.
  • npm run check
  • npm run example:petstore:typemcp:fixture
  • npm run example:petstore:agent:fixture
  • npm run example:petstore:agent:real:fixture — observed available-pets-call and the two fixture pets.
  • git diff --check

@sjungwon03 sjungwon03 added the enhancement New feature or request label Jul 29, 2026
@sjungwon03 sjungwon03 self-assigned this Jul 29, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact head 6934f3f. Real createTypeMcpAgent delegation with caller-owned model, genuine FakeToolCallingModel agent-loop proof against fixture data, TypeMCP stays read-only, README distinction is exact, and verify is green at this SHA with no unresolved threads.

Comment thread examples/typechain-petstore-real-agent-fixture.ts
Comment thread examples/typechain-petstore-real-agent.ts
@sjungwon03
sjungwon03 merged commit 76d4171 into dev Jul 29, 2026
1 check passed
@sjungwon03
sjungwon03 deleted the feat/21-real-typechain-petstore-agent branch July 29, 2026 02:42
sjungwon03 added a commit that referenced this pull request Jul 29, 2026
* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

* fix(deps): adopt TypeMCP 0.2.2 remediation (#7)

* chore: reconcile main release history into dev (#11)

* release: publish verified TypeChain and TypeMCP examples (#1)

Co-authored-by: sjungwon03 <>

* release: promote audited MCP SDK graph to production (#5)

* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

---------

Co-authored-by: sjungwon03 <>

* fix: retain published TypeMCP dependency contract

* fix: remove obsolete reconciliation override

* feat: add read-only Swagger Petstore agent examples (#16)

* docs(planning): add Swagger Petstore agent plan

* feat: add read-only Swagger Petstore client

* feat: wrap read-only Petstore API in TypeMCP

* feat: add TypeChain Petstore agent workflow

* feat: add live Swagger Petstore demonstrations

* feat: add real TypeChain Petstore agent factory (#22)

* docs(planning): define real Petstore agent delivery

* feat: add real TypeChain Petstore agent factory

* docs: explain application-owned Petstore agent runtime

---------

Co-authored-by: sjungwon03 <>
sjungwon03 added a commit that referenced this pull request Jul 29, 2026
* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

* fix(deps): adopt TypeMCP 0.2.2 remediation (#7)

* chore: reconcile main release history into dev (#11)

* release: publish verified TypeChain and TypeMCP examples (#1)

Co-authored-by: sjungwon03 <>

* release: promote audited MCP SDK graph to production (#5)

* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

---------

Co-authored-by: sjungwon03 <>

* fix: retain published TypeMCP dependency contract

* fix: remove obsolete reconciliation override

* feat: add read-only Swagger Petstore agent examples (#16)

* docs(planning): add Swagger Petstore agent plan

* feat: add read-only Swagger Petstore client

* feat: wrap read-only Petstore API in TypeMCP

* feat: add TypeChain Petstore agent workflow

* feat: add live Swagger Petstore demonstrations

* feat: add real TypeChain Petstore agent factory (#22)

* docs(planning): define real Petstore agent delivery

* feat: add real TypeChain Petstore agent factory

* docs: explain application-owned Petstore agent runtime

* refactor: build Petstore TypeMCP HTTP agent example (#28)

* docs: design real Petstore MCP agent example

* docs(planning): detail Petstore MCP agent rewrite

* feat: add loopback Petstore MCP runtime and client

* feat: add TypeChain Petstore MCP agent

* refactor: center examples on Petstore MCP agent

* ci: verify Petstore MCP fixtures

---------

Co-authored-by: sjungwon03 <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a real TypeChain Petstore agent factory with caller-supplied model

2 participants