Overview
The Exulu IMP GraphQL API provides programmatic access to manage agents, contexts, workflows, evaluations, and all other platform resources. The schema is automatically generated based on your ExuluContext and ExuluProvider instances, providing both core types and dynamic types tailored to your implementation.Dynamic schema
Types are generated from your ExuluContext and ExuluProvider definitions
Full CRUD
Create, read, update, and delete operations for all resources
Advanced filtering
Powerful filter operators with AND/OR logic
GraphQL endpoint
Authentication
All API requests must be authenticated using one of three methods:API key authentication
Pass your API key in thex-api-key header:
Session token authentication
For web applications using NextAuth:Internal key authentication
For service-to-service communication:GraphQL Playground
The easiest way to explore and test your GraphQL API is using the built-in GraphQL Playground.Accessing the playground
When running the Exulu frontend:/explorer route in your browser:
The GraphQL Playground is automatically configured with your specific Exulu IMP implementation, including all your custom ExuluContext types and dynamic schema.
Features
The playground provides:- Schema explorer - Browse all available types, queries, and mutations
- Autocomplete - IntelliSense for query building
- Documentation - Inline docs for all fields and operations
- Query history - Access previously executed queries
- Variables editor - Test queries with dynamic variables
- Authentication - Automatically uses your session token
Example usage
- Start your Exulu IMP backend
- Run
npx @exulu/frontendin your project folder - Open
http://localhost:3000/explorer - Use the schema explorer to discover available types
- Build and execute queries using autocomplete
- Testing queries during development
- Exploring your dynamically-generated schema
- Debugging filter and mutation operations
- Learning the API structure
Schema structure
The Exulu IMP GraphQL schema consists of:Core types
Predefined types for platform resources:- agents - AI agent configurations
- users - User accounts and authentication
- roles - Role-based access control
- agent_sessions - Conversation sessions
- agent_messages - Chat messages
- test_cases - Evaluation test cases
- eval_sets - Evaluation test sets
- eval_runs - Evaluation executions
- workflow_templates - Workflow definitions
- statistics - Usage analytics
- variables - Encrypted configuration values
- projects - Project organization
- prompt_library - Saved prompts
- prompt_favorites - Favorited prompts
Dynamic types
Types automatically generated from your ExuluContext instances. Each context creates:- items table - Main resource storage (e.g.,
documentation,support_tickets) - chunks table - Vector embeddings for semantic search (if embedder is configured)
id: "documentation" generates:
documentationtypedocumentationInputtypeFilterDocumentationinput typedocumentationVectorSearchquery- CRUD mutations:
documentationCreateOne,documentationUpdateOne, etc.
Making requests
Basic query
With filters
Creating a resource
Updating a resource
Filter operators
Exulu IMP supports powerful filtering with type-specific operators:String operators
String operators
eq- Equalsne- Not equalsin- In arraycontains- Case-insensitive substring matchand- Combine conditions with AND logicor- Combine conditions with OR logic
Number operators
Number operators
eq- Equalsne- Not equalsin- In arraylte- Less than or equalgte- Greater than or equaland- Combine conditionsor- Combine conditions
Date operators
Date operators
lte- On or before dategte- On or after dateand- Combine conditionsor- Combine conditions
Boolean operators
Boolean operators
eq- Equalsne- Not equalsin- In arrayand- Combine conditionsor- Combine conditions
JSON operators
JSON operators
eq- Equalsne- Not equalsin- In arraycontains- Contains (PostgreSQL@>operator)
Pagination
All*Pagination queries return paginated results:
Sorting
Sort results by any field:Vector search
For contexts with embedders, perform semantic search:cosineDistance- Vector similarity (requires embedder)hybridSearch- Combines vector and full-text searchtsvector- PostgreSQL full-text search
Role-based access control (RBAC)
Resources with RBAC enabled include access control information:Workflows
Execute workflows with variables:Evaluations
Run evaluation sets on agents:Background jobs
Query job status from BullMQ queues:Statistics
Aggregate statistics with grouping:Error handling
Errors are returned in the standard GraphQL format:Record not found- Resource doesnโt exist or no accessInsufficient permissions- RBAC access deniedAccess control error- User lacks role permissionInvalid token- Authentication failedYou are not authorized- Operation requires super_admin
Schema introspection
Explore the schema using introspection:GraphQL clients
In addition to the built-in GraphQL Playground available at/explorer, you can use any GraphQL client:
- GraphQL Playground - Standalone desktop app
- Apollo Studio - Cloud-based GraphQL IDE
- Insomnia - REST and GraphQL client
- Postman - Supports GraphQL requests
Rate limiting
API rate limits are enforced per API key. If you exceed the limit, youโll receive:Best practices
Use pagination - Always paginate large result sets to avoid timeout and memory issues
Batch mutations - When creating multiple resources, use array inputs instead of separate mutations when possible
Next steps
Core types
Explore predefined platform types
Dynamic types
Learn about context-generated types
Queries
Reference for all query operations
Mutations
Reference for all mutation operations