Skip to main content
All Python modules · Import and compatibility guidance

Exports

AgentInvoker

Server-bound capability for invoking the compiled root agent. Obtain this object from the owning Harnest API; its constructor includes runtime bindings.

AgentInvoker.invoke

Invoke with an optional application-authorized runtime principal.

AgentResponse

Typed outcome returned when a custom endpoint invokes the root agent.
Fields (— means no declared default):

AgentResponse.approval_id

Return the pending human-approval ID when this response requires it.

AgentResponse.as_dict

Render the same JSON contract returned by Harnest’s response endpoint.

HTTPCallRequest

The routing fields a server interceptor may inspect or replace.
Fields (— means no declared default):

HTTPLifecycleContext

Stable request identity without headers, cookies, bodies, or credentials.
Fields (— means no declared default):

HTTPLifecycleContext.next

Continue normally or pass a replacement to the next interceptor.

HTTPLifecycleContext.finish

Return a final value without advancing to later execution.

HTTPLifecycleError

An HTTP interceptor returned invalid or unsafe control flow.

HTTPResponseHead

A response status and opaque raw headers available before body emission.
Fields (— means no declared default):

HTTPRouteError

An authored HTTP route violates Harnest’s server contract.