> For the complete documentation index, see [llms.txt](https://docs.graphlinq.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlinq.io/dev-tooling/blocks/base-variable/keyvalue.md).

# KeyValue

The KeyValue block allows us to store and access key-value pairs of data in our graphs. It is similar to dictionaries or maps in other programming languages, where each value is associated with a unique key. This block is particularly useful when we need to manage and manipulate data in a structured way.

In the example below, we use a KeyValue block to store information about different cryptocurrencies and their corresponding prices:

When the above graph is executed, it stores the key-value pairs for Bitcoin (BTC), Ethereum (ETH), and Cardano (ADA) with their respective prices in a structured manner. Later in the graph, we use a Get Variable block to access and retrieve the price of Ethereum (ETH) from the KeyValue block and pass it as input to another block for further processing.

The KeyValue block provides a convenient way to manage data and organize information in our graphs, making it easier to access and use specific values when needed. Additionally, we can modify, update, or remove key-value pairs at runtime, allowing for dynamic data management within the graph.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.graphlinq.io/dev-tooling/blocks/base-variable/keyvalue.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
