Where is the agent running? #127
-
Hi, relatively new to LangGraph and I'm trying to understand where the agent is actually running. I thought an agent needs to run on a LangGraph server (either their cloud or manually with redis, etc). This setup seems simpler than I expected but now I'm confused. Any clarification will help greatly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @apsquared - This repo provides a template for running the LangGraph agent manually in your own service and interacting with it through a simple REST API. In the repo it just uses a SQLite database for checkpointing, so it isn't as persisted as e.g. a Redis setup, but you could swap that in easily too. Specifically, you can see the provided agents enumerated in src/agents/agents.py and then retrieved and invoked when the service endpoint is called So, if you do There's a YouTube walkthrough of the architecture linked in the README which might be helpful. The code layout has evolved somewhat since I recorded it but the core architecture and design is still the same. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Yea, very helpful. The langgraph docs confused me a bit but this repo is
the one that helped me understand it all.
…On Sat, Jan 4, 2025 at 3:39 PM Joshua Carroll ***@***.***> wrote:
Hi @apsquared <https://github.com/apsquared> - This repo provides a
template for running the LangGraph agent manually in your own service and
interacting with it through a simple REST API. In the repo it just uses a
SQLite database for checkpointing, so it isn't as persisted as e.g. a Redis
setup, but you could swap that in easily too.
Specifically, you can see the provided agents enumerated in
src/agents/agents.py
<https://github.com/JoshuaC215/agent-service-toolkit/blob/198b878d48e717418e0e8241f8033dda5186c087/src/agents/agents.py#L19-L25>
and then retrieved and invoked when the service endpoint is called
<https://github.com/JoshuaC215/agent-service-toolkit/blob/198b878d48e717418e0e8241f8033dda5186c087/src/service/service.py#L105-L111>
So, if you do python src/run_service.py it spins up the FastAPI service,
and the agent will run in that python process and checkpoint to a SQLite
checkpointer on the local filesystem.
There's a YouTube walkthrough of the architecture linked in the README
which might be helpful. The code layout has evolved somewhat since I
recorded it but the core architecture and design is still the same.
Hope this helps!
—
Reply to this email directly, view it on GitHub
<#127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7O47CPD3P3753TUJ556P2D2JBBHLAVCNFSM6AAAAABUTHBPDOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZTGU2TAOI>
.
You are receiving this because you were mentioned.Message ID:
<JoshuaC215/agent-service-toolkit/repo-discussions/127/comments/11735509@
github.com>
|
Beta Was this translation helpful? Give feedback.
Hi @apsquared - This repo provides a template for running the LangGraph agent manually in your own service and interacting with it through a simple REST API. In the repo it just uses a SQLite database for checkpointing, so it isn't as persisted as e.g. a Redis setup, but you could swap that in easily too.
Specifically, you can see the provided agents enumerated in src/agents/agents.py and then retrieved and invoked when the service endpoint is called
So, if you do
python src/run_service.py
it spins up the FastAPI service, and the agent will run in that python process and checkpoint to a SQLite checkpointer on the local filesystem.There's a YouTube walkthrough of the architecture linked i…