Access Your Environment
The C3 AI Console is a JavaScript shell interface built into the C3 Agentic AI Platform. Use it to interact with your environment or application directly. It supports:
- Querying, filtering, and updating application data
- Testing expressions
- Browsing documentation, guides, and Type references
See the full list of C3 AI Console functions.
Access the C3 AI Console
You can open the C3 AI Console from C3 AI Studio or directly in a browser. The console operates at two levels:
- Environment console: scoped to the environment. Use it to run configuration commands that apply across all applications in the environment.
- Application console: scoped to a specific application. Use it to query and manage application data.
Access from C3 AI Studio
To open the console from C3 AI Studio:
- In C3 AI Studio, navigate to your environment or application.
- Select Console in the navigation panel.
Access from a browser
Navigate to the following URL for your environment or application:
- Environment console:
https://<cluster_domain>/<env_name>/c3/console/index.html - Application console:
https://<cluster_domain>/<env_name>/<application>/console/index.html
Replace <cluster_domain> with your C3 AI cluster address, <env_name> with your environment name, and <application> with your application name. If you do not know your cluster address, ask your C3 AI administrator.
In the following examples, assume you have deployed a package that includes the SmartBulb Type, which tracks data about a smart bulb such as its wattage and lumens.
Access documentation
From the C3 AI Console, you can browse the full documentation site (including guides and reference topics) and look up documentation for any Type.
Open the documentation site
To open the documentation site from within the Console UI, select Link > Documentation in the toolbar.
You can also open it programmatically:
// Open the documentation site
c3Doc()
// Search the documentation site for a specific term
c3Doc("seed data")Look up a Type
To open reference documentation for a specific Type:
// Open reference documentation for the SmartBulb Type
c3ShowType(SmartBulb)Query and explore data
You can query and preview data from the C3 AI Console:
// Fetch smart bulbs with 10 watts or less, and display them in a table
c3Grid(SmartBulb.fetch({filter: "wattage <= 10"}))
// Fetch smart bulb with ID 'SMBLB1', and display the result in a tree format
c3Tree(SmartBulb.fetch({filter: "id == 'SMBLB1'"}))Create and update data
All Type methods are accessible from the C3 AI Console using JavaScript, so you can also create and update application data:
// Create instance without persisting it
var bulb1 = SmartBulb.make({ id: "SMBLB1", bulbType: "LED", manufacturer: "Philips" });
// Create and persist new smart bulb
var bulb1 = SmartBulb.make({ id: "SMBLB1", bulbType: "LED", manufacturer: "Philips" }).create();
// Update a field
SmartBulb.make({ id: "SMBLB1", manufacturer: {id: "Philips"} }).merge({include : "manufacturer" });