Manta Developers
GitHub
Menu

FAQ

Answers to common questions about embedding the Manta chat in your own app.

Sign-in

Can I embed the chat in an app on its own domain?

Yes. Create a custom app in Manta to get a client ID and secret. Your server signs people in with webLoginRoutes from @manta-eu/auth/web and keeps their tokens, then hands the page a fresh access token that you pass to EmbeddedChatProviders as getAccessToken. The chat then sends a bearer token instead of the Manta session cookie, so it works from any origin. Keep the secret on your server and never ship it to the browser.

Do my users need a Manta account?

Yes. The chat runs as the person who signed in through your custom app, and only members of the organization that owns the app can sign in. Anyone else is refused with invalid_grant. If you’d like your users to sign in with your own identity provider, contact us and we can set up SSO.

Datastores and schemas

Do I need codegen to use the embedded chat?

No. The chat only needs the props shown in the Quick start. Codegen is for typed reads of the graph in your own screens, as described in Schemas and LDKit.

Can one app serve many datastores?

Yes. One app can talk to as many datastores as you need, so you can choose the datastoreId you pass to EmbeddedChatProviders at runtime, for example per customer. The signed-in user’s access decides which datastores they can reach. A user can belong to several datastores, which can be arranged in a hierarchy. Use the datastore ids Manta gives you rather than deriving them from a datastore’s name.

Do datastores share the same schema?

Mostly. The same kinds of data have the same shape across datastores, but computed attributes and custom data can make a datastore differ. Assume the meaning is shared, and that differences add to the schema rather than break it. You can generate types once against a reference datastore and reuse them for the others, and generate against a specific datastore when you need its extra properties.

Can my code handle properties it was not generated for?

Yes. RDF properties are identified by globally unique IRIs, so a property means the same thing in every datastore it appears in, and the JSON-LD the graph returns carries those IRIs. Your code can work with properties it finds at runtime without guessing the schema. See the schema.org data model for background.

Page context

How do I tell the agent what the user is looking at?

Pass the IRIs and types of the entities on screen to the pageContext prop of EmbeddedChat. If your app only has its own record ids, we recommend not mapping them to IRIs. Support for a free-text page summary is planned: your app will describe the page itself, for example in a React context provider that turns the page’s active queries into a short summary sent with each question. EmbeddedChat does not accept that summary yet.