Skip to content
Blog Releases llms.txt
GitHub
0.1 — early on purpose · pin your versions and shape it with us

The AI Friendly Framework

Python backend framework for coding agents. Contracts, protocols, 18 AI packages.

the framework by the numbers

50+ packages, 100+ protocols, 533 error codes — built for scale, typed for agents.


the stack

Every backend starts the same way: you wire up SQL, cache, auth, queues, events. Lexigram gives you a ready-to-use foundation — and agents can reason about every layer.

Contracts

Every package talks through protocols. Agents code to interfaces, not implementations. Swap Redis for in-memory, Postgres for SQLite — same contract, one config line.

Providers

Lifecycle and wiring live in one place. Boot order is explicit. Agents register and resolve through the container, not ad-hoc wiring.

Import linter

Enforces architectural boundaries. Catches violations before they ship. Agents can verify their own imports.

Web

ASGI controllers, routing, middleware, OpenAPI docs, CORS, rate limiting. One module, one call.

SQL

Async Postgres, MySQL, SQLite. Repositories, migrations, query building. Swap backends with a config line.

Auth

JWT, OAuth2, session management. Guards, permissions, multi-tenancy. Protocol-driven, backend-agnostic.


how it feels to write Lexigram

Four steps from contract to running application. No boilerplate, no globals, no magic.

Say what you need, not who provides it. Contracts live in lexigram-contracts so nothing across the rest of the codebase has to know who’s on the other end.

from typing import Protocol
class NotificationServiceProtocol(Protocol):
async def send(self, user_id: str, message: str) -> None:
"""Send a notification to a user."""

Python 3.11+ required, MIT licensedZero runtime dependencies — add only what you need100% async/await — concurrency-safe by designType-hinted end to end — full IDE support, no guessingpytest fixtures included — test with one importDocker ready — containerize in one lineCI/CD workflows included — GitHub Actions out of the box

what’s happening

Recent activity from the project — blog posts, releases, and commits.


built by

Join the contributors shaping the AI-friendly Python framework.


where to next