About GraphN
What the platform is, what teams build with it, and how GraphN relates to Lightning AI.
What is GraphN?
GraphN is Lightning AI's platform for building, deploying, and operating production AI agents and multi-agent workflows. Teams compose models, tools, knowledge, and application logic as executable workflows, then run them through the web app, API, or CLI.
What can I build with GraphN?
GraphN supports workflows for document analysis, retrieval-augmented generation, research, content review, customer support, software engineering, data processing, and media generation. Public blueprints provide deployable starting points that teams can adapt to their own data, tools, prompts, and output requirements.
Who is GraphN for?
GraphN is for teams that need to move an AI workflow from an idea to a repeatable production integration. Developers can work through the API, CLI, YAML DSL, and Python function SDK, while other builders can compose and test the same resources in the visual web editor.
What is the difference between a workflow and an agent in GraphN?
A GraphN workflow defines inputs, execution steps, data flow, and outputs. An agent is an LLM-powered actor inside that workflow: it follows instructions, runs on a selected model, and can use functions, MCP tools, knowledge bases, storage, and secrets.
Is GraphN by Lightning AI related to Polygonflow's GraphN?
GraphN is Lightning AI's platform for building and running production AI agent workflows. It is not affiliated with that earlier 3D visual-programming product.
Workflows and agents
How GraphN workflows are composed, tested, published, versioned, and executed.
What is a GraphN workflow?
A GraphN workflow is an executable graph with defined inputs, ordered or branching steps, and an output. A workflow can orchestrate agents, Python functions, MCP tools, connectors, conditionals, loops, parallel analysis, handoff routing, and judge loops.
What is a GraphN agent?
A GraphN agent is a reusable, LLM-powered resource with instructions and a selected model. It can produce text or structured output, call approved tools, retrieve workspace knowledge, and hand work to other steps according to the workflow around it.
What is a GraphN blueprint?
A GraphN blueprint is a pre-built workflow package for a specific use case. It can include the workflow graph plus agents, functions, MCP servers, input examples, and output contracts, so teams can deploy a working baseline and then customize it instead of starting from an empty canvas.
Can I build GraphN workflows visually or as code?
Yes. The web editor provides a canvas and resource configuration panels, while the YAML tab exposes the same workflow DSL for code-based editing. The CLI can validate and update DSL files, so visual and repository-based workflows use the same underlying definition.
Can I test a GraphN workflow before publishing it?
Yes. The editor and API support test runs, and a dry-run can execute inline DSL and resource definitions without persisting them. This lets teams validate inputs, prompts, tools, branching, and outputs before creating a production version.
What happens when I publish a GraphN workflow?
Publishing creates a versioned workflow with its DSL and resource snapshots. Production runs use the published state instead of an unfinished draft, and the workflow can then be invoked from its API endpoint or through the GraphN CLI.
Does GraphN support workflow versions and restoration?
Yes. GraphN records published workflow versions, including the DSL and resource snapshots when available. Teams can inspect prior versions and restore a workflow, with the option to restore linked resource specifications as well.
Models and inference
Built-in models, imported endpoints, custom model weights, multimodal inputs, and model testing.
Can different agents use different models?
Yes. Every GraphN agent selects one model at a time, and agents in the same workflow can use different models. This lets a workflow use a coding model for software tasks, a vision model for media inputs, or a general model for routing and synthesis.
What model types does GraphN support?
The agent model picker supports chat and vision models available to the workspace. GraphN also registers specialized text-to-speech, embedding, and reranking models for voice and retrieval features, although those specialized models are not selected as an agent's primary language model.
Can I bring my own model to GraphN?
Yes. GraphN can register an OpenAI-compatible chat endpoint such as vLLM, Ollama in compatibility mode, OpenAI, Gemini through its compatible API, or OpenRouter. GraphN also supports custom model imports from Hugging Face or S3, including supported LoRA adapter deployments.
Can I test an imported model before using it in an agent?
Yes. The imported-model page can stream a test response so you can verify the endpoint, credentials, and model identifier. The API also provides connection testing and model discovery against OpenAI-compatible endpoints.
Does GraphN support multimodal AI workflows?
Yes. Vision-capable agents can work with text, images, and supported video input, while multimodal knowledge bases can index text and images together. Workflows can combine those model calls with storage, conversion, media functions, and structured outputs.
API, CLI, and execution
How published workflows are invoked, authenticated, monitored, and developed from external tools.
How do I invoke a published GraphN workflow?
A published GraphN workflow can be run from the web app, the GraphN CLI, or its workspace-scoped HTTP endpoint. The workflow's API tab provides the exact URL and a request example with the required input wrapper.
Does GraphN support synchronous and asynchronous runs?
Yes. Synchronous runs return the workflow result in the request path, while asynchronous runs return an execution identifier that can be polled or watched. Async mode is the better fit for workflows that may exceed a normal client timeout.
How is the GraphN API authenticated?
GraphN API requests use a Bearer token. Workspace API keys use the `gn_` prefix, are scoped to one workspace, and are the normal choice for automation; the workspace in the request URL must match the workspace authorized by the key.
What information does a GraphN execution return?
A workflow execution can return its identifier, status, output or error, and an execution trace. Depending on the run, the trace can include spans, timing, token usage, resource references, and per-node results for inspecting how the graph completed.
What can I do with the GraphN CLI?
The GraphN CLI can authenticate, inspect workspace resources, deploy blueprints, validate and update workflow DSL, dry-run drafts, publish resources, start production runs, poll executions, and display logs. It also includes local documentation topics for workflow building and debugging.
Which coding agents can I use GraphN with?
`graphn init` can add GraphN guidance to a repository for Cursor, Claude Code, Codex, and AGENTS.md. The AGENTS.md target covers every tool that reads that convention, including Zed, OpenCode, Amp, Roo Code, and GitHub Copilot. Gemini CLI reads GEMINI.md by default, so it only picks up AGENTS.md if you add it to `context.fileName` in `.gemini/settings.json`. `graphn mcp-serve` additionally exposes CLI operations as MCP tools, so a coding agent can inspect, validate, test, and update GraphN resources through structured commands.
Security and getting started
Workspace boundaries, credentials, API-key handling, CLI telemetry, and the first workflow.
How does GraphN scope resources and API access?
GraphN organizes workflows, agents, functions, models, knowledge bases, storage, secrets, and API keys by workspace. Workspace API keys authorize one workspace, and a request for a different workspace is rejected rather than exposing that workspace's resources.
How should workflows store credentials?
Credentials should be stored as GraphN secrets and referenced by agents, MCP servers, imported models, or other integrations. Secret APIs return metadata and a preview rather than the complete stored value, keeping credentials out of workflow instructions and normal resource responses.
How should I handle a GraphN workspace API key?
Treat a GraphN workspace API key like a password. The full key is shown when it is created, so save it in a secure secret manager, never commit it to source control, and delete the key from workspace settings when it should no longer have access.
Can I disable GraphN CLI telemetry?
Yes. The GraphN CLI collects diagnostic telemetry by default, redacts API keys and bearer tokens, and supports permanent or per-session opt-out. Use `graphn telemetry disable` for a persistent opt-out or set `GRAPHN_TELEMETRY_DISABLED=1` for one session.
How do I get started with GraphN?
The getting-started guide takes you from sign-in to a published Support Router workflow in about ten minutes. The blueprint uses bundled mock store data, so the first run does not require an account or API key for a third-party service.
How do I contact the GraphN team?
Join the GraphN Discord at graphn.ai/discord to talk to the team directly: questions, bug reports, and workflow design help all land there. For sales conversations, the Request demo form on the landing page reaches us too.