Repository navigation
LLM Integration
There are precisely two opt-in hosted-model demonstrations: llm_node (string prompt/response) and messages_state_llm (chat messages). All other examples run without model API requests.
sequenceDiagram
participant Developer
participant CLI as main(argv)
participant Demo as LLM example
participant Secrets as OS environment / local .env
participant Model as ChatOpenAI
participant API as Hosted OpenAI API
Developer->>CLI: --with-llm or --topic llm_node
CLI->>Demo: run selected LLM example
Demo->>Secrets: load_dotenv; check OPENAI_API_KEY
alt Key configured
Demo->>Model: instantiate model
Demo->>Model: invoke(prompt or messages)
Model->>API: HTTPS API request
API-->>Model: model response
Model-->>Demo: response content
Demo-->>CLI: output dict
else Missing key
Demo-->>CLI: RuntimeError (configuration)
end
CLI-->>Developer: output / error
Create a local .env (the .gitignore excludes it):
OPENAI_API_KEY=YOUR_API_KEY_HERE
OPENAI_MODEL=YOUR_AVAILABLE_MODEL_NAMEThen invoke one model example explicitly:
python .\langgraph_example_multi_agents.py --topic llm_node --model YOUR_AVAILABLE_MODEL_NAMETo include both OpenAI examples in the full CLI run, use --with-llm instead. Calls require internet/model access and can incur charges. The example does not implement tool calling, retrieval, tracing, persistent memory or multi-agent model cooperation.
The attached Python script originally checked the wrong environment variable, even though its error message said OPENAI_API_KEY. The publishable source package fixes the check to OPENAI_API_KEY to match the notebook and setup guide. Do not print or commit credentials.
Multi-Agent Workflows using LangGraph · Home · Architecture · LLD · Security. This project is licensed under the Apache License, Version 2.0.© 2026 Sudhanshu Shukla · Licensed under the Apache License, Version 2.0.
Navigation
- Home
- Installation and Quickstart
- Repository Layout
- Graph Examples
- Architecture
- Implementation
- Operations
- Design Tradeoffs
- Future Enhancements
- Changes from Upload