Skip to content

Commit c5a3897

Browse files
authored
expanded docs + minor stylistic changes in readmes (warden-protocol#13)
* expanded docs + minor stylistic changes in readmes * fixed a typo
1 parent 130acec commit c5a3897

File tree

8 files changed

+128
-48
lines changed

8 files changed

+128
-48
lines changed

agents/coingecko-agent/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ cp .env.example .env
3636

3737
Then edit `.env` with your actual API keys.
3838

39-
## Running the agent
39+
## Running the Agent
4040

41-
### Start the agent
41+
### Start the Agent
4242

4343
```bash
4444
yarn start
4545
```
4646

4747
The agent will process predefined questions about cryptocurrencies and output structured analysis for each.
4848

49-
### Example questions
49+
### Example Questions
5050

5151
The default questions in `src/index.ts`:
5252
- "What is the price of the BTC?"
@@ -59,7 +59,7 @@ The default questions in `src/index.ts`:
5959

6060
You can modify these questions in `src/index.ts`.
6161

62-
## Output structure
62+
## Output Structure
6363

6464
The agent provides structured responses with:
6565

@@ -72,7 +72,7 @@ The agent provides structured responses with:
7272

7373
See [EXAMPLES.md](./EXAMPLES.md) for complete examples of agent output.
7474

75-
### Full data examples
75+
### Full Data Examples
7676

7777
Complete JSON response files are available in the [examples](./examples) directory. Each file contains:
7878

@@ -88,7 +88,7 @@ Complete JSON response files are available in the [examples](./examples) directo
8888

8989
## Development
9090

91-
### Available commands
91+
### Available Commands
9292

9393
```bash
9494
# Build the package
@@ -114,14 +114,14 @@ yarn test
114114

115115
Tests are located in the `tests/` directory and use Vitest.
116116

117-
## Technology stack
117+
## Technology Stack
118118

119119
- **TypeScript** - Type-safe JavaScript
120120
- **LangChain** - AI application framework
121121
- **OpenAI API** - Language models
122122
- **CoinGecko MCP** - Cryptocurrency data provider
123123

124-
## Important notes
124+
## Important Notes
125125

126126
- The agent analyzes a maximum of 2 cryptocurrencies per request
127127
- Only tokens explicitly mentioned in questions are analyzed
Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
1-
# LangGraph quick start agent in Python
1+
# LangGraph Quick Start Agent in Python
22

3-
This is an example **LangGraph Python agent** using the **OpenAI LLM** to answer questions about cryptocurrencies.
3+
## Overview
44

5-
You can run this code locally and expand it to build your own Agent, as shown in this guide:
5+
This is an example **LangGraph Python agent** using the **OpenAI LLM** to answer questions about cryptocurrencies. This agent is **A2A-compatible**.
6+
7+
You can run this code locally and extend it to build your own Agent, as shown in this guide:
68

79
- [Get Started with Python LangGraph agents](../../docs/langgraph-quick-start-py.md)
10+
11+
## What the Agent Does
12+
13+
This agent is a crypto-focused **single-node** chatbot that receives a message, calls an **OpenAI** model, and returns an assistant response.
14+
15+
## How It Works
16+
17+
### Nodes and Graphs
18+
19+
In LangGraph, a **graph** is a map of how your agent thinks and acts. It defines what steps the agent can take and how those steps connect.
20+
21+
Each **node** is one of those steps—for example:
22+
23+
- calling an AI model
24+
- fetching data from an API
25+
- deciding what to do next
26+
27+
When you build a LangGraph agent, you're basically creating a small workflow made of these nodes. The graph handles how messages move between them—so your agent can reason, make calls, and respond in a structured way.
28+
29+
In this example, there is only one node, which calls OpenAI.
30+
31+
### The Agent's Main Logic
32+
33+
The agent logic is defined in [`src/agent/graph.py`](src/agent/graph.py):
34+
35+
- The code imports the `langgraph.graph` and `langgraph.runtime` components for building and running the agent.
36+
- `Context` is a class defining configurable parameters accessible to the runtime.
37+
- `State` is a dataclass defining the agent's working memory (a list of message objects forming the conversation).
38+
- `call_model` is a **node** responsible for interacting with the LLM (`gpt-4o-mini` from OpenAI). It receives the current conversation state and runtime context, sends the latest user message to the model, an updated message list that includes the assistant's response.
39+
- `graph` defines the **graph**. `StateGraph` describes the workflow, with one node (`call_model`) that runs as soon as the graph starts. The `compile()` function finalizes the workflow into an executable runtime graph.
40+
- The agent follows the **A2A protocol**, meaning it can receive and send structured conversational messages to other agents. The `State` and `Context` schemas make it interoperable with other A2A-compatible components
Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
1-
# LangGraph quick start agent in TypeScript
1+
# LangGraph Quick Start Agent in TypeScript
2+
3+
## Overview
24

35
This is an example **LangGraph TypeScript agent** using the **OpenAI LLM** to answer questions about cryptocurrencies.
46

5-
You can run this code locally and expand it to build your own agent, as shown in this guide:
7+
You can run this code locally and extend it to build your own agent, as shown in this guide:
68

79
- [Get Started with TypeScript LangGraph agents](../../docs/langgraph-quick-start.md)
10+
11+
## What the Agent Does
12+
13+
This agent is a crypto-focused **single-node** chatbot that receives a message, calls an **OpenAI** model, and returns an assistant response.
14+
15+
## How It Works
16+
17+
### Nodes and Graphs
18+
19+
In LangGraph, a **graph** is a map of how your agent thinks and acts. It defines what steps the agent can take and how those steps connect.
20+
21+
Each **node** is one of those steps—for example:
22+
23+
- calling an AI model
24+
- fetching data from an API
25+
- deciding what to do next
26+
27+
When you build a LangGraph agent, you're basically creating a small workflow made of these nodes. The graph handles how messages move between them—so your agent can reason, make calls, and respond in a structured way.
28+
29+
In this example, there is only one node, which calls OpenAI.
30+
31+
### The Agent's Main Logic
32+
33+
The agent logic is defined in [`src/agent/graph.ts`](src/agent/graph.ts):
34+
35+
- The code imports key **LangChain** and **LangGraph** components.
36+
- `callModel` is a **node** responsible for interacting with the LLM (`gpt-4o-mini` from OpenAI). It reads the current conversation from the graph state, sends the first user message to the model, and returns an assistant reply, updating the `messages` field of the state. The system prompt limits the agent to crypto-related answers only.
37+
- `StateAnnotation` defines the shared state structure between nodes—typically a schema for messages, actions, and intermediate results.
38+
- `route` is a router node that decides whether to continue querying or end the process—based on the state.
39+
- `StateGraph` connects nodes, defining their execution order and dependencies. This example includes only one node—`callModel`.
40+
- `compile()` is a function compiles the **graph** (`graph`) into a runnable agent processing input messages and updates the state through each step.

agents/portfolio-agent/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ cp .env.example .env
3838

3939
Then edit `.env` with your actual API keys.
4040

41-
## Running the agent
41+
## Running the Agent
4242

43-
### Start the agent
43+
### Start the Agent
4444

4545
```bash
4646
yarn start
4747
```
4848

4949
The agent will analyze your wallet portfolio and provide comprehensive reports based on your request.
5050

51-
### Example usage
51+
### Example Usage
5252

5353
In `src/index.ts`, configure your wallet addresses and questions:
5454

@@ -70,7 +70,7 @@ const questions = [
7070

7171
You can modify the wallet addresses and questions in `src/index.ts`.
7272

73-
## Output structure
73+
## Output Structure
7474

7575
The agent provides structured responses with a 5-step analysis process:
7676

@@ -82,7 +82,7 @@ The agent provides structured responses with a 5-step analysis process:
8282

8383
See [EXAMPLES.md](./EXAMPLES.md) for complete examples of agent output.
8484

85-
### Full data examples
85+
### Full Data Examples
8686

8787
Complete JSON response files are available in the [examples](./examples) directory. Each file contains:
8888

@@ -98,7 +98,7 @@ Complete JSON response files are available in the [examples](./examples) directo
9898

9999
## Development
100100

101-
### Available commands
101+
### Available Commands
102102

103103
```bash
104104
# Build the package
@@ -124,15 +124,15 @@ yarn test
124124

125125
Tests are located in the `tests/` directory and use Vitest.
126126

127-
## Technology stack
127+
## Technology Stack
128128

129129
- **TypeScript** - Type-safe JavaScript
130130
- **LangChain** - AI application framework
131131
- **OpenAI API** - Language models (GPT-4o-mini by default)
132132
- **CoinGecko API** - Cryptocurrency price data
133133
- **Alchemy API** - EVM wallet balance and transaction data
134134

135-
## Important notes
135+
## Important Notes
136136

137137
- The agent analyzes complete portfolio holdings across EVM and Solana wallets
138138
- Supports daily, weekly, and monthly performance tracking

agents/weather-agent/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Weather Agent - Your First LangGraph Agent
1+
# Weather Agent: Your First LangGraph Agent
22

33
A beginner-friendly agent that shows you how to build AI agents using **LangGraph** and **TypeScript**. This agent fetches real-time weather data and provides helpful recommendations.
44

@@ -160,10 +160,10 @@ The agent has two tools:
160160
```
161161
weather-agent/
162162
├── src/
163-
│ └── graph.ts # Main agent code (the whole agent in one file!)
164-
├── .env # Your API keys (you create this)
165-
├── .env.example # Template for .env
166-
├── package.json # Dependencies
163+
│ └── graph.ts # Main agent code (the whole agent in one file!)
164+
├── .env # Your API keys (you create this)
165+
├── .env.example # Template for .env
166+
├── package.json # Dependencies
167167
└── README.md # This file
168168
```
169169

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ To quickly start building with LangGraph, see the following guides:
77
- [Get started with TypeScript LangGraph agents](langgraph-quick-start.md)
88
- [Get started with Python LangGraph agents](langgraph-quick-start-py.md)
99

10+
**Note**: These guides focus on the essentials: how to deploy and test your agent locally. If you'd rather skip setup details and dive straight into building real-world agent logic, check out the [Weather Agent example](../agents/weather-agent).
11+
1012
More content coming soon!

docs/langgraph-quick-start-py.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Get started with Python LangGraph agents
1+
# Get started with Python LangGraph Agents
22

33
## Overview
44

5-
This explains how to quickly get started with creating [LangGraph agents](https://langchain-ai.github.io/langgraph/agents/overview/) with [A2A support](https://docs.langchain.com/langsmith/server-a2a) in **Python**.
5+
This guide explains how to quickly get started with building [LangGraph agents](https://langchain-ai.github.io/langgraph/agents/overview/) with [A2A support](https://docs.langchain.com/langsmith/server-a2a) in **Python**.
66

7-
You'll copy, run, and expand our example agent: [`agents/laggraph-quick-start-py`](../agents/langgraph-quick-start-py).
7+
You'll copy, run, and extend our template: [`agents/laggraph-quick-start-py`](../agents/langgraph-quick-start-py). It's a **single-node** chatbot that answer questions about cryptocurrencies: receives a message, calls an **OpenAI** model, and returns an assistant response.
88

9-
**Note**: This example uses **OpenAI** by default, but you can switch to a different LLM.
9+
**Note**: This guide focuses on the essentials (how to deploy and test your agent locally) rather than on real-world agent logic.
1010

1111
## Prerequisites
1212

@@ -16,7 +16,7 @@ Before you start, complete the following prerequisites:
1616
- [Get a LangSmith API key](https://docs.langchain.com/langsmith/home).
1717
- [Get an OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key).
1818

19-
## Step 1. Set up the example project
19+
## Step 1. Set Up the Example Project
2020

2121
First, set up the example project:
2222

@@ -60,7 +60,7 @@ First, set up the example project:
6060
LANGSMITH_PROJECT=py-agent
6161
LANGSMITH_TRACING=true
6262
```
63-
## Step 2. Run the agent locally
63+
## Step 2. Run the Agent Locally
6464

6565
Now you can run the example agent locally:
6666

@@ -247,7 +247,7 @@ Now you can run the example agent locally:
247247
}
248248
}'
249249
```
250-
If everything is fine, you'll receive a response including your propmt, assistant's reply, and other data:
250+
If everything is fine, you'll receive a response including your prompt, assistant's reply, and other data:
251251

252252
```json
253253
{
@@ -308,11 +308,15 @@ Now you can run the example agent locally:
308308

309309
6. In addition, you can check logs in [LangSmith](https://smith.langchain.com/studio): navigate to **Tracing Project** in the left menu and select your project. The logs will display data on all threads and runs (agent invocations).
310310

311-
## Step 3. Implement custom logic
311+
## Step 3. Implement Custom Logic
312312

313-
After testing the example agent, you can proceed with implementing your custom logic.
313+
The logic of the template agent is explained in its [README](../agents/langgraph-quick-start-py/README.md).
314314

315-
If you prefer a different LLM to OpenAI, adjust the example code accordingly and update the `.env` file and dependencies.
315+
After testing the agent, you can proceed with implementing your custom logic:
316+
- If you prefer a different LLM to OpenAI, adjust the example code accordingly and update the `.env` file and dependencies.
317+
- Add new nodes—for example, a node calling a crypto API or a summarize node using another model.
318+
- Integrate memory to store conversation history or facts across sessions.
319+
- Customize the state: add fields for context like topics, confidence, or source URLs.
316320

317321
To learn more about LangGraph, use the following resources:
318322

@@ -323,7 +327,7 @@ To learn more about LangGraph, use the following resources:
323327
- [LangGraph Platform API Reference](https://langchain-ai.github.io/langgraph/cloud/reference/api/api_ref.html#tag/assistants/post/assistants/search): Explore the endpoints for interacting with agents
324328
- [LangGraph Python SDK](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/python_sdk_ref/): Install the SDK for interacting with the API
325329

326-
## Step 4. Publish and share
330+
## Step 4. Publish and Share
327331

328332
Once your agent is ready, share it with Warden.:
329333

0 commit comments

Comments
 (0)