# LangGraphAgent **Repository Path**: Pooyan/lang-graph-agent ## Basic Information - **Project Name**: LangGraphAgent - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-18 - **Last Updated**: 2026-06-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LangGraphAgent LangGraph + TypeScript agent starter. ## Scripts - `pnpm dev` runs the local TypeScript entrypoint with `tsx`. - `pnpm check` type-checks the project. - `pnpm test` runs Vitest tests. - `pnpm build` emits JavaScript and declarations to `dist`. - `pnpm start` runs the built entrypoint. - `pnpm langgraph:dev` starts the LangGraph.js local development server. - `pnpm validate:agent` runs a live ReAct loop validation. - `pnpm validate:model` runs a minimal live model API validation. ## Local Setup ```bash pnpm install cp .env.example .env pnpm test pnpm dev ``` Set `DEEPSEEK_API_KEY` in `.env` before invoking the default agent graph. You can change `DEEPSEEK_MODEL` there as needed. ## Model Provider The starter uses a small DeepSeek HTTP client in `src/agent/model.ts`: ```dotenv DEEPSEEK_API_KEY=your-deepseek-api-key DEEPSEEK_MODEL=deepseek-v4-flash ``` Run the model smoke test and the full ReAct loop validation: ```bash pnpm validate:model pnpm validate:agent ``` `pnpm validate:agent` is backed by reusable smoke-test helpers in `src/agent/smoke.ts`. The test suite covers required-tool misses, model API failures, and tool execution failures. The starter graph is exported from `src/agent/graph.ts` and configured in `langgraph.json` as `agent`. ## Agent Loop The graph uses a ReAct-style loop: ```text START -> agent -> tools -> agent -> END ``` The `agent` node calls the DeepSeek chat model with tools bound. If the model returns tool calls, the graph routes to the `tools` node, executes the requested tools, and returns to `agent` for the final response. Default tools: - `get_current_time` returns the current time as an ISO-8601 string. - `calculator` performs add, subtract, multiply, and divide operations. - `web_search` searches public web knowledge through the MediaWiki OpenSearch API and returns titles, snippets, and URLs.