How trypromptly/llmstack works
Purpose and entry points
LLMStack is a self-hostable, multi-tenant no-code platform for composing and publishing LLM agents, workflows, chatbots, and data-backed applications. The Python/Django backend starts through manage.py or the installed CLI at llmstack/cli.py; ASGI/WSGI server entry points are llmstack/server/asgi.py and llmstack/server/wsgi.py. The React client begins at llmstack/client/src/index.js; its production assets are served via the Django deployment.
Platform boundary and delivery
Django centralizes settings, URL routing, request adapters, WebSocket consumers, and rate limiting in llmstack/server/settings.py, llmstack/server/urls.py, and llmstack/server/consumers.py. REST-oriented domain apps expose APIs through their apis.py/urls.py layers. The browser client is a separate Node/React build (llmstack/client/package.json, llmstack/client/src/App.js) with Nginx/Docker packaging in docker/app/Dockerfile and docker/app/nginx.conf.
App definitions, publishing, and invocation
The apps domain persists app definitions, versioned data/assets, sessions, access controls, and integration settings in llmstack/apps/models.py. It accepts API/UI configuration and YAML imports through llmstack/apps/apis.py and llmstack/apps/yaml_loader.py. App types define externally facing interaction modes—agent, chat, web, workflow, Slack, Discord, Twilio, and voice—in llmstack/apps/types/app_type_interface.py, llmstack/apps/types/agent.py, and llmstack/apps/types/workflow.py. Store publishing/template distribution is a distinct boundary in llmstack/app_store/models.py and llmstack/app_store/generator.py.
Execution engine and streaming
An app run is coordinated as an actor-style pipeline: llmstack/apps/runner/app_runner.py initiates execution, llmstack/apps/runner/app_coordinator.py manages the run, and input/agent/output actors process stages in llmstack/apps/runner/input_actor.py, llmstack/apps/runner/agent_actor.py, and llmstack/apps/runner/output_actor.py. The play subsystem provides messages and output streaming (llmstack/play/messages.py, llmstack/play/output_stream.py). Run history and provider usage are persisted by processor models (llmstack/processors/models.py).
Processor/provider integration boundary
Composable processors isolate external API contracts behind provider implementations and a common interface: llmstack/processors/providers/api_processor_interface.py, llmstack/processors/providers/config.py, and llmstack/common/blocks/base/processor.py. Implementations cover LLMs and multimodal APIs (for example OpenAI, Anthropic, Google), communication channels (Slack, Discord, Twilio), web/API tooling, and vector stores. Representative paths are llmstack/processors/providers/openai/chat_completions.py, llmstack/processors/providers/anthropic/messages.py, and llmstack/processors/providers/promptly/web_browser.py.
Data ingestion and retrieval
The data domain persists datasources and entries, then runs source → transformation → destination pipelines via llmstack/data/models.py, llmstack/data/pipeline.py, and llmstack/data/tasks.py. Sources span uploaded files, websites, Google Drive, databases, and text (llmstack/data/sources/files/pdf.py, llmstack/data/sources/website/url.py, llmstack/data/sources/google/gdrive_file.py). Transformations split/extract/embed content; destinations include relational stores and Chroma, Pinecone, Qdrant, and Weaviate vector stores (llmstack/data/transformations/llamindex/embeddings_generator.py, llmstack/data/destinations/vector_stores/vector_store.py).
Tenancy, credentials, and asynchronous infrastructure
Organizations and user-scoped/provider configuration form the tenancy and credential boundary in llmstack/organizations/models.py, llmstack/base/models.py, and llmstack/connections/models.py; connection handlers support API key, basic, bearer, OAuth2, and web login flows. Jobs/schedules are persisted and dispatched through llmstack/jobs/models.py, llmstack/jobs/jobs.py, and llmstack/jobs/adhoc.py, with a required background Docker runner packaged in runner/Dockerfile. Docker Compose definitions are llmstack/docker-compose.yml and docker/docker-compose.dev.yml.
Main entry points: models.py App definitions · app_coordinator.py Actor pipeline · apis.py App API & import · settings.py Django server
Components 18
Client & Delivery
- React client
llmstack/client/src/App.js
Platform Core
- Django server · Central settings, HTTP routing, WebSockets, and rate limiting.
llmstack/server/settings.py - App API & import · Accepts UI/API configuration and YAML app definitions.
llmstack/apps/apis.py - App definitions · Apps, assets, sessions, access controls, and integration settings.
llmstack/apps/models.py - Interaction types · Agent, chat, web, workflow, and channel-facing modes.
llmstack/apps/types/app_type_interface.py - App store · Publishes and distributes templates.
llmstack/app_store/generator.py
App Execution
- App runner
llmstack/apps/runner/app_runner.py - Actor pipeline · Coordinates input, agent, and output actor stages.
llmstack/apps/runner/app_coordinator.py - Play streaming · Carries run messages and streamed output.
llmstack/play/output_stream.py - Run history & usage
llmstack/processors/models.py
Data & Integrations
- Processor contracts · Common interface and provider configuration boundary.
llmstack/processors/providers/api_processor_interface.py - Provider implementations · LLM, multimodal, channel, web/API, and vector-store providers.
llmstack/processors/providers/openai/chat_completions.py - Datasources & entries
llmstack/data/models.py - Ingestion pipeline · Runs ingestion, extraction, chunking, and embedding stages.
llmstack/data/pipeline.py - Vector destinations · Relational and vector-store destinations.
llmstack/data/destinations/vector_stores/vector_store.py
Tenant & Background
- Tenancy & credentials · Organization-scoped users and provider authentication connections.
llmstack/connections/models.py - Jobs & schedules · Persists and dispatches scheduled and ad hoc work.
llmstack/jobs/jobs.py - Background runner · Required container runtime for asynchronous jobs.
runner/Dockerfile
Connections 19
- React client → Django server: HTTP / WebSocket
- Django server → App API & import: routes requests
- App API & import → App definitions: creates and updates
- App definitions → Interaction types: selects interaction mode
- App definitions → App store: publishes templates
- App API & import → App runner: invokes app
- App runner → Actor pipeline: starts run
- Actor pipeline → Play streaming: streams output
- Play streaming → Django server: WebSocket delivery
- Actor pipeline → Processor contracts: executes processors
- Processor contracts → Provider implementations: dispatches provider calls
- Actor pipeline → Run history & usage: records runs and usage
- Tenancy & credentials → Processor contracts: supplies provider credentials
- Datasources & entries → Ingestion pipeline: drives ingestion
- Ingestion pipeline → Vector destinations: writes embeddings
- App definitions → Datasources & entries: configures data-backed apps
- Jobs & schedules → Background runner: dispatches work
- Background runner → Ingestion pipeline: runs async ingestion
- Tenancy & credentials → App definitions: scopes access