In my test I get this error -- I'm following the p...
# koog-agentic-framework
r
In my test I get this error -- I'm following the pattern shown in https://github.com/JetBrains/koog/blob/480d1c7c922096a7cba757ed2122f95d5d41a903/agents/agents-test/src/commonTest/kotlin/ai/koog/agents/testing/feature/GraphTestingFeatureTest.kt. The main difference I can see is that my tool is a class-based tool with structured types -- any ideas?
Copy code
Session UUID is not mocked
kotlin.NotImplementedError: Session UUID is not mocked
	at ai.koog.agents.testing.tools.DummyAIAgentContext.getRunId(DummyAIAgentContext.kt:86)
	at ai.koog.agents.testing.feature.Testing$Feature.verifyGraph(TestingFeature.kt:1027)
	at ai.koog.agents.testing.feature.Testing$Feature.access$verifyGraph(TestingFeature.kt:929)
	at ai.koog.agents.testing.feature.Testing$Feature$install$2.invokeSuspend(TestingFeature.kt:973)
	at ai.koog.agents.testing.feature.Testing$Feature$install$2.invoke(TestingFeature.kt)
	at ai.koog.agents.testing.feature.Testing$Feature$install$2.invoke(TestingFeature.kt)
	at ai.koog.agents.core.feature.AIAgentPipeline$interceptBeforeAgentStarted$1.handle(AIAgentPipeline.kt:586)
	at ai.koog.agents.core.feature.handler.AgentHandler.handleBeforeAgentStarted(AgentHandler.kt:97)
The call that produces this error is
Copy code
assertNodes {
  callLLM withInput "foo" outputs toolCallMessage(fooTool, FooInput("foo"))
}
I can workaround it by specifing
runId = ""
in
assertNodes
but then I get
kotlin.NotImplementedError: Agent input is not mocked
, and if I implement that I get something else, and so on.
👀 1
s
any luck on fixing this? Just ran into the same issue
r
Nope, I have no solution for this issue yet. I'll poke the channel again as I think the team were busy with a hackathon last week.
a
Hi @rocketraman, thanks for describing the issue! Looks like it's a bug on our side. I don't see any reason why we shouldn't have default
runId
value in the mock environment... I'll try fixing it here, please feel free to follow. If it's merged today, you can try it out in tomorrow's nightly build.
🙌 1
r
Thank you!
🙌 1
Is mocking only those two values sufficient?
a
Hopefully yes 😅
r
When I work around the issue by setting runId, I get:
Agent input is not mocked (DummyAIAgentContext.kt:68)
And when I work around that, I get
Agent input type is not mocked (DummyAIAgentContext.kt:71)
and so on (I don't know how far down the rabbit hole goes).
👀 1
a
I see what you mean. Let me check if I can fix it
r
Its the
copy
call here that triggers all those accesses:
Copy code
at ai.koog.agents.testing.feature.Testing$Feature.verifyGraph(TestingFeature.kt:1038)
@Anastasiia Zarechneva As expected, I do still have errors with nightly `0.4.3-develop-20250924-0204`:
Copy code
Agent input type is not mocked
kotlin.NotImplementedError: Agent input type is not mocked
	at ai.koog.agents.testing.tools.DummyAIAgentContext.getAgentInputType(DummyAIAgentContext.kt:72)
	at ai.koog.agents.core.agent.context.AIAgentGraphContextBase.copy$default(AIAgentGraphContext.kt:64)
	at ai.koog.agents.testing.feature.Testing$Feature.verifyGraph(TestingFeature.kt:1055)
	at ai.koog.agents.testing.feature.Testing$Feature.access$verifyGraph(TestingFeature.kt:931)
	at ai.koog.agents.testing.feature.Testing$Feature$install$3.invokeSuspend(TestingFeature.kt:984)
a
On my way to fix it kodee walking backward
👍 1