kowalski-core 2.3.1

Core library of Kowalski, a Rust multi-agent framework: agents with MCP tools and memory, and hordes (step pipelines with triggers) over Ollama or OpenAI-compatible models
Documentation
#![doc = include_str!("../README.md")]

pub mod agent;
pub mod config;
pub mod conversation;
pub mod db;
pub mod error;
pub mod federation;
pub mod graph;
pub mod horde_graph;
pub mod horde_stages;
pub mod horde_step;
pub mod horde_table_steps;
pub mod horde_trigger;
pub mod llm;
pub mod manifest;
pub mod source_bundle;
pub mod logging;
pub mod markdown_pipeline;
pub mod operator_input;
pub mod mcp;
pub mod rookery;
pub mod memory;
pub mod model;
pub mod role;
pub mod template;
pub mod tool_chain;
pub mod tools;
pub mod utils;

pub use agent::repl_trace::ReplTraceGuard;
pub use agent::{Agent, BaseAgent, MessageHandler};
pub use config::*;
// pub use conversation::*; // Remove this to avoid ToolCall ambiguity
pub use error::KowalskiError;
pub use federation::{
    ABSOLUTE_MAX_DELEGATION_DEPTH, AclEnvelope, AclMessage, AgentRecord, AgentRegistry,
    DEFAULT_MAX_DELEGATION_DEPTH, DelegationOutcome, FederationOrchestrator, MessageBroker,
    MpscBroker, check_delegate_depth, delete_federation_agent, load_registry_into,
    mark_stale_agents_inactive, set_agent_current_task, touch_agent_heartbeat,
    upsert_agent_state_for_record, upsert_registry_record,
};
#[cfg(feature = "postgres")]
pub use federation::{AgentStateSnapshot, load_agent_states};
#[cfg(feature = "postgres")]
pub use federation::{
    PgBroker, bridge_postgres_notify_to_mpsc, bridge_postgres_notify_to_mpsc_pool, pg_pool_connect,
};
pub use graph::{postgres_age_cypher, postgres_graph_status};
pub use logging::*;
pub use horde_stages::{
    apply_patches_dry_run, extract_unified_diffs, format_apply_artifact, format_verify_artifact,
    verify_output_excerpt,
    parse_stage_status_from_artifact, resolve_verify_cwd, run_verify_command, run_verify_command_cancellable, ApplyDryRunResult,
    StageStatus, VerifyRunResult, DEFAULT_VERIFY_MAX_OUTPUT_BYTES, DEFAULT_VERIFY_TIMEOUT_SECS,
};
pub use horde_step::{
    execute_isolated_request, is_valid_isolation, ApplyStepHandler, IngestStepHandler,
    IsolatedStepEvent, IsolatedStepRequest, IsolatedStepResponse, LlmStepHandler, NullEventSink,
    StepContext, StepError, StepEventSink, StepHandler, StepHandlerRegistry, StepOutcome, StepSpec,
    VerifyStepHandler, ISOLATION_IN_PROCESS, ISOLATION_PROCESS, LLM_STEP_KINDS,
};
pub use horde_graph::{
    all_steps_successful, edge_matches_outcome, execution_order, has_conditional_outbound,
    inbound_predecessors, is_loop_back_edge, is_loop_back_step, loop_edge_key, next_ready_step, next_ready_step_conditional,
    outbound_edges, resolve_execution_graph, retry_span, select_next_from_outcome,
    should_persist_edges, single_forward_predecessor, single_predecessor, ExecutionGraph, HordeEdge,
};
pub use horde_trigger::{
    is_valid_slug, parse_cron, validate_triggers, CronSchedule, HordeTrigger, WatchTrigger,
    WebhookTrigger, DEFAULT_WATCH_DEBOUNCE_MS, DEFAULT_WATCH_EVENTS, WATCH_EVENTS,
};
pub use manifest::{
    horde_dir_to_manifest, manifest_from_draft, manifest_to_draft, validate_manifest,
    validate_manifest_with, workflow_manifest_schema, write_manifest_tree, ManifestStep,
    ManifestStrictness, WorkflowManifest, MANIFEST_SCHEMA_VERSION,
    WORKFLOW_MANIFEST_SCHEMA_JSON,
};
pub use markdown_pipeline::{
    maybe_normalize_markdown, parse_app_manifest, parse_stage_agent, render_context_attachments,
    resolve_manifest_path, AppManifestMeta, StageAgentMeta,
};
pub use operator_input::{
    answers_to_prompt, default_ingest_form_fields, operator_answer, parse_operator_answer_block,
    run_title, validate_form_answers, HordeRunFormSpec, OperatorInputField,
};
pub use rookery::{
    assign_penguin_avatars, extract_json_block, horde_root_path, infer_penguin_avatar,
    minimal_dag_draft, minimal_linear_draft, parse_draft_from_assistant, normalize_draft, output_looks_invalid,
    repair_horde_tree_outputs, validate_draft, validate_horde_tree, validate_horde_tree_report,
    write_horde_tree,
    HordeBirthSpec, PenguinSpec, RookeryDraft,
};
pub use mcp::{
    CallToolResponse, McpClient, McpConnection, McpHub, McpStdioClient, McpToolBinding,
    McpToolDescription, McpToolProxy,
};
pub use model::ModelManager;
pub use model::*;
pub use role::{Audience, Preset, Role, Style};
pub use tool_chain::*;
pub use tools::policy::ToolExecutionPolicy;
pub use tools::ToolCall;
pub use tools::*;