Examples

Examples & Demos

Each demo file is runnable and shows a focused part of EduChain in action. Click any filename to view the full source on GitHub.

demo_all_features.py

Core primitives working together

demo_async.py

Async chains + speed comparison

demo_callbacks.py

Built-in + custom callback handlers

demo_tools.py

Tool detection, execution, full round trip

demo_vectorstore.py

Semantic search across mixed topics

demo_rag.py

Retrieval-augmented generation, grounded answers

demo_agent.py

Full agentic loop, including RAG-as-a-tool

Run a demo

Start with the agent demo to see the full agentic loop, including RAG-as-a-tool:

terminal
python demo_agent.py

Run the test suite

Run the full test suite (36 tests — happy paths, validation, and full-stack integration):

terminal
python test_all_features.py