Documentation

Learn how to build Langchain agents visually with AgentFlow Studio

Getting Started

AgentFlow Studio allows you to build Langchain agents through a visual interface. Follow these steps to create your first agent:

1. Create a New Project

Click the "New Project" button on the homepage to start with a clean canvas.

2. Add Components

Drag components from the toolbox onto the canvas. Available components include:

  • React Agent: The core reasoning engine
  • Tools: Custom functions your agent can use
  • Prompt Templates: Define how your agent communicates
  • Memory: Manage conversation history and state

3. Configure Properties

Double-click any component to open its properties panel and configure its behavior.

Component Overview

React Agent

The core reasoning component that processes inputs and decides which tools to use.

Tools

Custom functions that extend your agent's capabilities with external APIs or calculations.

Prompt Templates

Define the conversation structure and system prompts for your agent.

Memory

Manage conversation history and maintain state across interactions.

Exporting Your Agent

Once you've built your agent, you can export it as ready-to-use Python code:

  1. Click the "Export Python" button
  2. Review the generated code in the modal
  3. Copy to clipboard or download as a .py file
  4. Use the code in your existing Langchain projects
# Example exported code structure
from langchain.agents import create_react_agent
from langgraph.graph import StateGraph

# Your custom components
agent = create_react_agent(model="gpt-4")
# ... more components

# Build and compile the graph
graph_builder = StateGraph()
# ... graph construction
final_agent = graph_builder.compile()