agent-and-state

Defines conventions for LangGraph agent nodes, prompts, tools, LLM providers, and state serialization.

4|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/yeaboi-ai/yeaboi.ai --skill agent-and-state-yeaboi-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-and-state
Source: https://github.com/yeaboi-ai/yeaboi.ai/tree/main/.claude/skills/agent-and-state
Command: npx skills add https://github.com/yeaboi-ai/yeaboi.ai --skill agent-and-state-yeaboi-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Maintaining a LangGraph-based scrum assistant requires consistent patterns across agent nodes, prompts, tools, LLM providers, and state schemas; this Skill encodes those conventions so changes to src/yeaboi/agent/, prompts/, tools/, and sessions.py stay compatible with saved sessions and existing tests. ## Core Features & Use Cases - Node and prompt conventions: Enforces the parse→fallback→format node pattern, auth/billing error re-raising, human-in-the-loop review routing, and ARC-framework prompt factories. - LLM provider and tool registration: Documents lazy-imported provider setup (Anthropic, OpenAI, Google, Bedrock, Ollama, OpenAI-wire vendors) and the single get_tools() registration pattern. - State schema and session persistence: Covers ScrumState TypedDict rules, frozen-dataclass backward compatibility, schema versioning (v12), and dict_to* deserialization for --resume. - Use Case: When adding a new field to a frozen dataclass like Feature, follow the Skill's rule to give it a default value so old saved sessions still deserialize, then add tests in test_state.py. ## Quick Start Ask the agent to add a new optional field to the ScrumState in agent/state.py following the project conventions, including a default value and a corresponding test.

Frequently Asked Questions about agent-and-state

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new field to a LangGraph TypedDict state?

Add the field to ScrumState in agent/state.py as optional (total=False), then add tests in test_state.py and update __init__.py exports if public. Fields persist across --resume automatically; only messages is skipped during serialization.

How do I add a new tool to a LangChain agent?

Create @tool-decorated functions in a tools/ module, then import and append them inside get_tools() in tools/__init__.py. Imports stay lazy so missing SDKs like PyGithub or jira only fail when get_tools() is called, and the docstring drives LLM tool selection.

Why does deserializing old sessions fail after adding dataclass fields?

Frozen dataclass fields without defaults break --resume for sessions saved before the field existed. Always provide defaults like title: str = "" so _dict_to_*() functions in sessions.py can reconstruct old JSON via .get() without KeyError.

How do I handle LLM errors in agent nodes?

Re-raise auth and billing errors so users fix credentials, and fall back to deterministic _build_fallback_*() artifacts for other LLM errors. Rate-limit 429s are retried with exponential backoff in the REPL layer, not inside nodes.

Can I use Ollama or local models with a LangGraph agent?

Yes, select providers via the LLM_PROVIDER env var; Ollama uses OLLAMA_BASE_URL and OLLAMA_NUM_CTX defaults. Use get_llm(json_mode=True) and invoke_json() for JSON-parsed calls, which add constrained decoding and a one-shot invalid-JSON retry.