Skip to content

fix(sdk): preserve context schema typing in create_deep_agent#2011

Closed
LRRuan wants to merge 3 commits intolangchain-ai:mainfrom
LRRuan:fix/issue-1778-context-schema-typing
Closed

fix(sdk): preserve context schema typing in create_deep_agent#2011
LRRuan wants to merge 3 commits intolangchain-ai:mainfrom
LRRuan:fix/issue-1778-context-schema-typing

Conversation

@LRRuan
Copy link
Copy Markdown

@LRRuan LRRuan commented Mar 18, 2026

Summary

  • preserve the runtime context type in create_deep_agent's context_schema signature
  • return a parameterized CompiledStateGraph so type checkers infer invoke(..., context=...) correctly
  • keep runtime behavior unchanged

Testing

  • python3 -m py_compile libs/deepagents/deepagents/graph.py

Closes #1778

@github-actions github-actions bot added deepagents Related to the `deepagents` SDK / agent harness size: XS < 50 LOC labels Mar 18, 2026
@org-membership-reviewer org-membership-reviewer bot added new-contributor external User is not a member of the `langchain-ai` GitHub organization labels Mar 18, 2026
@LRRuan LRRuan changed the title Preserve context schema typing in create_deep_agent fix(sdk): preserve context schema typing in create_deep_agent Mar 18, 2026
@github-actions github-actions bot added the fix A bug fix (PATCH) label Mar 18, 2026
@mdrxy Mason Daugherty (mdrxy) changed the title fix(sdk): preserve context schema typing in create_deep_agent fix(sdk): preserve context schema typing in create_deep_agent Mar 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR has been automatically closed because you are not assigned to the linked issue.

External contributors must be assigned to an issue before opening a PR for it. Please:

  1. Comment on the linked issue to request assignment from a maintainer
  2. Once assigned, edit your PR description and the PR will be reopened automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents Related to the `deepagents` SDK / agent harness external User is not a member of the `langchain-ai` GitHub organization fix A bug fix (PATCH) missing-issue-link new-contributor size: XS < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create_deep_agent does not preserve input types as create_agent does

1 participant