LangChain for Engineers - Build intelligent agents that think, reason, and act.
A streamlined framework for developers who want results, not complexity.
Traditional LLM frameworks like langchain
offer immense flexibility but can be overwhelming. @caretaker/agent
provides a streamlined developer experience for building AI agents that can:
- 🤔 Think & Reason - Break down complex problems through structured reasoning
- 🔄 Learn & Adapt - Improve responses through Reflexion
- 🎯 Execute & Verify - Take actions and validate results
- 👥 Interact Naturally - Engage in clear, contextual dialogue
const agent = new Agent({
objective: `You are a Mathematical Assistant that helps solve complex calculations.`,
typeDefs: `
type Query {
add(input: OperationInput!): CalculationResult!
}
`,
resolvers: {
Query: {
add: (_, { input: { left, right } }) => ({
result: left + right
})
}
}
});
await agent.chat("What is 2 + 2?");
Define your agent's purpose and behavior through structured objectives:
You are a [Role] that [Primary Purpose].
**Your responsibilities:**
1. [Primary Task]
2. [Secondary Task]
...
Specify available operations using GraphQL schemas:
type Query {
"""
Adds two numbers together
"""
add(input: OperationInput!): CalculationResult!
}
Watch your agent's thought process in real-time:
<Thought>
Breaking down the problem:
1. First, calculate 21 * 32
2. Then, add the result to 18
</Thought>
<Action>
query {
multiply(input: {left: 21, right: 32}) {
result
}
}
</Action>
Mathematical problem-solving with step-by-step explanations:
(78 - 13) / (21 * 32 + 18)
Information retrieval and synthesis from documents:
"What are the key benefits of the ReAct framework?"
Multi-agent system for intelligent document analysis:
"Extract and summarize revenue data by client"
npm install @caretaker/agent