Ask Graphlit - AI Code Assistant

AI code assistant trained on Graphlit - get instant working code examples for any task

Your AI pair programmer for Graphlit - trained on all documentation, samples, and API patterns.

Don't know the right operation name? Not sure about the parameters? Just ask in natural language and get working code.

🚀 Open Ask Graphlit in the Developer Portal →

Prefer the standalone experience? Visit ask.graphlit.dev.


What is Ask Graphlit?

Ask Graphlit is an AI chatbot that understands Graphlit's API and can generate working code in Python, TypeScript, or .NET based on your intent.

Instead of searching through documentation or memorizing operation names, just describe what you want to do.

The Discovery Problem

Traditional API documentation:

  • You need to know operation names ("createWorkflow", "promptConversation")

  • You browse through exhaustive parameter lists

  • You read bottom-up (operations → use cases)

Ask Graphlit:

  • You describe your intent ("extract entities from PDF")

  • You get working code immediately

  • You learn top-down (use case → operations)


When to Use Ask Graphlit

Perfect For

Learning the API:

  • "How do I ingest a PDF?"

  • "Show me code to create a Slack feed"

  • "How do I extract entities from content?"

Finding the Right Operation:

  • "What's the operation to search across multiple sources?"

  • "How do I create a conversation with custom model?"

  • "Show me streaming conversation code"

Getting Code Examples:

  • "Give me Python code to ingest and search a PDF"

  • "Show TypeScript example for knowledge graph extraction"

  • "How do I use tool calling with conversations?"

Troubleshooting:

  • "Why isn't my content finishing processing?"

  • "How do I wait for ingestion to complete?"

  • "What's the right way to handle async operations?"

Not Ideal For


How to Use It

Option 1: Developer Portal Chatbot

Sign in to the Graphlit Developer Portal and open Ask Graphlit from the sidebar. The chatbot lives alongside your projects so you can copy code straight into your app.

Prefer the standalone site? Use ask.graphlit.dev.


Option 2: In Your IDE (MCP)

Integrate Ask Graphlit into Cursor, Windsurf, VS Code (Cline), or Claude Desktop.

Add this endpoint to your MCP configuration:

https://ask.graphlit.dev/mcp

Cursor example:

{
  "mcpServers": {
    "ask-graphlit": {
      "url": "https://ask.graphlit.dev/mcp"
    }
  }
}

Then use it like:

@ask-graphlit How do I ingest a PDF and extract entities?

Full MCP setup guide →


Example Queries

Ingestion

How do I ingest a PDF from a URL?
Show me TypeScript code to create an RSS feed
How do I upload a file and wait for it to finish processing?
Give me Python code to ingest Slack messages

Searching & Retrieval

How do I search across all my content?
Show me semantic search with filters in TypeScript
How do I search within specific collections?
What's the Python code to find content by entity?

Conversations & RAG

How do I create a conversation in TypeScript?
Show me streaming conversation code
Give me the C# version of tool calling with conversations
What's the difference between promptConversation and streamAgent?

Knowledge Graph

How do I extract entities from content?
Show me code to query people and organizations
How do I build a knowledge graph from web search?
What entities can I extract?

Workflows

How do I create a workflow?
Show me workflow with entity extraction
How do I use vision models for PDF extraction?
What workflow stages are available?

Feeds & Connectors

How do I connect to Slack?
Show me code to sync Google Drive
How do I create a podcast RSS feed?
What OAuth connectors are available?

What Ask Graphlit Knows

Ask Graphlit is trained on:

Documentation:

  • All quickstart tutorials

  • Platform concept pages

  • API patterns and best practices

  • MCP integration guides

Code Samples:

  • 60+ Google Colab notebooks

  • Next.js application examples

  • Streamlit UI applications

  • Production patterns (from Zine)

API Coverage:

  • All SDK operations (Python, TypeScript, .NET)

  • GraphQL schema and types

  • Parameter options and configurations

  • Common error patterns and solutions

Real-World Patterns:

  • Multi-tenant architecture

  • Production deployment

  • Error handling

  • Async workflows

  • Tool calling with agents

  • Streaming responses


Tips for Best Results

Specify Your SDK/Language

Ask Graphlit supports all 3 SDKs - just mention your preference:

Instead of:

"How do I ingest content?"

Try:

"Show me TypeScript code to ingest a PDF" "Give me the Python version" "Show this in C#/.NET"

Describe Your Use Case

Instead of:

"How do I use conversations?"

Try:

"I want to chat with my ingested PDFs using GPT-4, show me the code"

Ask for Complete Examples

Instead of:

"What parameters does createWorkflow take?"

Try:

"Give me a complete example of creating a workflow with entity extraction"

Change Languages Mid-Conversation

You can switch SDKs anytime:

  • "Show me this in TypeScript"

  • "Convert that to Python"

  • "Give me the .NET version"

  • "How would this look in C#?"


Learn by Doing:

Understand the Concepts:

Get Help:


Technical Details

How It Works

Ask Graphlit uses:

  • RAG (Retrieval Augmented Generation) - Searches documentation and samples

  • Code generation models - Generates syntactically correct SDK code

  • Schema validation - Ensures generated code matches current API

  • Best practices - Follows production patterns from real applications

Privacy & Security

  • No credentials required - Ask Graphlit doesn't access your data

  • No data stored - Conversations aren't persisted

  • Open source MCP server - Inspect the code on GitHub

For accessing your actual data, use the Graphlit MCP Server with your credentials.


Frequently Asked Questions

Can Ask Graphlit access my Graphlit data?

No - Ask Graphlit only helps you write code. It doesn't have your credentials.

To search your actual data, use the Graphlit MCP Server locally with your credentials.

Does it work offline?

No - Ask Graphlit is a cloud service. However, you can browse the Sample Gallery offline.

Can I use both Ask Graphlit and Graphlit MCP Server?

Yes! Use them together:

  • Ask Graphlit: "How do I code this?"

  • Graphlit MCP Server: "Search my actual data"

Both can be configured in your IDE simultaneously.

Is it free?

Yes - Ask Graphlit is free to use. No account or credentials required.

What if the code doesn't work?

  1. Copy the code and try it

  2. Check the error message

  3. Ask a follow-up question with the error

  4. Join Discord for help

Ask Graphlit generates code based on current documentation, but edge cases may need adjustment.


Example Session

Language flexibility: Examples below use TypeScript (consistent with docs). Ask Graphlit supports Python, TypeScript, and .NET - just specify your preference in your question.

You:

I want to ingest a PDF from Google Drive and extract people and organizations. Show me the code.

Ask Graphlit:

import { Graphlit } from 'graphlit-client';
import {
  EntityTypes,
  FeedTypes,
  ObservableTypes
} from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

async function main() {
  // Step 1: Create workflow with entity extraction
  const workflow = await graphlit.createWorkflow({
    name: 'Extract Entities',
    extraction: {
      jobs: [{
        connector: {
          type: EntityExtractionServiceTypes.ModelText,
          extractedTypes: [
            ObservableTypes.Person,
            ObservableTypes.Organization
          ]
        }
      }]
    }
  });

  // Step 2: Create Google Drive feed
  const feed = await graphlit.createFeed({
    name: 'Google Drive Documents',
    type: FeedTypes.Site,
    site: {
      type: FeedServiceTypes.GoogleDrive,
      // Note: Set up OAuth credentials first
    },
    workflow: { id: workflow.createWorkflow.id }
  });

  console.log('Feed created:', feed.createFeed.id);
}

main();

You:

How do I wait for the feed to finish processing before querying entities?

Ask Graphlit:

async function waitForFeedCompletion(feedId: string) {
  while (true) {
    const feedResult = await graphlit.getFeed(feedId);
    const state = feedResult.feed?.state;
    
    if (state === 'COMPLETED') {
      console.log('Feed processing complete!');
      break;
    } else if (state === 'FAILED') {
      console.log('Feed processing failed');
      break;
    }
    
    await new Promise(resolve => setTimeout(resolve, 10000)); // Wait 10s
  }
}

// Use it
await waitForFeedCompletion(feed.createFeed.id);

// Now query extracted entities
const observables = await graphlit.queryObservables({
  filter: {
    types: [ObservableTypes.Person, ObservableTypes.Organization]
  }
});

const people = observables.observables?.results?.filter(
  obs => obs?.type === ObservableTypes.Person
);
const orgs = observables.observables?.results?.filter(
  obs => obs?.type === ObservableTypes.Organization
);

console.log('People:', people?.map(p => p?.observable.name));
console.log('Organizations:', orgs?.map(o => o?.observable.name));

You:

Show me the Python version of this

Ask Graphlit:

import asyncio
from graphlit import Graphlit
from graphlit_api.input_types import *

graphlit = Graphlit()

async def wait_for_feed_completion(feed_id):
    while True:
        feed_result = await graphlit.client.get_feed(id=feed_id)
        state = feed_result.feed.state
        
        if state == EntityState.COMPLETED:
            print("Feed processing complete!")
            break
        elif state == EntityState.FAILED:
            print("Feed processing failed")
            break
        
        await asyncio.sleep(10)

# Use it
await wait_for_feed_completion(feed.create_feed.id)

# Query entities
observables = await graphlit.client.query_observables(
    filter=ObservableFilter(
        types=[ObservableTypes.PERSON, ObservableTypes.ORGANIZATION]
    )
)

for obs in observables.query_observables.results:
    print(f"{obs.type}: {obs.observable.name}")

Get Started

🚀 Launch Ask Graphlit in the Portal →

Or integrate it into your IDE:


Can't find what you need? Just ask! 🤖

Last updated

Was this helpful?