Knowledge resources define embeddings, ingestion pipelines, and storage for knowledge bases. Configure vector stores declaratively, share context across agents with access control.
Define knowledge bases as YAML specs following the Open Agentic Resource Specification
type: knowledge
enabled: true
version: "0.1"
metadata:
display_name: Product Documentation
description: Searchable product docs for RAG
tags:
category: documentation
team: support
spec:
name: product-docs
embedding:
provider: openai
model: text-embedding-3-large
dimensions: 3072
documents:
- source: ./docs/**/*.md
- source: https://api.example.com/docs
loader: web_scraper
storage:
type: mongodb
collection: product_docs
index_name: vector_index
# Reference a StorageResource
# storage: ${"resource::storage::mongodb-default"}Configure backing stores used by knowledge resources. Supports any vector database while centralizing governance in EV.
Atlas Vector Search
Serverless vector DB
High-performance search
Open source embeddings
type: storage
spec:
name: mongodb-default
driver: mongodb
config:
uri: ${"secret::string::MONGODB_URI"}
database: ev
# Knowledge resources reference by name:
# storage: ${"resource::storage::mongodb-default"}The EVKnowledgeOperator supports CREATE and LOAD operations. It delegates loading through ResourceLoadOperatorwhile handling embedding workflows.
from ev_core import EV
from ev_core.control.operators.knowledge import (
KnowledgeOperationContext,
KnowledgeOperationType,
CreateKnowledgeParams,
)
# Create knowledge base
await EV.operate(
KnowledgeOperationContext(
operation=KnowledgeOperationType.CREATE,
params=CreateKnowledgeParams(
name="product-docs",
documents=[
"./docs/**/*.md",
"https://api.example.com/docs"
]
)
)
)
# Load and search
kb = await EV.operate(
KnowledgeOperationContext(
operation=KnowledgeOperationType.LOAD,
params=LoadKnowledgeParams(name="product-docs")
)
)
results = await kb.search("How to reset password?")Knowledge bases integrate seamlessly with agent definitions. Access controlled per-agent—RAG queries limited to declared knowledge resources.
type: agent_definition
spec:
name: support-agent
engine: agno
definition:
model: openai-gpt-4o
instructions: |
Answer questions using the product docs.
Always cite your sources.
resources:
knowledge:
- product-docs # ✓ searchable
- faq-database # ✓ searchable
# - hr-policies # ✗ not declared# Agent automatically has access to declared KBs
agent = await EV.operate(
AgentDefinitionOperationContext(
operation=AgentDefinitionOperationType.BUILD,
params=BuildAgentDefinitionParams(
name="support-agent"
)
)
)
# Knowledge search happens transparently
# during agent tool calls
response = await agent.run(
task="How do I reset my password?"
)
# Agent retrieved context from product-docs
# and faq-database, but NOT hr-policiesCombine knowledge resources with MCP connectors for external data access
# MCP connector for external knowledge
type: mcp
spec:
name: confluence-mcp
transport:
type: http
url: https://mcp.confluence.internal
headers:
Authorization: Bearer ${"secret::string::CONFLUENCE_TOKEN"}
# Agent with both static knowledge and MCP
type: agent_definition
spec:
name: docs-agent
resources:
knowledge:
- product-docs # Static embeddings
mcp:
- confluence-mcp # Live Confluence accessStop managing embeddings across silos—version, share, and govern knowledge in one place.
Explore Policies