Skip to main content

Quick example

import os
from pathlib import Path
from eigenpal import EigenpalClient

client = EigenpalClient(api_key=os.environ["EIGENPAL_API_KEY"])

# Run a workflow with a file input (multipart upload, no base64).
result = client.workflows.executions.run_and_wait(
    "extract-invoice",
    input={"contract": Path("contract.pdf")},
)
print(result["status"], result["output"])

Client construction

import os
from eigenpal import EigenpalClient

client = EigenpalClient(
    api_key=os.environ["EIGENPAL_API_KEY"],
    # For self-hosted deployments:
    base_url=os.environ.get("EIGENPAL_BASE_URL"),
)
The constructor argument always wins; the env var is a fallback so scripts don’t have to write api_key=os.environ["EIGENPAL_API_KEY"] explicitly.
OptionTypeDefaultDescription
api_keystros.environ["EIGENPAL_API_KEY"]Bearer key from the dashboard.
base_urlstros.environ.get("EIGENPAL_BASE_URL") or defaultAPI host. Set to your deployment for self-hosted.
timeout_secondsfloat60.0Per-request timeout.
verify_sslboolTrueDisable for self-signed dev hosts.

Agents

client.agents.list_files

GET /api/v1/agents/{agentId}/files List or download agent source files Lists or reads files from the agent Git package (agents/{slug}/ on organization source). Runtime artifacts (runs, dataset) are not served here. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Query parameters
NameTypeDescription
pathstr(optional)
prefixstr(optional)
refstr(optional)Git ref (default main)
Response
// Any

client.agents.put_file

PUT /api/v1/agents/{agentId}/files Upload one agent file (deprecated) Agent source is Git-backed. Use Git push or the builder instead. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Query parameters
NameTypeDescription
pathstr(optional)
prefixstr(optional)
refstr(optional)Git ref (default main)
Request body
// dict[str, Any]

client.agents.upload_files

POST /api/v1/agents/{agentId}/files Upload agent files (deprecated) Agent source is Git-backed. Use Git push or the builder instead. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Request body
// dict[str, Any]

client.agents.get

GET /api/v1/agents/{agentId} Get an agent Returns one agent by id or slug. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Query parameters
NameTypeDescription
includestr(optional)Comma-separated optional sections, e.g. files,dataset
Response
// GetAgentResponse

client.agents.update

PATCH /api/v1/agents/{agentId} Update an agent Updates mutable agent metadata and configuration. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Request body
// PatchAgentBody
Response
// PatchAgentResponse

client.agents.email_triggers.update_alias

PATCH /api/v1/agents/{agentId}/triggers/email/{emailId} Update an agent email alias Updates an email trigger alias for one agent. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
email_idstrEmail trigger alias id
Request body
// dict[str, Any]
Response
// dict[str, Any]

client.agents.email_triggers.delete_alias

DELETE /api/v1/agents/{agentId}/triggers/email/{emailId} Delete an agent email alias Revokes an email trigger alias for one agent. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
email_idstrEmail trigger alias id
Response
// dict[str, Any]

client.agents.email_triggers.get

GET /api/v1/agents/{agentId}/triggers/email Get an agent email trigger Returns email trigger configuration and aliases for one agent. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Response
// dict[str, Any]

client.agents.email_triggers.update

PATCH /api/v1/agents/{agentId}/triggers/email Update an agent email trigger Enables or disables the email trigger for one agent. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Request body
// dict[str, Any]
Response
// dict[str, Any]

client.agents.email_triggers.create_alias

POST /api/v1/agents/{agentId}/triggers/email Create an agent email alias Creates an email trigger alias for one agent. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Request body
// dict[str, Any]
Response
// dict[str, Any]

client.agents.versions

GET /api/v1/agents/{agentId}/versions List agent Git versions Lists Git-backed release versions for an agent. Release notes are included when a matching legacy published-version message exists. Path parameters
NameTypeDescription
agent_idstrAgent id or slug
Response
// ListAgentVersionsResponse

client.agents.list

GET /api/v1/agents List agents Returns agents the caller has access to, with pagination and basic execution stats. Accepts session cookies or API keys. Query parameters
NameTypeDescription
searchstr(optional)Substring match against agent fields
slugstr(optional)Return a single agent by slug
limitint(optional)
offsetint(optional)
include_archivedbool(optional)
Response
// ListAgentsResponse

client.agents.create

POST /api/v1/agents Create an agent Creates a new agent, registers it in the automation table, and scaffolds its Git source package. Accepts session cookies or API keys. Request body
// CreateAgentBody
Response
// CreateAgentResponse

client.agents.email_triggers.list

GET /api/v1/agents/triggers/email List agent email triggers Lists email trigger aliases for the authenticated organization. Response
// dict[str, Any]

Automations

client.automations.sync

POST /api/v1/automations/{automation}/sync Sync an automation from latest source Reconciles lightweight automation metadata from the latest released Git source package. This does not enqueue executions. Path parameters
NameTypeDescription
automationstr
Response
// AutomationSyncResponse

Runs

client.run

POST /api/v1/run/{target} Start a workflow or agent run Starts a run for a workflow or agent target. The target lives in the URL path; the optional version query parameter selects a release/ref and defaults to latest. The request body is the input object; a reserved _overrides key (workflow targets only) carries per-step output overrides for replay. Run provenance may be declared with the X-Eigenpal-Trigger header (api or cli). Path parameters
NameTypeDescription
targetstrAutomation target without a version suffix.
Query parameters
NameTypeDescription
versionstr(optional)Optional version or source ref. Defaults to latest.
wait_for_completionint(optional)
Request body
// RunTargetInputBody
Response
// RunStartResponse

client.runs.artifacts.download

GET /api/v1/runs/{id}/artifact/{path} Download run artifact Download an agent run artifact such as input/output JSON, trace.jsonl, issues.md, metadata, or files under input/ and output/. Workflow run file rows are exposed through /files. Path parameters
NameTypeDescription
idstr
pathstr

client.runs.cancel

POST /api/v1/runs/{id}/cancel Cancel run Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.comparison.get

GET /api/v1/runs/{id}/comparison Get run comparison Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.connect

POST /api/v1/runs/{id}/connect Connect to live run Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.expected.download

GET /api/v1/runs/{id}/expected/{filename} Download expected artifact file Path parameters
NameTypeDescription
idstr
filenamestr

client.runs.expected.rename

PATCH /api/v1/runs/{id}/expected/{filename} Rename expected artifact file Path parameters
NameTypeDescription
idstr
filenamestr
Request body
// dict[str, Any]
Response
// dict[str, Any]

client.runs.expected.delete

DELETE /api/v1/runs/{id}/expected/{filename} Delete expected artifact file Path parameters
NameTypeDescription
idstr
filenamestr

client.runs.expected.list

GET /api/v1/runs/{id}/expected Get run expected artifacts Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.expected.copy_output

POST /api/v1/runs/{id}/expected Create or update expected artifacts Path parameters
NameTypeDescription
idstr
Request body
// dict[str, Any]
Response
// dict[str, Any]

client.runs.feedback.get

GET /api/v1/runs/{id}/feedback Get run feedback Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.feedback.update

PATCH /api/v1/runs/{id}/feedback Update run feedback Path parameters
NameTypeDescription
idstr
Request body
// RunFeedbackRequest
Response
// dict[str, Any]

client.runs.feedback.clear

DELETE /api/v1/runs/{id}/feedback Clear run feedback Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.artifacts.download_zip

GET /api/v1/runs/{id}/files-zip Download run output files zip Download agent run output artifacts as a zip. Workflow run files use /files and will be folded into artifacts in a future refactor. Path parameters
NameTypeDescription
idstr
Query parameters
NameTypeDescription
filesstr(optional)
tokenstr(optional)

client.runs.files.delete

DELETE /api/v1/runs/{id}/files/{fileId} Delete run input file Path parameters
NameTypeDescription
idstr
file_idstr

client.runs.files.list

GET /api/v1/runs/{id}/files List run files List DB-backed workflow run files: mutable workflow inputs before execution starts, plus workflow/eval input and output file rows. Agent debug outputs are exposed as run artifacts instead. Path parameters
NameTypeDescription
idstr
Response
// RunFilesResponse

client.runs.files.upload

POST /api/v1/runs/{id}/files Upload run input file Upload a DB-backed workflow run input file. This endpoint is for workflow runs before execution starts; agent run downloads use artifacts. Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.rerun

POST /api/v1/runs/{id}/rerun Rerun run Path parameters
NameTypeDescription
idstr
Query parameters
NameTypeDescription
wait_for_completionint(optional)
Request body
// RunRerunRequest
Response
// RunRerunResponse

client.runs.get

GET /api/v1/runs/{id} Get run Returns a run summary by default. Pass include=detail for the rich type-specific workflow or agent run payload. Path parameters
NameTypeDescription
idstrRun id
Query parameters
NameTypeDescription
includestr(optional)Comma-separated sections. Include detail for rich payload.
Response
// RunEnvelope

client.runs.trace.get

GET /api/v1/runs/{id}/trace Get run trace Path parameters
NameTypeDescription
idstr
Response
// dict[str, Any]

client.runs.list

GET /api/v1/runs List runs Tenant-scoped, cursor-paginated feed of workflow and agent runs. Use type and source filters to scope to one runtime or resource. Query parameters
NameTypeDescription
typestr(optional)
sourcestr(optional)
statusstr(optional)
triggerstr(optional)
triggered_bystr(optional)
source_refstr(optional)
batch_idstr(optional)
example_idstr(optional)
example_id_containsstr(optional)
fromstr(optional)
tostr(optional)
created_afterstr(optional)
created_beforestr(optional)
completed_afterstr(optional)
completed_beforestr(optional)
cursorstr(optional)
offsetint(optional)
limitint(optional)
idsstr(optional)
Response
// RunsListResponse

Source

client.source.lockfile

GET /api/v1/source/lockfile Preview a source lockfile Resolves a package ref and returns the would-be eigenpal.lock without enqueueing or writing runtime artifacts. Query parameters
NameTypeDescription
package_refstr
Response
// SourceLockfileResponse

client.source.raw

GET /api/v1/source/raw Preview a raw Git source file Reads a raw file from the organization Git repository for metadata previews. Query parameters
NameTypeDescription
refstr(optional)
pathstr
Response
// RawSourceResponse

client.source.releases

GET /api/v1/source/releases List Git source package releases Lists package-scoped Git release tags, or returns one exact version when requested. Query parameters
NameTypeDescription
package_pathstr
versionstr(optional)
Response
// SourceReleasesResponse

client.source.repository

GET /api/v1/source/repository Get organization Git source repository Returns the authenticated organization Git remote used by hidden source CLI commands. Response
// SourceRepositoryResponse

client.source.decrypt_secrets

POST /api/v1/source/secrets/decrypt Decrypt a Git-backed source secret Decrypts one or more encrypted source secret values for the authenticated tenant. Single-secret requests require an execution id and are checked against that execution lockfile graph; batch secrets[] requests are tenant-scoped for local CLI use. Request body
// SourceSecretsDecryptBody
Response
// SourceSecretsDecryptResponse

client.source.encrypt_secrets

POST /api/v1/source/secrets/encrypt Encrypt a Git-backed source secret Encrypts one or more plaintext secret values for the authenticated tenant using the organization active decrypt key. Organization decrypt keys never leave the server; callers send plaintext over TLS with normal app authentication. Request body
// SourceSecretsEncryptBody
Response
// SourceSecretsEncryptResponse

Workflows

client.workflows.get

GET /api/v1/workflows/{id} Get a workflow by id Returns the workflow summary plus the current version YAML. Use versions list for historical YAML. Path parameters
NameTypeDescription
idstrWorkflow id (e.g. wf_abc123)
Response
// WorkflowDetail

client.workflows.versions

GET /api/v1/workflows/{id}/versions List tagged versions for a workflow Returns released versions in reverse-chronological order, paginated. Path parameters
NameTypeDescription
idstrWorkflow id
Query parameters
NameTypeDescription
limitint(optional)Page size (max 100, default 50)
offsetint(optional)Page offset
Response
// ListVersionsResponse

client.workflows.list

GET /api/v1/workflows List workflows Returns workflows the API key has access to, with pagination. Use name for exact-match slug lookup, search for substring match. Query parameters
NameTypeDescription
searchstr(optional)Substring match against workflow name
namestr(optional)Exact-match lookup by workflow name (slug)
kindLiteral["workflow", "block"](optional)Filter by workflow kind
limitint(optional)Page size (max 100, default 50)
offsetint(optional)Page offset
Response
// ListWorkflowsResponse

Errors

Every non-2xx response throws a typed exception:
HTTPTypeScriptPython
400EigenpalValidationErrorEigenpalValidationError
401EigenpalAuthErrorEigenpalAuthError
403EigenpalForbiddenErrorEigenpalForbiddenError
404EigenpalNotFoundErrorEigenpalNotFoundError
429EigenpalRateLimitErrorEigenpalRateLimitError
5xxEigenpalServerErrorEigenpalServerError
timeoutEigenpalTimeoutErrorEigenpalTimeoutError
The thrown exception carries status, requestId, envelope (raw ApiErrorEnvelope), and (for 429) retryAfter.