Content
# AI Connector for 1C: Enterprise
> Extension for integrating language models (LLM) into 1C: Enterprise 8.3 configurations:
> unified connector to providers, agent loop with tools, RAG, MCP server,
> error monitoring with AI analysis, and diagram generator.
[](https://opensource.org/licenses/MIT)
[](https://1c.ru)
[](https://github.com/andromanpro/1c-ai-connector/releases)
[](#-code-quality)
## 🎯 About the Project
**AI Connector (KI — Knowledge Interface)** is an extension for working with language models directly from 1C. Initially, it was an API connector with a unified interface for all popular providers; starting from version 1.3.0, it has become a platform for AI subsystems: on top of the connector, an agent loop with tools, semantic search by knowledge base (RAG), MCP server for external AI agents, error monitoring with AI diagnosis, and a diagram generator.
It is installed as a configuration extension and does not change the main configuration.
**Ready-to-use scenarios out of the box:**
- 🚨 Base error monitoring: collection from the registration log, AI diagnosis, Telegram
- 🔍 Code audit by error: location in source code + explanation of the cause
- 🛠 1C base as a set of tools for Claude/Cursor (MCP)
- 📊 Diagrams by text description (mermaid/plantuml/graphviz/bpmn)
**And API for your solutions:**
- 🤖 Chatbots for customer support
- 📝 Content generation (product descriptions, documents)
- 🔍 Classification and extraction of structured data from text
- 📚 Answers based on your knowledge base (RAG)
- 🎯 Agents that navigate through 1C data using tools
## ✨ Capabilities
### Connector (core)
- **Five provider formats** with separate connectors: OpenAI-compatible APIs,
Anthropic, Google Gemini, YandexGPT, GigaChat — plus 25+ ready-to-use models
in the preset layout.
- **Synchronous and asynchronous requests** (background tasks), message history,
system prompts.
- **Multimodality**: images and documents in request attachments,
image generation in response.
- **Response caching** with TTL (per-model, opt-in), full logging of requests
(tokens, time, errors), proxy support, OAuth2 (GigaChat), IAM (Yandex).
- **Retries with exponential backoff** — only transient codes (429/5xx),
without duplicate POST.
### Agent loop (function calling)
The model calls 1C tools and continues reasoning based on the results — in all
five provider formats. Round and call limits, deduplication of repeated
calls, enforcement of final output, audit of each call.
> Format adapters for all providers are covered by tests; live testing was performed
> on OpenAI-compatible models. Flags «Supports tools» for other providers in presets
> are enabled after testing with your keys.
### RAG — knowledge base
Knowledge categories, automatic document slicing into fragments, embeddings
with versioning. Knowledge is tied to experts and mixed into the system
prompt automatically. Two search backends: built-in (pure 1C, without dependencies)
and [Qdrant](https://qdrant.tech) — with synchronization queue and background verification.
Egress policies do not release confidential fragments outside the base.
### MCP server
HTTP service (JSON-RPC 2.0): external AI agents work with the base as with a set of
tools — metadata, object structure, read-only requests, diagrams.
Basic Auth, frequency limitation, whitelist of requests, secret hiding, audit
with auto-cleaning. ⚠ Publish outside only through HTTPS (reverse-proxy with TLS).
### Error monitoring
Scheduled collection from the registration log, normalization and deduplication,
batch AI analysis and in-depth agent analysis, notifications in Telegram with anti-spam,
ignoring rules, statistics, HTML dashboard. Plus code auditor: by error
finds the location in source code and explains the cause.
### Diagram generator
Word description → diagram (mermaid / plantuml / graphviz / bpmn). Mermaid
is rendered locally by the built-in mermaid.js library — without external services;
other formats and server rendering (PNG/SVG, MCP tool) — through
[kroki](https://kroki.io). The model with tools reads configuration metadata
and draws real attributes.
## 🌐 Supported Providers
| Provider | API Format | Function calling | Status |
|-----------|------------|------------------|--------|
| **OpenAI** (GPT-4/5.x) | OpenAI Compatible | ✅ | ✅ |
| **Anthropic** (Claude) | Anthropic Messages | ✅ format ready | ✅ |
| **Google** (Gemini) | Google AI | ✅ format ready | ✅ |
| **DeepSeek** | OpenAI Compatible | ✅ | ✅ |
| **GigaChat** (Sber) | OAuth2 + legacy functions | ✅ format ready | ✅ |
| **Yandex** (YandexGPT) | Yandex Cloud | ✅ format ready | ✅ |
| **Mistral / Qwen / Groq / Grok** | OpenAI Compatible | ✅ | ✅ |
| **Ollama / LM Studio / LiteLLM** (local) | OpenAI Compatible | depends on model | ✅ |
| **OpenRouter / Together / Fireworks and others** | OpenAI Compatible | ✅ | ✅ |
## 📦 Installation
### Requirements
- **1C: Enterprise 8.3.24+** — version 1.3.0 was developed and tested
on **8.3.27**
- **BSP (Standard Subsystems Library) 3.1.10+** — tested on demo base BSP 3.1.11.392
- Internet access for cloud providers (local models work offline)
- Optional: [Qdrant](https://qdrant.tech) for fast vector search,
[kroki](https://kroki.io) for diagram rendering
> Versions 1.0.x were also checked on 1C: ERP 2.5.17. Version 1.3.0 on ERP
> was not rechecked — reports on work on other configurations are welcome
> in [Issues](https://github.com/andromanpro/1c-ai-connector/issues).
### Installation Steps
1. Download `.cfe` from [Releases](https://github.com/andromanpro/1c-ai-connector/releases)
2. Connect the extension (Administration → Configuration extensions)
3. Update the database
4. Open the «AI Models» reference book and click «Fill models» — 25+ presets will be loaded
5. Specify API keys for the required models (stored in a secure 1C storage,
not included in exports); model connection test button — on the model form
6. Create an «AI Expert»: model + system prompt
7. New subsystems are enabled by filling their settings: Telegram token
for monitoring, Qdrant address for RAG, kroki address for diagrams,
API user for MCP — what is not configured will not work,
without interfering with the rest
### Update from 1.0.x
Standard: model and expert data are saved, public API is compatible
(`ЗапросКМодели`, `ЗапросКМоделиВФоне`, `ПараметрыМодели` — previous signatures).
The only behavioral change: the «KI Full rights» role no longer grants
rights to objects of the main configuration — only to extension objects
(excessive issuance is closed).
## 🚀 Quick Start
### Simple Request (3 lines of code)
```bsl
Модель = Справочники.КИИ_МоделиИИ.НайтиПоНаименованию("gpt-4");
Ответ = КИИ_КоннекторИИ.ЗапросКМодели(Модель, "Привет! Как дела?");
Если Не Ответ.ЭтоОшибка Тогда
ОбщегоНазначения.СообщитьПользователю(Ответ.ТекстОтвета);
КонецЕсли;
```
### With System Prompt and History
```bsl
Промпт = Новый Структура;
Промпт.Вставить("СистемныйПромпт", "Ты — помощник программиста 1С");
Промпт.Вставить("ПользовательскийПромпт", "Как создать новый документ?");
Промпт.Вставить("ИсторияСообщений", История); // optional
Ответ = КИИ_КоннекторИИ.ЗапросКМодели(Модель, Промпт);
```
### Asynchronous Request (background task)
```bsl
ДлительнаяОперация = КИИ_КоннекторИИ.ЗапросКМоделиВФоне(Модель, Промпт);
ДлительныеОперации.ОжидатьЗавершение(ДлительнаяОперация);
Ответ = ПолучитьИзВременногоХранилища(ДлительнаяОперация.АдресРезультата);
```
### Markdown → HTML
```bsl
HTML = КИИ_МаркдаунПарсерКлиентСервер.ПреобразоватьВHTML(Ответ.ТекстОтвета);
```
### Testing without Code
**«AI Test»** processing: chat with an expert, attachments (images/documents),
dialog history, log viewing — all interactively.
## 📚 Documentation and Development
- **User Guide (wiki)** — [1c-ai-connector-guide](https://github.com/andromanpro/1c-ai-connector-guide):
model and provider setup, RAG and knowledge base, error monitoring
and code auditor, MCP server and security, diagram generator.
- **Autotests (398 YAxUnit tests)** — [1c-ai-connector-tests](https://github.com/andromanpro/1c-ai-connector-tests);
YAxUnit required in the database and test extension.
- **MCP proxy for stdio clients** — [1c-ai-connector-mcp-proxy](https://github.com/andromanpro/1c-ai-connector-mcp-proxy)
(Claude Desktop and other clients without HTTP transport).
## 🔑 Obtaining API Keys
<details>
<summary>Instructions for providers</summary>
### OpenAI
1. [platform.openai.com](https://platform.openai.com) → API keys → create a key
2. Top up your balance
### Anthropic (Claude)
1. [console.anthropic.com](https://console.anthropic.com) → API Keys
### Google (Gemini)
1. [Google AI Studio](https://aistudio.google.com) → Get API key
### DeepSeek
1. [platform.deepseek.com](https://platform.deepseek.com) → API Keys
### GigaChat (Sber)
1. [developers.sber.ru/gigachat](https://developers.sber.ru/gigachat)
2. Get Authorization key (or ClientId:ClientSecret) — the module will exchange it for an OAuth2 token
### Yandex GPT
1. [Yandex Cloud](https://console.cloud.yandex.ru) → service account → API key
2. Specify Folder ID in the model
</details>
## 🔍 Code Quality
- ✅ **398 unit tests** (YAxUnit): connectors, agent loop,, monitoring, MCP, parsers
- ✅ **SonarQubeSL Language Server): 0 issues**, A/A ratings,
technical debt 0; conscious exceptions are documented with suppressions
and justification directly in the code
- ✅ Passing certification EDT checks (doc comments, areas, roles)
- ✅ Tested on demo base BSP 3.1.11.392 / platform 8.3.27
## 🗺️ Roadmap
### Completed (v1.3.0)
- [x] Vision API — images and documents in attachments + image generation
- [x] Improved rate limit handling — backoff, retry only transient codes
- [x] Function calling — agent loop in all five provider formats
- [x] Embeddings API — and entire RAG on top
- [x] Beyond plan: MCP server, error monitoring with AI analysis, code auditor,
diagram generator, 397 auto tests
### Plans
- [ ] Streaming — not possible in pure BSL (platform returns entire HTTP response);
emulation through background job with polling is being investigated
- [ ] Live smock function calling on Anthropic/Google/Yandex/GigaChat
and inclusion of flags in presets
- [ ] CI: build `.cfe`, run tests and Sonar on every commit
- [ ] Expanding test coverage (instrumental measurement of coverage)
## ❓ FAQ
<details>
<summary>Frequently Asked Questions</summary>
### What 1C platform is supported?
8.3.24+; version 1.3.0 was developed and tested on 8.3.27.
### Is BSP required?
Yes, BSP 3.1.10+ (tested on 3.1.11.392).
### Is image sending supported?
Yes, from version 1.3.0: images and documents are attached to the request
(in "Test AI" — attachments tab), image generation is also supported.
### Can it be used without internet?
Yes — local models via Ollama/LM Studio, built-in RAG search
and local rendering of mermaid diagrams also work without external services.
### Where are API keys stored?
In a secure 1C storage; configuration exports do not include them.
### How to control costs?
All requests are logged to a register with tokens and time;
response caching requests.
### Can a custom provider be added?
Any OpenAI-compatible API works out of the box: create a model, specify
the address, `OpenAI_Compatible` format, model name, and key.
### Can it be used in commercial projects?
Yes, MIT license.
</details>
## 🤝 Contributing to the project
- 🐛 **Found a bug?** — [Issue](https://github.com/andromanpro/1c-ai-connector/issues)
- 💡 **Have an idea?** — [Discussions](https://github.com/andromanpro/1c-ai-connector/discussions)
- 🔧 **Want to help?** — Pull Request
## 📄 License
[MIT](LICENSE) © 2026 Andriyanov Roman ([androman.pro](https://androman.pro))
## 📞 Contacts
- 🌐 **Website**: [androman.pro](https://androman.pro)
- 💬 **Telegram**: [@andromanpro1c](https://t.me/andromanpro1c)
- 📧 **Email**: andromanpro@gmail.com
---
<div align="center">
**Made with ❤️ for the 1C community**
[⭐ Star](https://github.com/andromanpro/1c-ai-connector) • [💬 Discussions](https://github.com/andromanpro/1c-ai-connector/discussions) • [🐛 Report a bug](https://github.com/andromanpro/1c-ai-connector/issues)
</div>
Connection Info
You Might Also Like
No recommendations available