Quick Integration
Real-Time Experience
Reliability by Default
Clean Java API surface with low onboarding overhead
sendChatStream(...) for streaming chunks
Timeout + retry controls tuned for production
flowchart LR
A[Create Agent] --> B[Create Chat Channel]
B --> C[Send Message]
C --> D[SSE Stream Chunks]
D --> E[Attach Knowledge Base]
E --> F[Customer-Ready Experience]
Loading
import com .egroupai .sandbox .sdk .AiSandboxClient ;
import java .util .List ;
import java .util .Map ;
AiSandboxClient client = new AiSandboxClient (
System .getenv ().getOrDefault ("AI_SANDBOX_BASE_URL" , "https://www.egroupai.com" ),
System .getenv ().getOrDefault ("AI_SANDBOX_API_KEY" , "" )
);
Map <String , Object > agent = client .createAgent (Map .of (
"agentDisplayName" , "Support Agent" ,
"agentDescription" , "Handles customer inquiries"
));
int agentId = Integer .parseInt (String .valueOf (((Map <String , Object >) agent .get ("payload" )).get ("agentId" )));
Map <String , Object > channel = client .createChatChannel (agentId , Map .of (
"title" , "Web Chat" ,
"visitorId" , "visitor-001"
));
String channelId = String .valueOf (((Map <String , Object >) channel .get ("payload" )).get ("channelId" ));
List <String > chunks = client .sendChatStream (agentId , Map .of (
"channelId" , channelId ,
"message" , "What is the return policy?" ,
"stream" , true
));
chunks .forEach (System .out ::println );
<dependency >
<groupId >com.egroupai</groupId >
<artifactId >ai-sandbox-sdk-java</artifactId >
<version >1.0.0</version >
</dependency >
Integration Sanity Checklist
Keep AI_SANDBOX_API_KEY in secure runtime configuration.
Confirm AI_SANDBOX_BASE_URL points to the intended environment.
Verify [DONE] handling in stream consumers before release.
Metric
Value
API Coverage
11 operations (Agent / Chat / Knowledge Base)
Stream Mode
text/event-stream with [DONE] handling
Retry Safety
429/5xx auto-retry for GET/HEAD + capped exponential backoff
Error Surface
ApiException with status/body/traceId
Validation
Production-host integration verified
Release Readiness
Run draft-release-train and guards checks before merge
This SDK is released under the Apache-2.0 license.