Imbi Common Library¶
imbi-common is the shared library of the Imbi platform. It holds the
data access clients, the authentication code, the domain models, the
plugin contracts and the runtime helpers that every Imbi service uses.
It lives in the monorepo at libraries/common and is published to PyPI
as imbi-common.
Consumers¶
Every service and every first-party plugin depends on imbi-common:
| Package | What it is |
|---|---|
imbi-api |
The API service |
imbi-assistant |
The AI assistant service |
imbi-gateway |
The webhook receiver |
imbi-harness |
The agent runner and executor |
imbi-mcp |
The MCP server |
imbi-scheduler |
The scheduled task service |
imbi-slackbot |
The Slack bot |
imbi-workflows |
The workflow engine |
imbi-plugin-* |
The first-party plugins (aws, github, google, logzio, oidc, pagerduty, sonarqube) |
For what each service does, see Services.
Key Features¶
| Area | What the library gives you | Page |
|---|---|---|
| Graph | Apache AGE client with Cypher generation, vector search and embeddings | Graph |
| Analytics | ClickHouse query client and the shared table schema | ClickHouse |
| Streaming | Apache Iggy publisher; the sink writes the rows to ClickHouse | Iggy |
| Cache | Valkey client | Valkey |
| Authentication | JWT tokens, encryption, password hashing | Authentication |
| Authorization | Request authentication and permission checks | Permissions |
| Models | Pydantic domain models and the blueprint system | Models, Blueprints |
| Plugins | The plugin manifest, the capability contracts and the registry | Authoring Plugins |
| Prompts | Prompt CMS references, sandboxed rendering and render workers | Prompts |
| LLM | Anthropic JSON completions, provider drivers, model discovery | LLM |
| Workflows | Workflow graph models, step types and validation | Workflows |
| MCP | Toolset policy for MCP servers made from the OpenAPI document | MCP |
| Observability | Logging, access log, OpenTelemetry, Prometheus metrics | Logging, OpenTelemetry, Metrics |
| Runtime | Settings, lifespan composition, the serve command |
Settings, Lifespan |
Quick Links¶
Package Layout¶
The main modules in libraries/common/src/imbi/common/:
imbi/common/
├── access_log.py # ASGI access log middleware
├── auth/ # JWT, encryption, passwords, permissions
├── blueprints.py # Dynamic schema system
├── clickhouse/ # ClickHouse client and schemata.toml
├── graph/ # Apache AGE client, embeddings, schemata.toml
├── iggy/ # Iggy publisher and TOPICS
├── lifespan.py # Lifespan composition
├── llm/ # Anthropic client, drivers, discovery, TypeSafe
├── logging.py # Logging configuration
├── mcp.py # MCP toolset policy
├── metrics.py # Prometheus /metrics route
├── models.py # Domain models
├── otel.py # OpenTelemetry setup
├── plugins/ # Plugin contracts and registry
├── prompts/ # Prompt CMS support
├── scoring/ # Project scoring engine
├── sentry.py # Sentry lifespan hook
├── server.py # Uvicorn serve command
├── settings.py # Configuration management
├── valkey.py # Valkey client
└── workflows/ # Workflow definitions
Support¶
License¶
BSD-3-Clause - See LICENSE for details.