Introduction
Introduction
Welcome to the Agent Orbit Python SDK! This SDK offers a streamlined interface to interact with the Agent Orbit REST API, enabling you to create, execute, and manage agents effortlessly.
Usage
Installation
You can install the SDK using pip:
bashCopy codepip install agentorbitExample Code
After installation, use the following code to interact with the Agent Orbit API:
pythonCopy codeimport agentorbit
# Set your API key
agentorbit.api_key = "API_ORBIT_123456789" # Replace with your actual API key
# Retrieve an agent by ID
agent = agentorbit.Agent.retrieve(id="abc12345-xyz67890-test98765")
# Execute the agent
execution = agent.execute()Resources Overview
The following resources provide a fundamental understanding of Agent Orbit SDK capabilities:
1. BuilderJob
Purpose: Automatically created whenever an Agent is created or when its
python_versionordependenciesattribute is updated.Output: Produces a Build Instance.
Note:
BuilderJobandBuild Instancescannot be manually created. They are automatically generated by Agent Orbit and available only for listing or retrieval.
2. ExecutorJob
Purpose: Executes an Agent for a single task.
Output: Produces an Execution Instance.
Creation: Automatically initiated in the following cases:
When an Agent is executed via the Agent Orbit UI.
When the
executemethod is invoked in Python:
pythonCopy codeexecution = agent.execute()3. Agent
Purpose: The central entity in Agent Orbit, representing programmable logic that can be executed via an ExecutorJob.
4. Build Instance
Purpose: Represents a single successful build of an Agent.
Creation: Automatically generated by a BuilderJob.
5. Execution Instance
Purpose: Represents a single task execution by an Agent.
Creation: Generated by an ExecutorJob.
6. DataStore
Purpose: A key-value database that can be associated with multiple Agents during their creation.
Usage: Accessed via the
datastoreargument in themainfunction of an Agent.Example:
pythonCopy codedef main(request, datastore):
# Set a value in the datastore
datastore["username"] = "AgentOrbitUser"
# Retrieve the value
return datastore["username"]Conceptual API Details
Here’s an example of how the API endpoints might look for Agent Orbit:
Base URL:
https://api.agentorbit.ai/v1Endpoints:
Retrieve Agent:
GET /agents/{agent_id}Execute Agent:
POST /agents/{agent_id}/executeDataStore Access:
GET /datastore/{store_id}
Headers:
jsonCopy code{ "Authorization": "Bearer API_ORBIT_123456789", "Content-Type": "application/json" }
This conceptual display illustrates how Agent Orbit could be structured for users to integrate seamlessly with the API. Even though this is just a concept, the design emulates a realistic and intuitive interface for developers. Let me know if further refinements are needed!
Last updated