Minimal Spark DSL for defining a Jidoka agent on top of Jido.
defmodule MyApp.TimeAgent do
use Jidoka.Agent
agent :time_agent do
model "openai:gpt-4o-mini"
instructions "Use local_time when asked for the time."
end
tools do
action MyApp.Actions.LocalTime
end
end
{:ok, text} = MyApp.TimeAgent.chat("What time is it in Chicago?")
Summary
Functions
Runs a DSL agent turn and returns final assistant text.
Returns the normalized data compiled from a Spark DSL agent module.
Runs a DSL agent turn through Jidoka's harness.
Compiles a DSL agent module into Jidoka.Agent.Spec.
Functions
@spec chat(module(), String.t(), keyword()) :: {:ok, String.t()} | {:hibernate, Jidoka.Runtime.AgentSnapshot.t()} | {:error, term()}
Runs a DSL agent turn and returns final assistant text.
@spec definition!(module()) :: %{ id: String.t(), model: LLMDB.Model.t(), generation: Jidoka.Agent.Spec.Generation.t(), instructions: String.t(), description: String.t() | nil, context_schema: term(), result: Jidoka.Agent.Spec.Result.t() | nil, memory: Jidoka.Agent.Spec.Memory.t() | nil, actions: [module()], operations: [Jidoka.Agent.Spec.Operation.t()], tool_sources: [map()], controls: Jidoka.Agent.Spec.Controls.t() }
Returns the normalized data compiled from a Spark DSL agent module.
@spec run_turn(module(), Jidoka.request_input(), keyword()) :: Jidoka.run_result()
Runs a DSL agent turn through Jidoka's harness.
@spec spec(module()) :: Jidoka.Agent.Spec.t()
Compiles a DSL agent module into Jidoka.Agent.Spec.