New to configuration?See the Setup Configuration Overview for the complete workflow:install extras β create
.env
β choose providers β handle pruning.Supported Frameworks
Cognee supports two structured output approaches:- LiteLLM + Instructor β Provider-agnostic client with Pydantic coercion (default)
- BAML β DSL-based framework with type registry and guardrails
How It Works
Cognee uses a unified interface that abstracts the underlying framework:STRUCTURED_OUTPUT_FRAMEWORK
environment variable determines which backend processes your requests, but the API remains identical.
Configuration
Important Notes
- Unified Interface: Your application code uses the same
acreate_structured_output()
call regardless of framework - Provider Flexibility: Both frameworks support the same LLM providers
- Output Consistency: Both produce identical Pydantic-validated results
- Performance: Framework choice doesnβt significantly impact performance