Skip to main content

conductor/
lib.rs

1// Copyright {{.Year}} Conductor OSS
2// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
3
4pub mod client;
5pub mod configuration;
6pub mod error;
7pub mod events;
8pub mod http;
9pub mod metrics;
10pub mod models;
11pub mod schema;
12pub mod worker;
13
14#[cfg(feature = "agents")]
15pub mod agents;
16
17// Re-exports for convenience
18#[cfg(feature = "agents")]
19pub use agents::{
20    agent_run_span, compile_span, handoff_span, is_tracing_enabled, llm_call_span, plan_execute,
21    record_token_usage, tool_call_span, traced_agent_run, traced_tool_call, Action,
22    AgentConfigSerializer, AgentDef, AgentEvent, AgentHandle, AgentResult, AgentRuntime,
23    AgentStatus, AgentStream, CallbackContext, CallbackHandler, Context, ConversationMemory,
24    Credentials, FunctionGuardrail, GateCondition, GateHandler, Generate, Guardrail,
25    GuardrailCheck, GuardrailResult, LlmGuardrail, Message, MessageRole, OnFail, Op, OpBody, Plan,
26    PlanExecuteOptions, Position, PrefillToolCall, Ref, RegexGuardrail, RegexMode, RunSettings,
27    Step, StopWhenHandler, Strategy, SwarmConditionFn, SwarmContext, SwarmTransition,
28    TerminationCondition, TextGate, ToolCall, ToolContext, ToolDef, ToolHandler, ToolType,
29    Validation,
30};
31#[cfg(feature = "agents")]
32pub use client::AgentClient;
33pub use client::{
34    AuthorizationClient, ConductorClient, EventClient, IntegrationClient, MetadataClient,
35    OrkesClients, PromptClient, QueueConfiguration, SchedulerClient, SchemaClient, SecretClient,
36    TaskClient, WorkflowClient,
37};
38pub use configuration::{Configuration, WorkerConfig};
39pub use error::{ConductorError, Result};
40pub use events::{EventDispatcher, TaskRunnerEvent, TaskRunnerEventsListener};
41pub use metrics::{MetricsCollector, MetricsSettings};
42pub use models::{
43    AccessKey, AccessType, ChatMessage, ConductorApplication, ConductorUser,
44    CreateOrUpdateApplicationRequest, CreatedAccessKey, EmbeddedTaskDef, GrantedPermission, Group,
45    Integration, IntegrationApi, IntegrationApiUpdate, IntegrationUpdate, MetadataTag, Permission,
46    PromptTemplate, Role, SaveScheduleRequest, SchemaDef, SearchResultWorkflowScheduleExecution,
47    StartWorkflowRequest, StartWorkflowScheduleRequest, StateChangeConfig, StateChangeEvent,
48    StateChangeEventType, SubWorkflowParams, SubjectRef, SubjectType, TargetRef, TargetType, Task,
49    TaskDef, TaskInProgress, TaskResult, TaskResultStatus, TaskStatus, TaskType,
50    UpsertGroupRequest, UpsertUserRequest, Workflow, WorkflowDef, WorkflowSchedule,
51    WorkflowScheduleExecution, WorkflowStatus, WorkflowTask, WorkflowTimeoutPolicy,
52};
53pub use worker::{
54    FnWorker, TaskContext, TaskHandler, TaskRunner, Worker, WorkerHost, WorkerOutput,
55};
56
57// Re-export the procedural macros when the feature is enabled
58#[cfg(feature = "agents")]
59pub use conductor_macros::tool;
60#[cfg(feature = "macros")]
61pub use conductor_macros::{worker, worker_task};