Skip to content

Agentic Adapters

ArtemisKit provides specialized adapters for testing agentic AI systems built with LangChain and DeepAgents.

LangChain Adapter

Test chains, agents, and runnables built with LangChain.js. Supports LCEL, ReAct agents, RAG chains, and more.

Learn more →

DeepAgents Adapter

Test multi-agent systems built with DeepAgents. Supports sequential, parallel, and hierarchical workflows.

Learn more →

Terminal window
bun add @artemiskit/adapter-langchain
# or
npm install @artemiskit/adapter-langchain
FeatureLangChainDeepAgents
System TypeChains, Agents, RunnablesMulti-agent teams, hierarchies
ExecutionSingle-agent or chain flowMulti-agent collaboration
Tool TrackingIntermediate stepsCross-agent tool usage
CommunicationChain input/outputInter-agent messages
StreamingVia stream() methodVia stream() method

Both adapters capture tool call information for verification:

import { createLangChainAdapter } from '@artemiskit/adapter-langchain';
const adapter = createLangChainAdapter(myAgent, {
name: 'tool-agent',
captureIntermediateSteps: true,
});
const result = await adapter.generate({
prompt: 'Search for weather in New York',
});
// Verify tools were used correctly
const metadata = result.raw.metadata;
expect(metadata.toolsUsed).toContain('web_search');
expect(metadata.totalToolCalls).toBeGreaterThan(0);
import { createDeepAgentsAdapter } from '@artemiskit/adapter-deepagents';
const adapter = createDeepAgentsAdapter(myTeam, {
name: 'content-team',
captureTraces: true,
captureMessages: true,
});
const result = await adapter.generate({
prompt: 'Research and write an article',
});
// Verify agent collaboration
const metadata = result.raw.metadata;
expect(metadata.agentsInvolved).toEqual(['researcher', 'writer']);
expect(metadata.totalMessages).toBeGreaterThan(0);

Create YAML scenarios for agentic testing:

agentic-test.yaml
name: agent-quality-test
description: Test agent response quality
cases:
- id: tool-usage
prompt: "Calculate 25 * 4 using the calculator"
expected:
type: contains
values: ["100"]
tags: [tool-test]
- id: multi-step
prompt: "Search for today's weather and summarize it"
expected:
type: llm_grader
criteria: "Response includes current weather information"
minScore: 0.8
tags: [integration]

Run with ArtemisKit:

import { ArtemisKit } from '@artemiskit/sdk';
import { createLangChainAdapter } from '@artemiskit/adapter-langchain';
const adapter = createLangChainAdapter(myAgent);
const kit = new ArtemisKit({
adapter,
project: 'agent-testing',
});
const results = await kit.run({
scenario: './agentic-test.yaml',
});
console.log(`Pass rate: ${results.manifest.metrics.pass_rate * 100}%`);

Both adapters provide rich execution metadata:

FieldDescription
agentsInvolvedList of agents that participated
totalAgentCallsNumber of agent invocations
totalToolCallsTotal tool/function calls
toolsUsedUnique tools that were used
tracesFull execution trace (if enabled)
messagesInter-agent messages (if enabled)
executionTimeMsTotal execution time
  1. Enable tracing in development — Use captureTraces: true for debugging
  2. Set appropriate timeouts — Multi-agent systems can take longer
  3. Test tool usage — Verify agents use tools correctly
  4. Test failure paths — Ensure graceful handling of tool errors
  5. Monitor costs — Multi-agent systems can make many LLM calls