Weave

Examples

Reference implementation patterns and use-cases.

Executable Examples Workspace

The Weave repository includes a dedicated examples/ workspace containing standalone, production-ready code projects demonstrating core capabilities.


Workspace Index

Example ProjectDemonstrated FeatureSource PathCLI Run Command
basic-agentSingle tool registration, debug logger, trace metricsexamples/basic-agent/index.tspnpm --filter basic-agent start
multi-agent-handoffSub-agent routing and context preservationexamples/multi-agent-handoff/index.tspnpm --filter multi-agent-handoff start
structured-outputZod output validation and automated self-repairexamples/structured-output/index.tspnpm --filter structured-output start
streaming-chatAsync event stream iteration via agent.stream()examples/streaming-chat/index.tspnpm --filter streaming-chat start

Running Examples Locally

To run any example project on your local machine:

Clone Repository & Install Dependencies

git clone https://github.com/sundaram26/Weave.git
cd Weave
pnpm install

Set Environment API Keys

export OPENAI_API_KEY="sk-proj-..."

Run Target Example

pnpm --filter basic-agent start