Skip to content
GitHub

The Ecosystem

Lexigram is a monorepo of small, focused packages. The two foundation packages — lexigram and lexigram-contracts — are all you need to start. Everything else is an extension: install only what your application uses.

Every extension depends only on lexigram and lexigram-contracts, never on another extension. That boundary is what keeps the ecosystem composable — see Architecture.

Terminal window
# Install the foundation plus only the extensions you need
pip install lexigram lexigram-web lexigram-sql lexigram-auth

PackageWhat it does
lexigramAsync-first DI container, Application lifecycle, modules, providers, config, and the Result type.
lexigram-contractsZero-dependency protocols, value types, and exceptions shared across every package.

PackageWhat it does
lexigram-webASGI web layer — controllers, routing, middleware, OpenAPI docs, CORS, CSRF, rate limiting. WebProvider.
lexigram-graphqlGraphQL server (Strawberry) — schema, subscriptions, depth/complexity limits, persisted queries.
lexigram-httpOutbound HTTP client with resilience and observability built in.

PackageWhat it does
lexigram-sqlAsync SQL for Postgres / MySQL / SQLite — repositories, migrations, query building. DatabaseProvider.
lexigram-nosqlDocument-store abstraction (MongoDB, DynamoDB, Firestore).
lexigram-cacheMulti-backend caching — Redis, Memcached, in-memory — behind CacheBackendProtocol.
lexigram-storageUnified blob storage — S3, GCS, Azure Blob, R2, local filesystem.
lexigram-searchFull-text search — Elasticsearch, Meilisearch, Typesense, and SQL backends.
lexigram-vectorVector store backends (pgvector, Qdrant, Pinecone, in-memory) for embeddings.
lexigram-graphGraph database support (Neo4j, in-memory).

PackageWhat it does
lexigram-aiOrchestration layer that discovers and wires the AI subsystems below.
lexigram-ai-llmMulti-provider LLM client (OpenAI, Anthropic, Gemini, Ollama, Groq, Mistral, …) with routing and thinking suppression.
lexigram-ai-ragRetrieval-augmented generation — chunking, retrieval, synthesis, citations.
lexigram-ai-agentsAgents with tools and strategies (ReAct, plan-and-execute).
lexigram-ai-memoryEpisodic, semantic, and working memory for AI systems.
lexigram-ai-skillsSkill/tool registry, executor, and built-in tools.
lexigram-ai-sessionAI conversation sessions — branching, checkpointing, multi-agent.
lexigram-ai-mcpModel Context Protocol server and client for AI agents.
lexigram-ai-workersBackground AI work — batch embedding, document ingestion, maintenance.
lexigram-ai-feedbackCollect, process, and store feedback on AI responses.

PackageWhat it does
lexigram-eventsEvent sourcing and CQRS — domain events, aggregates, command/query buses, projections.
lexigram-queueMessage bus / queue with named multi-backend support (Redis, RabbitMQ, Kafka, SQS, …).
lexigram-notificationEmail, SMS, and push delivery with multi-backend support.
lexigram-webhookWebhook management — subscriptions, delivery tracking, HMAC verification, dead-letter queue.
lexigram-workflowWorkflow orchestration — pipelines, bulk ops, sagas, graph engine.

PackageWhat it does
lexigram-tasksBackground tasks — scheduling, workers, and job queues over memory / Redis / AMQP / Postgres.

PackageWhat it does
lexigram-monitorHealth checks, metrics, tracing, and structured logging (Prometheus / OpenTelemetry).
lexigram-resilienceCircuit breaker, retry, bulkhead, rate limiting, throttle, fallback.
lexigram-auditAppend-only, HMAC-verified, retention-managed audit trail.
lexigram-ai-observabilityTracing, metrics, and health checks specific to AI calls.

PackageWhat it does
lexigram-authAuthentication & authorization — JWT, OAuth2, RBAC, password hashing, web guards.
lexigram-tenancyMulti-tenant resolution, lifecycle, and isolation strategies.
lexigram-featuresFeature-flag management with caching and pluggable providers.

PackageWhat it does
lexigram-clilexigram command — project scaffolding (new), dev server (run/dev), migrations (db), inspection.
lexigram-testingFakes, test clients/beds, fixed clock, and protocol compliance suites for fast, decoupled tests.

A typical web application starts with:

Terminal window
pip install lexigram lexigram-web lexigram-sql lexigram-auth lexigram-cache

Add capabilities as you need them — lexigram-ai-llm for an LLM feature, lexigram-tasks for background jobs, lexigram-events for an event-driven domain. Because every package targets a contract, you can adopt one without rewriting the rest of your app.