Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Add code snippet showing how to call agent endpoint

Vasek Mlejnsky1cd9292a4ea6
diff --git a/components/Editor/Sidebar/Deploy.tsx b/components/Editor/Sidebar/Deploy.tsx
index c0e834aa1..97dfbc329 100644
--- a/components/Editor/Sidebar/Deploy.tsx
+++ b/components/Editor/Sidebar/Deploy.tsx
@@ -116,19 +116,49 @@ function Deploy({ project }: Props) {
"
>
<Text
+ size={Text.size.S3}
text={`Deployment ID: ${deployment.id}`}
/>
<Link
href={baseDeploymentURL}
target="_blank"
rel="noopener noreferrers"
- className=""
+ className="text-sm"
>
{baseDeploymentURL}
</Link>
</div>
}
</div>
+ {deployment && deployment['config'] && baseDeploymentURL &&
+ <div>
+ <Text
+ text="Example usage"
+ />
+ <pre className="
+ p-2
+ rounded
+ font-mono
+ text-xs
+ bg-slate-100
+ overflow-auto
+ ">
+ <code>
+ {`curl --request POST \\
+ --url ${baseDeploymentURL} \\
+ --data '{
+ "type": "start",
+ "data": {
+ "instructions": {
+ "Description": "Add Stripe Checkout",
+ "RepoURL": "https://github.com/e2b-dev/test.git"
+ }
+ }
+}'`}
+ </code>
+ </pre>
+ </div>
+ }
</div>
</div>
)