(project-folder-identifier)(project-folder-identifier project-dir)Builds a stable identifier for a project directory.
Builds a stable identifier for a project directory.
(prompt-send! {:keys [agent provider prompt] :as request})(prompt-send! agent request)Sends a prompt to a provider. The one-arg map form returns a session atom and
processes queued :user prompts on a virtual thread.
Supported forms:
[{:agent agent :provider provider-ref :prompt prompt-entry-or-entries ...}][agent request]One-arg map form:
:agent:provider to use for this queued session without calling
provider-connect!:prompt, which may be a string, a single prompt map, or a
sequential collection of prompt entries:model, :temperature, :top-p,
:max-tokens, :stop, :tools, :tool-choice, :response-format,
:metadata, and similar request settingsprovider/provider-openai-compatible, the model sees a small tool
surface centered on repling.agent.main/string-eval, while registered
vars remain available inside the SCI runtime that tool evaluates againstPrompt entries may be strings, {:role ... :content ...} maps, or single-key
maps like {:system "..."} and {:user "..."}.
Two-arg form:
request may be a string or a request map:prompt, optional :system, or explicit
:messages, plus any provider-specific request keysprovider/provider-openai-compatible, the model sees a small tool
surface centered on repling.agent.main/string-eval, while registered
vars remain available inside the SCI runtime that tool evaluates againstReturns:
Sends a prompt to a provider. The one-arg map form returns a session atom and
processes queued `:user` prompts on a virtual thread.
Supported forms:
- `[{:agent agent :provider provider-ref :prompt prompt-entry-or-entries ...}]`
- `[agent request]`
One-arg map form:
- required `:agent`
- optional `:provider` to use for this queued session without calling
`provider-connect!`
- required `:prompt`, which may be a string, a single prompt map, or a
sequential collection of prompt entries
- any additional keys are forwarded to each provider request turn, which is
useful for provider options like `:model`, `:temperature`, `:top-p`,
`:max-tokens`, `:stop`, `:tools`, `:tool-choice`, `:response-format`,
`:metadata`, and similar request settings
- for `provider/provider-openai-compatible`, the model sees a small tool
surface centered on `repling.agent.main/string-eval`, while registered
vars remain available inside the SCI runtime that tool evaluates against
- tool call failures are returned to the provider/model as structured tool
results so it can inspect the error and retry
Prompt entries may be strings, `{:role ... :content ...}` maps, or single-key
maps like `{:system "..."}` and `{:user "..."}`.
Two-arg form:
- `request` may be a string or a request map
- request maps commonly use `:prompt`, optional `:system`, or explicit
`:messages`, plus any provider-specific request keys
- for `provider/provider-openai-compatible`, the model sees a small tool
surface centered on `repling.agent.main/string-eval`, while registered
vars remain available inside the SCI runtime that tool evaluates against
- tool call failures are returned to the provider/model as structured tool
results so it can inspect the error and retry
Returns:
- one-arg map form: an atom containing the in-flight session vector
- two-arg form: the final provider response(provider-connect! agent provider-ref)(provider-connect! agent provider-name provider-ref)Connects the agent to a provider.
Supported forms:
[agent provider-ref][agent provider-name provider-ref]provider-ref may be:
:invoke function and optional :name, :kind,
:endpoint, and :modelprovider-name overrides the inferred provider name when supplied.
Connects the agent to a provider. Supported forms: - `[agent provider-ref]` - `[agent provider-name provider-ref]` `provider-ref` may be: - a provider map with an `:invoke` function and optional `:name`, `:kind`, `:endpoint`, and `:model` - a var, function, or resolvable symbol that yields such a provider map or a plain callable `provider-name` overrides the inferred provider name when supplied.
(provider-current agent)Returns the connected provider summary, if any.
Returns the connected provider summary, if any.
(provider-disconnect! agent)Disconnects the current provider and returns its summary when one was set.
Disconnects the current provider and returns its summary when one was set.
(session-read path)Reads a persisted session file as a vector of messages.
Reads a persisted session file as a vector of messages.
(sessions-directory agent)Returns the directory where this agent stores prompt sessions.
The path is derived from the agent's :sessions-root and :project-dir.
Returns the directory where this agent stores prompt sessions. The path is derived from the agent's `:sessions-root` and `:project-dir`.
(sessions-list agent)Lists persisted session files for an agent.
Lists persisted session files for an agent.
(sessions-root-default)Returns the default root directory for stored sessions.
Returns the default root directory for stored sessions.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |