KM-301h · Module 1
API-First vs. Embedded Integration
3 min read
Two fundamentally different integration architectures: API-first, where the knowledge system exposes a query API that integrated tools call, and embedded, where knowledge retrieval logic is built directly into the destination tool or workflow. API-first is more architecturally clean, more independently deployable, and more reusable across tools. Embedded is lower latency, simpler to implement, and more tightly coupled to the specific tool's behavior. The choice determines how the integration ages — API-first integrations survive tool changes; embedded integrations must be rebuilt when the tool changes.
- API-First Integration The knowledge system provides a documented REST or GraphQL API. Every integrated tool calls this API. Changes to the knowledge retrieval logic are made in one place and take effect for all consumers simultaneously. New tools can integrate without rebuilding retrieval logic. The API becomes the contract between the knowledge system and its consumers — version it from day one. Cost: latency from network call, API infrastructure management, API versioning discipline required.
- Embedded Integration Retrieval logic is implemented inside the destination tool — as a plugin, an extension, or embedded code. Best for: integrations with a single tool that will not change, use cases where sub-100ms retrieval latency is required, or tools that do not support external API calls. Cost: the retrieval logic must be maintained separately in each tool, cannot be updated centrally, and must be rebuilt when the tool is upgraded or replaced.
- The Integration Abstraction Layer For organizations with more than five knowledge integration targets, an integration abstraction layer — a lightweight service that routes integration requests to the appropriate knowledge system component — reduces the coupling between integrated tools and the knowledge system internals. Tool integrations target the abstraction layer. The abstraction layer targets the knowledge system. When the knowledge system architecture changes, only the abstraction layer needs updating.