This repository contains examples demonstrating the usage of the Bee Agent Framework, a toolkit for building AI agents and applications.
bee.ts
: Basic Bee Agent implementationbee_advanced.ts
: Advanced Bee Agent with custom configurationsbee_reusable.ts
: Demonstration of serializing and reusing Bee Agentscustom_agent.ts
: Example of creating a custom agentgranite_bee.ts
: Basic Bee Agent using an IBM Granite LLMgranite_wiki_bee.ts
: Advanced Bee Agent using an IBM Granite LLM with wikipedia retrievalsimple.ts
: Simple agent implementationsql.ts
: Agent for SQL-related tasks
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 cachellmCache.ts
: Caching for language modelsslidingCache.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 modelschatStream.ts
: Streaming with chat modelsstructured.ts
: Structured output from language modelstext.ts
: Text-based language model usage
bam.ts
: BAM language model integrationbam_verbose.ts
: Verbose BAM model usagecustomChatProvider.ts
: Custom chat provider implementationcustomProvider.ts
: Custom language model providergroq.ts
: Groq language model integrationibm-vllm.ts
: IBM vLLM integrationlangchain.ts
: LangChain integrationollama.ts
: Ollama model usageopenai.ts
: OpenAI integrationwatsonx.ts
: WatsonX integrationwatsonx_verbose.ts
: Verbose WatsonX usage
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 implementation
-
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
tsconfig.json
: TypeScript configurationversion.ts
: Framework version information
To run these examples, make sure you have the Bee Agent 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 [email protected]:i-am-bee/bee-agent-framework
-
Install dependencies:
yarn install --immutable && yarn prepare
-
Create
.env
file (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 Bee Agent Framework, please refer to the documentation.