Leveraging AgentKit’s Agent concept to power a RAG workflow.
1. Initialize your project
2. Install the required dependencies
3. Add TypeScript support
4. Download the example code file
example.ts
file locally, let’s load it in our code by creating a index.ts
file:
createAgent()
is a wrapper around the LLM, providing a structured way to interact with it with 3 main properties:
name
: A unique identifier for the agent.system
: A description of the agent’s purpose.model
: The LLM to use.claude-3-5-sonnet-latest
model by updating our index.ts
file:
main()
function to use our codeAssistant
Agent in the generation step:
example.ts
file in memory.codeAssistant.run()
method.output
array.createAgent()
is a wrapper around the LLM, providing a structured way to interact with a LLM model.
example.ts
file.
In the next version of our Code Assistant, we will make it dynamic by allowing the user to specify the file to analyze and also enable our Agent to perform more complete analysis.