Getting Started
Welcome to Caskada! This framework helps you build powerful, modular AI applications using a simple yet expressive abstraction based on nested directed graphs.
1. Installation
First, ensure you have Caskada installed:
pip install caskadanpm install caskada # or pnpm/yarnFor more installation options, see the Installation Guide.
2. Core Concepts
Caskada is built around a minimalist yet powerful abstraction that separates data flow from computation:
Node: The fundamental building block that performs a single task with a clear lifecycle (
prep→exec→post).Flow: Orchestrates nodes in a directed graph, supporting branching, looping, and nesting.
Memory: Manages state, separating it into a shared
globalstore and a forkablelocalstore for isolated data flow between nodes.
3. Your First Flow
Let's build a simple Question-Answering flow to demonstrate Caskada's core concepts:
Step 1: Design Your Flow
Our flow will have two nodes:
GetQuestionNode: Captures the user's questionAnswerNode: Generates an answer using an LLM
Step 2: Implement the Nodes
Step 3: Connect the Nodes into a Flow
Step 4: Run the Flow
4. Key Design Principles
Caskada follows these core design principles:
Separation of Concerns: Data storage (the
memoryobject managing global/local stores) is separate from computation logic (Nodeclasses).Explicit Data Flow: Data dependencies between steps are clear and traceable through
memoryaccess inprep/postand the results passed betweenprep→exec→post.Composability: Complex systems (
Flows) are built from simple, reusable components (Nodes), and Flows themselves can be nested within other Flows.Minimalism: The framework provides only essential abstractions (
Node,Flow,Memory), avoiding vendor-specific implementations or excessive boilerplate.
5. Next Steps
Now that you understand the basics, explore these resources to build sophisticated applications:
Core Abstractions: Dive deeper into nodes, flows, and communication
Design Patterns: Learn more complex patterns like Agents, RAG, and MapReduce
Agentic Coding Guide: Best practices for human-AI collaborative development
If you prefer, jump straight into our example projects:
Last updated