# .graph accessor --\> Mix StateGraph and createAgent?

**URL:** <https://forum.langchain.com/t/graph-accessor-mix-stategraph-and-createagent/2004>\
**Category:** LangGraph\
**Tags:** js-help\
**Created:** [October 29, 2025, 5:44pm UTC](https://forum.langchain.com/t/graph-accessor-mix-stategraph-and-createagent/2004 "2025-10-29T17:44:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aitosoft](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/aitosoft/32/1425_2.png) [@Aitosoft](https://forum.langchain.com/u/Aitosoft)\
**Post date:** [October 29, 2025, 5:44pm UTC](https://forum.langchain.com/t/graph-accessor-mix-stategraph-and-createagent/2004/1 "2025-10-29T17:44:16Z")

</div>

👉 `createAgent()` has a `.graph` property that returns its internal **CompiledStateGraph** , which means you can plug agents directly into a `StateGraph` workflow! No wrappers… 🤓

We’ve tested this setup pretty thoroughly and it works great.  
But… there’s no mention of this pattern in the docs.

### Questions

1. Are others using `.graph` for composition?
2. Is this an intended API or just a happy accident?
3. Will this be documented officially?
4. Is there a better or “official” way to compose `StateGraph` + `createAgent`?

Thank you for any insights 🤗

---

<div class="post-metadata">

**Author:** ![Aitosoft](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/aitosoft/32/1425_2.png) [@Aitosoft](https://forum.langchain.com/u/Aitosoft)\
**Post date:** [October 30, 2025, 3:03am UTC](https://forum.langchain.com/t/graph-accessor-mix-stategraph-and-createagent/2004/2 "2025-10-30T03:03:42Z")

</div>

The official blog post confirms it!

From: [LangChain and LangGraph Agent Frameworks Reach v1.0 Milestones](https://blog.langchain.com/langchain-langgraph-1dot0/) (Oct 22, 2025):

> LangChain agents are built on LangGraph, so you’re not locked in. Start with LangChain’s high-level APIs and seamlessly drop down to LangGraph when you need more control. Since graphs are composable, you can mix both approaches—using agents created with `create_agent` inside custom LangGraph workflows as your needs evolve.

How can you do mix them freely without the undocumented .graph?

---

<div class="post-metadata">

**Author:** ![Aitosoft](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/aitosoft/32/1425_2.png) [@Aitosoft](https://forum.langchain.com/u/Aitosoft)\
**Post date:** [November 20, 2025, 8:30am UTC](https://forum.langchain.com/t/graph-accessor-mix-stategraph-and-createagent/2004/3 "2025-11-20T08:30:41Z")

</div>

After insane amount of testing my conclusion, there is a bug!

[createAgent can’t be used as a StateGraph node - Python parity issue · Issue #1767 · langchain-ai/langgraphjs](https://github.com/langchain-ai/langgraphjs/issues/1767)
