Select to view content in your preferred language

ArcGIS Knowledge Resources for Web Developers (including Sample Code)

3980
5
09-20-2023 09:40 PM
AdamMartin
Esri Contributor
0 5 3,980

Update Log:

  • 2026-06-30. Updates for v5.1 and Knowledge Agent (Beta) code sample
  • 2026-06-03: Updated/added new public links to latest Knowledge Developer & Tech sessions and added v5.1 features to matrix
  • 2026-01-30. Added a functionality matrix available by version.

ArcGIS Knowledge comes with powerful suite of capabilities within the Maps SDK for JavaScript that enables your organization to streamline workflows by creating custom experiences leveraging the power of knowledge graphs and graph queries. These experience can also be integrated with your existing enterprise systems.

Code Samples: Maps SDK for JavaScript 

Six publicly available code samples are now available in the ArcGIS Developer site showcasing key ArcGIS Knowledge classes, methods and components within the Maps SDK for JavaScript. These samples also provide live knowledge graph services you can hit with the login credentials provided. So no need to spin up your own servers before seeing it in action.

Check them out and let us know what you think! Better yet, share your own samples! 🙂

These samples cover:  

Note that the 'streaming' query and search methods are key to performance when working with large knowledge graphs and provide optimal user experiences. These samples add depth to the existing Knowledge documentation for the Maps SDK for JavaScript.

Check out the 2025 and 2024 technical session videos linked at the bottom of the page, walking through some of the basics, and start in the documentation for the core concepts here: Introduction to Knowledge Graph.

Feature Highlights

Knowledge AI Agent (beta) [new!]

As part of the beta AI Assistant release in the Maps SDK for JavaScript v5.1, the ArcGIS Knowledge Agent component can be included to a custom app to provide users with the ability, through a natural language chat pane, to query and search a knowledge graph service, as well as add records to a corresponding WebLinkChart or WebMap, change Link Chart layouts, and toggle on/off spatial entities. Here's a Knowledge Agent (beta) code sample to explore. 

Knowledge graph data model editing

Starting with JavaScript 4.33 (Q2 2025), we have added data model editing support for knowledge graph services. You can now add, update and delete entity types and relationship types from your knowledge graph. You can also add, update and delete the properties for those entity and relationship types, as well as the field indexes and the knowledge graph search index.

Web Link Charts

We are excited to announce the release of web link charts in Maps SDK for JavaScript 4.32 out of beta! Web link charts contain a link chart layer with the data from your knowledge graph and are loaded in a link chart view. Web link charts are a new core view (like MapView and SceneView) that are specifically for visually representing and analyzing all or part of a knowledge graph. For those familiar with web maps in the JS SDK, the analogous components for Link Charts are:

  • Map -> WebLinkChart
  • View -> LinkChartView
  • KnowledgeGraphLayer -> LinkChartLayer 

Web Link Charts are built on the same core technology as a Map that allows you to leverage existing tools and patterns, like symbology for each layer, while also adding some additional link chart specific capabilities for refining your link chart visualizations and conducting graph analysis.

  • Layouts: Apply different layouts to provide different visualizations to better understand the patterns in your data. For example, geographic layout arranges spatial entities using their geometry with their connected nonspatial data clustered around them while chronological layout arranges entities and relationships according to time.

  • Expand: Finds and adds all directly connected entities "one-hop" away from the given entities and adds the entities and their connecting relationships to the link chart.

  • Connect: Adds direct relationships between the given entities to the link chart.

  • Add and Remove Records: Update the data in your link chart by adding or removing entities and relationships.

Link charts also have a new web component for easily displaying a link chart from a portal content item with a layout switcher, handling all the rendering with default layout settings.

Video Resources

Knowledge Capability by Version of Maps SDK for JavaScript

Note: The ArcGIS Enterprise version only matters if the JS SDK version you have access to is the one INSTALLED with Enterprise, and user does not have access to the latest Maps SDK for JS downloaded via CDN.

Newer versions of the Maps SDK for JavaScript can generally be used against older ArcGIS Enterprise versions with some constraints defined by those Enterprise versions.

 

JS API Version

ArcGIS Enterprise Version

Features Released

v5.1 (new!)

Enterprise 12.2 (Coming Q4 2026)

  • Replica & Sync
  • Knowledge AI Agent
  • Link Chart: Persist Root Entities in published web Link Charts 

v5.0

Enterprise 12.1

  • Data Model: + Domain Support (Create, Assign to Properties, Delete) - impacts viewing values (instead of codes), feature form widgets, map viewer
  • Web Components:
    • Nonspatial Visibility Toggle
    • Enhancement: Streamlined Link Chart Code

v4.34

 

  • Search: Include Search of Provenance values
  • Knowledge Graph Layers: + Layer editing support in Editor Web Component

v4.33

Enterprise 12.0

  • Knowledge Graph Data Model Edits (CUD)

v4.32

Enterprise 11.5

  • Link Charts, layers, views (from BETA)
    • Layouts (+ Chronological Layouts)
    • + Nonspatial toggle/visibility mode
    • + Expand, Filtered Expand, Add records, Remove, Connect
    • LC Capabilities from 4.31 +
  • Web Components
    • Link Charts
    • Link Chart Layout Switcher

v4.31

n/a

Web Link Charts (BETA with Documentation)

  • Link Chart layers 
  • Link Chart View
  • LC Capabilities
    • Layouts (hierarchical, radial, geo)

v4.30

Enterprise 11.4

  • Maps and Link Charts: Moving Knowledge Graph Layer order

v4.29

Enterprise 11.3

  • Add/Remove Records to Knowledge Graph Layers
  • New Selection capabilities
  • New date‑field types (datetimeoffset, date‑only, time‑only)

V4.28

 

No new features. Documentation released for v4.26 features.

v4.27

Enterprise 11.2

Beta release of Knowledge Studio (no new JS enhancements)

v4.26

[BREAKING CHANGES]

Enterprise 11.1

  • Support for KG Layers via Services hosted in Enterprise 11.1
  • Inclusion‑list capability for KG Layers

v4.25

Enterprise 11.1

  • Apply Edits
  • Encoded Streaming Query & Search enhancements (new params, boundaries, quantization)

v4.24

  • Knowledge Graph Read Support (Streaming, Search, Query, Data Model, Fetch Service, Fetch Data model)
5 Comments
xingchenc
Frequent Contributor

@AdamMartin 

Is it possible to add new entity types or relationship types using JavaScript API?

I learned that it can be done using REST API and Python API but I can't find anything on the JavaScript API documents.

AdamMartin
Esri Contributor

@xingchenc No, editing the Graph data model via JavaScript API is not yet available; only adding/deleting entity or relationship instances or editing properties within the existing model. It's certainly on the radar.

xingchenc
Frequent Contributor

@AdamMartin  Thanks for the clarification.

AdamMartin
Esri Contributor

@xingchenc Editing the Data Model is now available in ArcGIS Maps SDK for JavaScript v4.33!

 

 

AduriSreenivas
Emerging Contributor

Hello Esri Community,

Can a Custom WorkflowAgent Use the Knowledge Agent in ArcGIS Assistant?

I am exploring an urban-planning application using the ArcGIS AI Components in ArcGIS Maps SDK for JavaScript 5.1.

My proposed design includes two specialized agents within the same arcgis-assistant experience:

  • Knowledge Agent — to explore connected entities and relationships in an ArcGIS Knowledge graph using natural-language questions.
  • Custom Planning Agent — built with the agent utilities in @ArcGIS/ai-components to query GIS services, apply planning rules and run structured workflows.

My understanding is that both available ArcGIS agent components and custom agents can be registered with the same Assistant, and that the Assistant orchestrator uses the agent descriptions and user intent to route a request to the appropriate agent.

For example:

  • “Which development projects are connected to parcels along this road corridor?” → Knowledge Agent
  • “Assess this parcel for a proposed land-use conversion.” → Custom Planning Agent

I would appreciate clarification on the following:

  1. Is registering the Knowledge Agent and a custom agent under the same arcgis-assistant the recommended implementation pattern?
  2. Can a custom WorkflowAgent directly invoke the Knowledge Agent as one step in its workflow?
  3. If direct invocation is not supported, should the custom agent use a FunctionTool that queries the Knowledge Graph Service through the ArcGIS Maps SDK knowledge-graph APIs?
  4. Is there a recommended approach for passing results or shared context between the Knowledge Agent and a custom planning agent?
  5. Are there any samples demonstrating this combined architecture?

The Knowledge Agent documentation confirms that it can query and search graph data and generate Cypher queries, but I have not found an example where it is invoked from a custom workflow.

Any guidance on the recommended architecture and current beta limitations would be appreciated.

 

Aduri Sreenivas

MicroCenter Gulf

Contributors