This repository contains examples demonstrating the usage of the BeeAI Framework, a toolkit for building AI agents and applications.
- Agents
- Workflows
- Cache
- Errors
- Helpers
- LLMs (Language Models)
- Logger
- Memory
- Serialization
- Templates
- Tools
react.ts: Basic ReAct Agent implementationreact_advanced.ts: Advanced ReAct Agent with custom configurationsreact_reusable.ts: Demonstration of serializing and reusing ReAct Agentscustom_agent.ts: Example of creating a custom agentgranite_react.ts: Basic ReAct Agent using an IBM Granite LLMgranite_wiki_react.ts: Advanced ReAct Agent using an IBM Granite LLM with wikipedia retrievalsimple.ts: Simple agent implementationsql.ts: Agent for SQL-related tasks
simple.ts: Introduction to workflowsnesting.ts: How to nest workflowsagent.ts: Using workflows to interconnect two agents with a critique step.multiAgents.ts: Multi-step sequential agentic workflow.contentCreator.ts: Multi-step workflow for writing blog posts.
cacheFn.ts: Function caching examplecustom.ts: Custom cache implementationdecoratorCache.ts: Cache decorator usagedecoratorCacheComplex.ts: Complex cache decorator examplefileCache.ts: File-based cachingfileCacheCustomProvider.ts: Custom provider for file cacheslidingCache.ts: Sliding window cache implementationtoolCache.ts: Caching for toolsunconstrainedCache.ts: Unconstrained cache exampleunconstrainedCacheFunction.ts: Function using unconstrained cache
chat.ts: Chat-based language model usagechatCallback.ts: Callbacks for chat modelsstructured.ts: Structured output from language models
groq.ts: Groq language model integrationlangchain.ts: LangChain integrationollama.ts: Ollama model usageopenai.ts: OpenAI integrationwatsonx.ts: Watsonx integrationanthropic.ts: Anthropic integration
agentMemory.ts: Memory management for agentscustom.ts: Custom memory implementationllmMemory.ts: Memory for language modelsslidingMemory.ts: Sliding window memorysummarizeMemory.ts: Memory with summarizationtokenMemory.ts: Token-based memoryunconstrainedMemory.ts: Unconstrained memory example
base.ts: Basic serializationcontext.ts: Context serializationcustomExternal.ts: Custom external serializationcustomInternal.ts: Custom internal serializationmemory.ts: Memory serialization
arrays.ts: Array-based templatesforking.ts: Template forkingfunctions.ts: Function-based templatesobjects.ts: Object-based templatesprimitives.ts: Primitive data type templates
advanced.ts: Advanced tool usageagent.ts: Agent-specific toolsbase.ts: Basic tool implementationmcp.ts: MCP tool usage
-
base.ts: Custom tool base implementation -
dynamic.ts: Dynamic tool creation -
openLibrary.ts: OpenLibrary API tool -
python.ts: Python-based custom tool -
langchain.ts: LangChain tool integration
To run these examples, make sure you have the BeeAI Framework cloned and properly configured. Each file demonstrates a specific feature or use case of the framework. You can run individual examples using Node.js with TypeScript support.
-
Clone the repository:
git clone git@github.com:i-am-bee/beeai-framework
-
Install dependencies:
yarn install --immutable && yarn prepare -
Create
.envfile (from.env.template) and fill in missing values (if any). -
Run an arbitrary example, use the following command:
yarn start examples/path/to/example.ts
For more detailed information on the BeeAI Framework, please refer to the documentation.