Conjure.Backend.Anthropic (Conjure v0.1.1-alpha)
View SourceBackend for Anthropic-hosted skill execution.
Executes skills using the Anthropic Skills API, where Anthropic manages
the execution environment in their cloud. Uses Conjure.Conversation.Anthropic
for the pause_turn loop handling.
Usage
session = Conjure.Backend.Anthropic.new_session([
{:anthropic, "xlsx", "latest"},
{:anthropic, "pdf", "latest"}
], [])
{:ok, response, session} = Conjure.Backend.Anthropic.chat(
session,
"Create a budget spreadsheet",
&api_callback/1,
[]
)Skill Specifications
Skills are specified as tuples: {:anthropic, name, version}
:anthropic- Source identifiername- Skill name (e.g., "xlsx", "pdf", "pptx")version- Skill version (e.g., "latest", "v1")
Options
:max_iterations- Maximum pause_turn iterations (default: 10):on_pause- Callback when pause_turn received
Container Reuse
The session automatically tracks and reuses container IDs across conversation turns for efficiency.
File Handling
Files created during execution are tracked in session.created_files.
Use Conjure.Files.Anthropic to download them.
See Also
Conjure.Backend.Local- Local executionConjure.Conversation.Anthropic- Pause-turn loopConjure.Files.Anthropic- File downloads
Summary
Functions
Validate skill specifications.
Functions
@spec validate_skills([Conjure.Session.skill_spec()]) :: {:ok, [Conjure.Session.skill_spec()]} | {:error, Conjure.Error.t()}
Validate skill specifications.
Returns {:ok, specs} if all specs are valid, or {:error, error} otherwise.
Example
Conjure.Backend.Anthropic.validate_skills([
{:anthropic, "xlsx", "latest"},
{:anthropic, "pdf", "latest"}
])
# => {:ok, [{:anthropic, "xlsx", "latest"}, {:anthropic, "pdf", "latest"}]}