InstaGraph: a Flask app where one GPT-3.5 function call schema makes the graph
Converts text input or URL into knowledge graph and displays
At a glance
- What is it?
- Yohei Nakajima's InstaGraph turns pasted text or a URL into a color-coded knowledge graph. The extraction logic sits in the function call parameters in main.py, the OpenAI client is pinned to 0.28.0, and Neo4j or FalkorDB storage is optional.
- Who is it for?
- InstaGraph suits a Python developer who wants to read a small, working example of GPT-3.5 function calling that returns graph data, and who is happy with a pinned openai==0.28.0 environment. It does not suit anyone who needs combined graphs, node level expansion or user accounts, since the roadmap lists those as undone or declined.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 51 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- yoheinakajima/instagraph3,558 ★ · +0
| Repository | 2026-11-03 | 2026-11-24 |
|---|---|---|
| yoheinakajima/instagraph | 3.6k | 3.6k |
0 Stars in the last 21 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Half of main.py is the function call schema that defines the graph
InstaGraph is a Flask application that converts text or a URL into a knowledge graph and draws it with color-coded nodes and edges. The author's own pointer for anyone curious about the mechanism is direct: the function call parameters taking up half of main.py are how the knowledge graph is generated. The rest of the application is plumbing around that block.
That shape has a consequence for readers. The graph is whatever the model's function call returns, so the quality and structure of every graph depends on the schema definition and on GPT-3.5 following it. There is no separate extraction library or rule set in the project description. Changing what counts as a node, or how an edge is labeled, means editing that parameter block and nothing else.
The repository also holds models.py, a drivers folder for storage backends, and a templates folder for the web page. Together with main.py these are the places to look first.
The README lists four features: dynamic text to graph conversion, color-coded graph nodes and edges, a responsive design that works on any device, and a claim of user-friendliness. Only the first two describe behavior. Example flowcharts produced by the tool are linked from a post on the author's Twitter account, which is the only sample output the project points to.
The OpenAI client is pinned to 0.28.0 and the model is GPT-3.5
The README states that the application is powered by OpenAI's GPT-3.5. The dependency pins agree. requirements.txt fixes openai==0.28.0 and instructor==0.2.8, along with Flask==2.3.3, graphviz==0.20.1 and beautifulsoup4==4.12.2. The pyproject.toml, which still carries the name python-template and a placeholder author, asks for slightly looser ranges: openai ^0.28.0, instructor ^0.2.6, flask ^2.3.3, and Python >=3.10.0,<3.11.
Two things follow. First, a fresh environment on a Python version outside 3.10 conflicts with the pyproject range, so a newer interpreter needs the requirements.txt route and a check that everything resolves. Second, the exact pin on openai means this project does not move to a newer OpenAI client without a code change by whoever forks it. The install route in the README uses requirements.txt, so that is the file that governs a normal setup.
Three endpoints return data, and only one takes a body
Besides the web page, the app exposes three API endpoints. /get_response_data takes a POST with the JSON body {"user_input": "Your text here"} and returns the GPT-3.5 processed data. /get_graph_data is also a POST and returns graph data. /get_graph_history is a GET and returns graph data too.
The documentation gives no parameter description for /get_graph_data, so its request body has to be found in main.py. Authentication is not mentioned for any of the three. They run on the same Flask server as the page, on port 8080 by default per the localhost address in the usage steps, and a --port argument changes it.
The web interface itself is three steps: open the browser at http://localhost:8080, type text or paste a URL into the input box, and click Submit. The response time is the response time of the OpenAI call, since the graph comes from it. A long article pasted as input is a longer prompt to GPT-3.5, and the README documents no limit on input size or any fallback if the call fails.
The history endpoint pairs with the stored graphs: /get_graph_history is the only GET route, and the roadmap still lists show history as an open item, so the endpoint exists ahead of a finished history view in the interface.
Neo4j and FalkorDB are optional, chosen with --graph and three or one environment variables
Graph storage is not required. When you want it, the --graph flag selects the driver, either neo4j or falkordb. For Neo4j, add a username, password and URI to the .env file, created from an instance on Neo4j Aura:
NEO4J_USERNAME=
NEO4J_PASSWORD=
NEO4J_URI=FalkorDB needs only one value, its URL, from an instance on the FalkorDB free tier:
FALKORDB_URL=The shipped .env.example lists all of these plus OPENAI_API_KEY and a variable called USER_PLAN. USER_PLAN is not explained anywhere in the README, so what it changes has to be read from the code. The requirements pin neo4j==5.12.0 and FalkorDB==1.0.1 for the two drivers. The roadmap credits tomasonjo with storing the knowledge graph and pulling it from storage on 9/13/23, which is the work behind these drivers.
Setup is five commands, and --debug binds to 127.0.0.1 only
After cloning and entering the directory, install the packages:
pip install -r requirements.txtRename the example environment file, then add the key:
mv .env.example .envOPENAI_API_KEY=your-api-key-hereStart the server:
python main.py [--graph neo4j|falkordb] [--port port] [--debug]The --debug flag enables the Werkzeug debugger and binds to 127.0.0.1 only. The README gives the reason: the debugger allows arbitrary code execution, so it is never exposed on other interfaces. A developer who wants to demo the app from another machine on the network cannot do it in debug mode, and should leave the flag off.
The OpenAI key is the one required setting. Without it the app has nothing to call, and every graph request depends on that call. The README adds a note that the .env.example file must be renamed to .env, and that the key goes in as OPENAI_API_KEY with your own value in place of the your-api-key-here placeholder. The Replit configuration file replit.nix in the repository suggests another place the author ran it, though the README never describes that route.
Dev mode runs docker-compose-dev.yml, and production runs gunicorn 21.2.0
The container route starts in the docker directory after cloning:
cd instagraph/dockerDev mode uses a dev compose file:
docker-compose -f docker-compose-dev.yml up # Add -d flag at the end to run in background/daemon mode.Production builds an image and runs the application with gunicorn==21.2.0:
docker-compose -f docker-compose.yml up --build -dThe split matters because the Flask development server and the Werkzeug debugger are not what you want in front of other users. The production path swaps in gunicorn, and requirements.txt pins that exact version. The README gives no resource sizing, no environment variable list for the container beyond what .env.example holds, and no instructions for putting the container behind TLS. Whoever deploys it supplies those pieces.
The roadmap lists history, graph merging and node expansion as still undone
The contribution section is a to-do list. Struck through as done: store the knowledge graph, pull it from storage, and expand on a graph, all thanks to tomasonjo on 9/13/23. Still open: show history, combine two graphs, combine two or more graphs from history, expand a graph from specific nodes, and fuzzy matching of nodes for combining graphs using a vector match with LLM confirmation.
The author states the constraints plainly. He usually codes only on weekends or at night, in small chunks, is not sure he can manage GitHub well given his time, and asks anyone who wants to help to reach out about running the repository. He also says there are many build-a-chart tools, so instead of user accounts and custom charts he would rather work on building the largest knowledge graph ever.
There are no GitHub releases. The last push was on 2026-10-04, and the repository is not archived. A Makefile defines lint and format targets with black, isort, flake8 and mypy, and a CONTRIBUTION.MD file sits at the top level. For non-coders the README points to a waitlist at instagraph.ai.
Editorial conclusion
InstaGraph suits a Python developer who wants to read a small, working example of GPT-3.5 function calling that returns graph data, and who is happy with a pinned openai==0.28.0 environment. It does not suit anyone who needs combined graphs, node level expansion or user accounts, since the roadmap lists those as undone or declined. Before running it, read the function call parameters in main.py, because they define what a node and an edge are.
Frequently asked questions
What does InstaGraph do with a URL or pasted text?
InstaGraph sends the input to OpenAI's GPT-3.5 and renders the result as a color-coded knowledge graph in a Flask web page. The same data is available through the /get_response_data endpoint.
Does InstaGraph need Neo4j or FalkorDB?
No. Both are optional and chosen with the --graph flag. Only OPENAI_API_KEY is needed for a basic run, and the web interface is served at http://localhost:8080.
How do I run InstaGraph in production?
Change into the docker directory and run docker-compose -f docker-compose.yml up --build -d. That path runs the application with gunicorn==21.2.0.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/yoheinakajima-instagraph)Star history chart for your README
[](https://hysenlabs.com/projects/yoheinakajima-instagraph)Was this useful?