Loading...
Loading...
Agent-IM Conversation Skill - Create sessions, send messages such as image/video generation requests via OpenAPI, and query session progress. This skill is activated when users need to generate images/videos or query current session messages.
npx skill4agent add libtv-labs/libtv-skills libtv-skillexport LIBTV_ACCESS_KEY="your-access-key"OPENAPI_IM_BASEIM_BASE_URLhttps://im.liblib.tv# Create a new session and send "Generate an anime video"
python3 {baseDir}/scripts/create_session.py "Generate an anime video"
# Send a message to an existing session
python3 {baseDir}/scripts/create_session.py "Generate another landscape image" --session-id SESSION_ID
# Only create/bind a session without sending a message
python3 {baseDir}/scripts/create_session.py# Query session message list
python3 {baseDir}/scripts/query_session.py SESSION_ID
# Incremental pull (only returns messages with seq greater than N)
python3 {baseDir}/scripts/query_session.py SESSION_ID --after-seq 5
# Attach project URL (pass the projectUuid returned by create_session, projectUrl will be included in the result)
python3 {baseDir}/scripts/query_session.py SESSION_ID --project-id PROJECT_UUID# Switch the project bound to the current accessKey (new projectUuid will be used for subsequent create_session)
python3 {baseDir}/scripts/change_project.py{
"projectUuid": "aa3ba04c5044477cb7a00a9e5bf3b4d0",
"sessionId": "90f05e0c-...",
"projectUrl": "https://www.liblib.tv/canvas?projectId=aa3ba04c5044477cb7a00a9e5bf3b4d0"
}{
"messages": [
{"id": "msg-xxx", "role": "user", "content": "Generate an anime video"},
{"id": "msg-yyy", "role": "assistant", "content": "..."}
],
"projectUrl": "https://www.liblib.tv/canvas?projectId=..."
}--project-idmessagesquery_sessionprojectUrlcreate_sessionhttps://www.liblib.tv/canvas?projectId=projectUuid--project-id PROJECT_UUIDquery_sessionprojectUrlAuthorization: Bearer <LIBTV_ACCESS_KEY>message--after-seqhttps://www.liblib.tv/canvas?projectId=