liveBook · Manning

Environment variable

As explained in Grokking AI Applications

An environment variable is a named configuration value supplied to a running process through its execution environment.

An environment variable is a named configuration value supplied to a running process. It lets the same application use different credentials, names, or settings without changing its flow or code. section 8.1 section 8.3

Use environment variables through a short configuration workflow:

  • Create or obtain the value, such as a LangSmith API key or a project name. section 8.3
  • Add the variable where the process runs: Hugging Face Space settings for deployment, or a local .env file. section 8.3
  • Restart when required and preserve exported flows, because changing variables can restart a free Space and remove its current flows. section 8.3

Connecting Langflow to LangSmith

Configure LANGCHAIN_API_KEY with the generated API key and LANGCHAIN_PROJECT with a project name. Langflow then uses these values to connect with LangSmith for observability. section 8.3

Figure 8.21 Setting environment variables in a Hugging Face Space

View the configuration screen used to set environment variables in a Hugging Face Space. section 8.1 section 8.3

How Grokking AI Applications covers it

How deep it goes
Explains deployment and local configuration, examples, and restart consequences without detailing process-level environment internals.
Examples
Uses Langflow administrator credentials, a secret key, and LangSmith connection variables as configuration examples.
What it assumes
Assumes access to a Langflow installation or Hugging Face Space and credentials such as a LangSmith API key.
What you can do after
Operate/configure Langflow by setting deployment or local variables and connecting it to LangSmith.
How it connects
Connects configuration with secrets, API keys, .env files, Langflow, LangSmith, and Hugging Face Spaces.

Also explained in

Compare how 19 books explain environment variable →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Applications. The section links point to the parts of the book it draws on.