from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# Patch session configs (adds/updates keys, use None to delete)
updated_configs = client.sessions.patch_configs(
session_id='session-uuid',
configs={'agent': 'bot2', 'old_key': None} # None deletes the key
)
print(updated_configs) # {'existing_key': 'value', 'agent': 'bot2'}{
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": {
"configs": {}
}
}Update session configs using patch semantics. Only updates keys present in the request. Pass null as value to delete a key. Returns the complete configs after patch.
from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# Patch session configs (adds/updates keys, use None to delete)
updated_configs = client.sessions.patch_configs(
session_id='session-uuid',
configs={'agent': 'bot2', 'old_key': None} # None deletes the key
)
print(updated_configs) # {'existing_key': 'value', 'agent': 'bot2'}{
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": {
"configs": {}
}
}