Beyond Retrieval
Most knowledge systems stop at retrieval — you ask a question, you get back relevant chunks. But what if you need a comprehensive dossier on a person? A timeline of events? A report on contradictory claims?
CogMem introduces Knowledge Workflows — repeatable, strategy-aware operations that transform stored knowledge into useful artifacts.
What is a Knowledge Workflow?
A workflow is a first-class, versioned, and inspectable operation that:
- Declares its inputs
- Resolves the active MemoryStrategy for its scope
- Runs deterministic steps governed by that strategy
- Produces an Artifact
- Emits OutcomeEvents so the Adaptive Cognitive Plane can learn from results
Built-in Workflows
Entity Dossier
The Entity Dossier workflow builds a Wikipedia-style page from claims and evidence for a given entity. It fetches the canonical entity, gathers all claims where the entity is the subject, hydrates supporting evidence, and renders a comprehensive dossier.
from kos.workflows import EntityDossierWorkflow, EntityDossierRequest
workflow = EntityDossierWorkflow(
object_store=object_store,
claim_store=claim_store,
graph_search=graph_search,
)
request = EntityDossierRequest(
entity_id="entity-123",
tenant_id="tenant-1",
include_conflicts=True,
)
artifact = await workflow.execute(request)
Timeline Builder
The Timeline Builder orders claims and events over time for a given entity or topic. Perfect for understanding the history of a project, tracking how someone's role has evolved, or auditing decision-making processes.
Contradiction Report
The Contradiction Report surfaces conflicting claims for a given entity. When multiple sources disagree about a fact, this workflow presents both sides with their supporting evidence, enabling informed resolution.
Strategy-Aware Execution
Every workflow resolves the active MemoryStrategy before execution. This means the same workflow can behave differently depending on the domain — using different retrieval modes, confidence thresholds, or graph traversal depths based on what the ACP has learned works best.
Building Custom Workflows
All workflows share a common base class, making it straightforward to build your own:
class MyCustomWorkflow(BaseWorkflow):
workflow_id = "my_custom_v1"
async def _run(self, request, strategy):
# Your workflow logic here
# Use strategy to configure retrieval, chunking, etc.
pass
Workflows are composable — they can call other workflows — and every execution produces feedback for the ACP to learn from.
What's Next
We're working on more built-in workflows including Cross-Source Summaries, Decision Audit Trails, and Trend Analysis. If you have ideas for workflows that would be useful, we'd love to hear from you.